8000 Merge branch 'dev' · coreui/coreui-pro@a68eb05 · GitHub
[go: up one dir, main page]

Skip to content

Commit a68eb05

Browse files
committed
Merge branch 'dev'
2 parents 4165dfd + 893bbdd commit a68eb05

File tree

310 files changed

+34793
-28620
lines changed

Original file line numberDiff line numberDiff line change
@@ -14,12 +14,14 @@ import fs from 'node:fs'
1414
import path from 'node:path'
1515
import { fileURLToPath } from 'node:url'
1616
import sh from 'shelljs'
17+
import pkg from '../package.json' with { type: 'json' }
1718

1819
const __dirname = path.dirname(fileURLToPath(import.meta.url))
1920

2021
sh.config.fatal = true
2122

2223
const configFile = path.join(__dirname, '../hugo.yml')
24+
const isCanaryVersion = pkg.version.includes('canary')
2325

2426
// Array of objects which holds the files to generate SRI hashes for.
2527
// `file` is the path from the root folder
@@ -69,12 +71,13 @@ for (const { file, configPropertyName } of files) {
6971
throw error
7072
}
7173

74+
const propertyName = isCanaryVersion ? `canary_${configPropertyName}` : configPropertyName
7275
const algorithm = 'sha384'
7376
const hash = crypto.createHash(algorithm).update(data, 'utf8').digest('base64')
7477
const integrity = `${algorithm}-${hash}`
7578

76-
console.log(`${configPropertyName}: ${integrity}`)
79+
console.log(`${propertyName}: ${integrity}`)
7780

78-
sh.sed('-i', new RegExp(`^(\\s+${configPropertyName}:\\s+["'])\\S*(["'])`), `$1${integrity}$2`, configFile)
81+
sh.sed('-i', new RegExp(`^(\\s+${propertyName}:\\s+["'])\\S*(["'])`), `$1${integrity}$2`, configFile)
7982
})
8083
}

Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ export default context => {
1111
autoprefixer: {
1212
cascade: false
1313
},
14-
'postcss-combine-duplicated-selectors': {},
15-
rtlcss: context.env === 'RTL'
14+
'postcss-combine-duplicated-selectors': {}
1615
}
1716
}
1817
}