@adamlui/scss-to-css 2.3.1 → 2.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -19
- package/dist/cli/index.js +5 -9
- package/dist/cli/lib/init.js +13 -5
- package/dist/cli/lib/jsdelivr.js +3 -3
- package/dist/cli/lib/language.js +20 -13
- package/dist/cli/lib/log.js +4 -4
- package/dist/cli/lib/settings.js +6 -4
- package/dist/data/package-data.json +6 -2
- package/dist/scss-to-css.js +1 -1
- package/docs/README.md +19 -19
- package/docs/SECURITY.md +1 -1
- package/package.json +9 -8
package/README.md
CHANGED
|
@@ -8,19 +8,19 @@
|
|
|
8
8
|
<img height=14 src="https://assets.scsstocss.org/images/icons/earth/black/icon32.svg?v=7e4a141">
|
|
9
9
|
</picture>
|
|
10
10
|
English |
|
|
11
|
-
<a href="https://github.com/adamlui/scss-to-css/tree/main/docs/zh-cn
|
|
12
|
-
<a href="https://github.com/adamlui/scss-to-css/tree/main/docs/zh-tw
|
|
13
|
-
<a href="https://github.com/adamlui/scss-to-css/tree/main/docs/ja
|
|
14
|
-
<a href="https://github.com/adamlui/scss-to-css/tree/main/docs/hi
|
|
15
|
-
<a href="https://github.com/adamlui/scss-to-css/tree/main/docs/bn
|
|
16
|
-
<a href="https://github.com/adamlui/scss-to-css/tree/main/docs/mr
|
|
17
|
-
<a href="https://github.com/adamlui/scss-to-css/tree/main/docs/pa
|
|
18
|
-
<a href="https://github.com/adamlui/scss-to-css/tree/main/docs/de
|
|
19
|
-
<a href="https://github.com/adamlui/scss-to-css/tree/main/docs/es
|
|
20
|
-
<a href="https://github.com/adamlui/scss-to-css/tree/main/docs/fr
|
|
21
|
-
<a href="https://github.com/adamlui/scss-to-css/tree/main/docs/it
|
|
22
|
-
<a href="https://github.com/adamlui/scss-to-css/tree/main/docs/nl
|
|
23
|
-
<a href="https://github.com/adamlui/scss-to-css/tree/main/docs/pt
|
|
11
|
+
<a href="https://github.com/adamlui/scss-to-css/tree/main/docs/zh-cn/#readme">简体中文</a> |
|
|
12
|
+
<a href="https://github.com/adamlui/scss-to-css/tree/main/docs/zh-tw/#readme">繁體中文</a> |
|
|
13
|
+
<a href="https://github.com/adamlui/scss-to-css/tree/main/docs/ja/#readme">日本語</a> |
|
|
14
|
+
<a href="https://github.com/adamlui/scss-to-css/tree/main/docs/hi/#readme">हिंदी</a> |
|
|
15
|
+
<a href="https://github.com/adamlui/scss-to-css/tree/main/docs/bn/#readme">বাংলা</a> |
|
|
16
|
+
<a href="https://github.com/adamlui/scss-to-css/tree/main/docs/mr/#readme">मराठी</a> |
|
|
17
|
+
<a href="https://github.com/adamlui/scss-to-css/tree/main/docs/pa/#readme">ਪੰਜਾਬੀ</a> |
|
|
18
|
+
<a href="https://github.com/adamlui/scss-to-css/tree/main/docs/de/#readme">Deutsch</a> |
|
|
19
|
+
<a href="https://github.com/adamlui/scss-to-css/tree/main/docs/es/#readme">Español</a> |
|
|
20
|
+
<a href="https://github.com/adamlui/scss-to-css/tree/main/docs/fr/#readme">Français</a> |
|
|
21
|
+
<a href="https://github.com/adamlui/scss-to-css/tree/main/docs/it/#readme">Italiano</a> |
|
|
22
|
+
<a href="https://github.com/adamlui/scss-to-css/tree/main/docs/nl/#readme">Nederlands</a> |
|
|
23
|
+
<a href="https://github.com/adamlui/scss-to-css/tree/main/docs/pt/#readme">Português</a>
|
|
24
24
|
</h6>
|
|
25
25
|
</td>
|
|
26
26
|
</table>
|
|
@@ -29,17 +29,17 @@
|
|
|
29
29
|
|
|
30
30
|
### Recursively compile all SCSS files into minified CSS
|
|
31
31
|
|
|
32
|
-
<a href="https://
|
|
32
|
+
<a href="https://npmstar.com/compare/@adamlui%2Fscss-to-css">
|
|
33
33
|
<img height=31 src="https://img.shields.io/npm/dm/%40adamlui%2Fscss-to-css?logo=npm&color=af68ff&logoColor=white&labelColor=464646&style=for-the-badge"></a>
|
|
34
34
|
<a href="#%EF%B8%8F-mit-license">
|
|
35
35
|
<img height=31 src="https://img.shields.io/badge/License-MIT-orange.svg?logo=internetarchive&logoColor=white&labelColor=464646&style=for-the-badge"></a>
|
|
36
|
-
<a href="https://github.com/adamlui/js-utils/releases/tag/scss-to-css-2.
|
|
37
|
-
<img height=31 src="https://img.shields.io/badge/Latest_Build-2.
|
|
36
|
+
<a href="https://github.com/adamlui/js-utils/releases/tag/scss-to-css-2.4.1">
|
|
37
|
+
<img height=31 src="https://img.shields.io/badge/Latest_Build-2.4.1-44cc11.svg?logo=icinga&logoColor=white&labelColor=464646&style=for-the-badge"></a>
|
|
38
38
|
<a href="https://www.npmjs.com/package/@adamlui/scss-to-css?activeTab=code">
|
|
39
39
|
<img height=31 src="https://img.shields.io/npm/unpacked-size/%40adamlui%2Fscss-to-css?style=for-the-badge&logo=ebox&logoColor=white&color=blue&labelColor=464646"></a>
|
|
40
40
|
<a href="https://sonarcloud.io/component_measures?metric=new_vulnerabilities&id=adamlui_scss-to-css:src/scss-to-css.js">
|
|
41
41
|
<img height=31 src="https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fsonarcloud.io%2Fapi%2Fmeasures%2Fcomponent%3Fcomponent%3Dadamlui_scss-to-css%3Asrc%2Fscss-to-css.js%26metricKeys%3Dvulnerabilities&query=%24.component.measures.0.value&style=for-the-badge&logo=sonarcloud&logoColor=white&labelColor=464646&label=Vulnerabilities&color=gold"></a>
|
|
42
|
-
<a href="https://github.com/toolleeo/cli-apps
|
|
42
|
+
<a href="https://github.com/toolleeo/cli-apps/#conversion">
|
|
43
43
|
<img height=31 src="https://img.shields.io/badge/Mentioned_in-Awesome-ff69b4?logo=awesomelists&logoColor=white&labelColor=464646&style=for-the-badge"></a>
|
|
44
44
|
|
|
45
45
|
<img height=6px width="100%" src="https://assets.scsstocss.org/images/separators/aqua-gradient.png?v=7e4a141">
|
|
@@ -80,7 +80,7 @@ $ scss-to-css
|
|
|
80
80
|
|
|
81
81
|
Sample output:
|
|
82
82
|
|
|
83
|
-
<img src="https://cdn.jsdelivr.net/gh/adamlui/scss-to-css@
|
|
83
|
+
<img src="https://cdn.jsdelivr.net/gh/adamlui/scss-to-css@fe2867e/assets/images/screenshots/cli/scss-to-css-docs-cmd-output.png">
|
|
84
84
|
|
|
85
85
|
**📝 Note:** Source maps are also generated by default unless `-S` or `--no-source-maps` is passed.
|
|
86
86
|
|
|
@@ -324,7 +324,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
|
|
324
324
|
|
|
325
325
|
## 🛠️ Related utilities
|
|
326
326
|
|
|
327
|
-
### [</> minify.js](https://minify-js.org) <a href="https://github.com/toolleeo/cli-apps
|
|
327
|
+
### [</> minify.js](https://minify-js.org) <a href="https://github.com/toolleeo/cli-apps/#programming"><img height=18 src="https://assets.scsstocss.org/images/badges/awesome/badge.svg?v=7e4a141"></a>
|
|
328
328
|
|
|
329
329
|
> Recursively minify all JavaScript files.
|
|
330
330
|
<br>[Install](https://node.minify-js.org/#-installation) /
|
package/dist/cli/index.js
CHANGED
|
@@ -3,19 +3,15 @@
|
|
|
3
3
|
(async () => {
|
|
4
4
|
'use strict'
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
paths: { lib: './lib' }
|
|
10
|
-
}
|
|
11
|
-
env.modes.debug = env.args.some(arg => /^--?(?:V|debug(?:[-_]?mode)?)$/.test(arg))
|
|
6
|
+
// Init ENV
|
|
7
|
+
const init = require('./lib/init')
|
|
8
|
+
init.env()
|
|
12
9
|
|
|
13
10
|
// Import LIBS
|
|
14
|
-
globalThis.log = require(
|
|
15
|
-
const compile = require(
|
|
11
|
+
globalThis.log = require('./lib/log')
|
|
12
|
+
const compile = require('./lib/compile'),
|
|
16
13
|
{ findSCSS } = require('../scss-to-css'),
|
|
17
14
|
fs = require('fs'),
|
|
18
|
-
init = require(`${env.paths.lib}/init`),
|
|
19
15
|
path = require('path')
|
|
20
16
|
|
|
21
17
|
await init.cli()
|
package/dist/cli/lib/init.js
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
const language = require('./language'),
|
|
2
2
|
settings = require('./settings')
|
|
3
3
|
|
|
4
|
-
const dataPath = `../../${ env.modes.dev ? '../' : 'data/' }`
|
|
5
|
-
|
|
6
4
|
module.exports = {
|
|
7
5
|
|
|
8
6
|
async cli() {
|
|
9
|
-
Object.assign(globalThis.cli ??= {}, require(`${
|
|
7
|
+
Object.assign(globalThis.cli ??= {}, require(`${env.paths.libData}/package-data.json`))
|
|
10
8
|
cli.msgs = await language.getMsgs('en')
|
|
11
9
|
cli.msgs = await language.getMsgs(cli.lang = settings.load('uiLang') || (
|
|
12
10
|
env.modes.debug ? language.generateRandomLang({ excludes: ['en'] }) : language.getSysLang() ))
|
|
@@ -27,11 +25,11 @@ module.exports = {
|
|
|
27
25
|
|
|
28
26
|
if (fs.existsSync(paths.target)) // use existing config file
|
|
29
27
|
return log.warn(`${cli.msgs.warn_configFileExists}:`, paths.target)
|
|
30
|
-
if (fs.existsSync(paths.src = path.resolve(__dirname, `${
|
|
28
|
+
if (fs.existsSync(paths.src = path.resolve(__dirname, `${env.paths.libData}/${filename}`)))
|
|
31
29
|
fs.copyFileSync(paths.src, paths.target) // use found template
|
|
32
30
|
|
|
33
31
|
else { // use jsDelivr copy
|
|
34
|
-
const jsdURL = `${require('./jsdelivr').
|
|
32
|
+
const jsdURL = `${require('./jsdelivr').getPkgVerURL()}/${filename}`
|
|
35
33
|
log.data(`${cli.msgs.info_fetchingRemoteConfigFrom} ${jsdURL}...`)
|
|
36
34
|
try {
|
|
37
35
|
const data = require('./data'),
|
|
@@ -45,5 +43,15 @@ module.exports = {
|
|
|
45
43
|
log.success(`${cli.msgs.info_configFileCreated}: ${paths.target}\n`)
|
|
46
44
|
log.tip(`${cli.msgs.tip_editToSetDefaults}.`)
|
|
47
45
|
log.tip(`${cli.msgs.tip_cliArgsPrioritized}.`)
|
|
46
|
+
},
|
|
47
|
+
|
|
48
|
+
env() {
|
|
49
|
+
Object.assign(globalThis.env ??= {}, {
|
|
50
|
+
args: process.argv.slice(2),
|
|
51
|
+
modes: { dev: /[\\/]src(?:[\\/]|$)/i.test(__dirname) },
|
|
52
|
+
supports: { unicode: require('is-unicode-supported').default() }
|
|
53
|
+
})
|
|
54
|
+
env.modes.debug = env.args.some(arg => /^--?(?:V|debug(?:[-_]?mode)?)$/.test(arg))
|
|
55
|
+
env.paths = { libData: `../../${ env.modes.dev ? '..' : 'data' }` }
|
|
48
56
|
}
|
|
49
57
|
}
|
package/dist/cli/lib/jsdelivr.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
module.exports = {
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
getPkgVerURL(version) {
|
|
4
4
|
version ||= cli.version ||= require('./pkg').getVer('local') || 'none'
|
|
5
5
|
const verTag = !/^\d+\.\d+\.\d+$/.test(version) ? 'latest' : `v${version}`
|
|
6
|
-
return `${cli.urls.jsdelivr}@${verTag}`
|
|
6
|
+
return `${cli.urls.jsdelivr.pkg}@${verTag}`
|
|
7
7
|
},
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
getCommitURL(hash = 'latest') { return `${cli.urls.jsdelivr.pkg}@${hash}` }
|
|
10
10
|
}
|
package/dist/cli/lib/language.js
CHANGED
|
@@ -13,13 +13,13 @@ module.exports = {
|
|
|
13
13
|
let locales = includes.length ? includes : (() => {
|
|
14
14
|
|
|
15
15
|
// Read cache if found
|
|
16
|
-
const cacheDir = path.join(__dirname, '
|
|
16
|
+
const cacheDir = path.join(__dirname, '../../.cache'),
|
|
17
17
|
localeCache = path.join(cacheDir, 'locales.json')
|
|
18
18
|
if (fs.existsSync(localeCache))
|
|
19
19
|
try { return JSON.parse(fs.readFileSync(localeCache, 'utf8')) } catch (err) {}
|
|
20
20
|
|
|
21
21
|
// Discover pkg _locales
|
|
22
|
-
const localesDir = path.resolve(
|
|
22
|
+
const localesDir = path.resolve(__dirname, '../../../_locales')
|
|
23
23
|
if (!fs.existsSync(localesDir)) return ['en']
|
|
24
24
|
const locales = fs.readdirSync(localesDir, { withFileTypes: true })
|
|
25
25
|
.filter(entry => entry.isDirectory()).map(entry => entry.name)
|
|
@@ -37,9 +37,7 @@ module.exports = {
|
|
|
37
37
|
locales = locales.filter(locale => !excludeSet.has(locale))
|
|
38
38
|
|
|
39
39
|
// Get random language
|
|
40
|
-
|
|
41
|
-
if (locales.length)
|
|
42
|
-
randomLang = locales[Math.floor(Math.random() * locales.length)]
|
|
40
|
+
const randomLang = locales.length ? locales[Math.floor(Math.random() * locales.length)] : 'en'
|
|
43
41
|
log.debug(`Random language: ${randomLang}`)
|
|
44
42
|
|
|
45
43
|
return randomLang
|
|
@@ -47,7 +45,7 @@ module.exports = {
|
|
|
47
45
|
|
|
48
46
|
async getDocLocales() {
|
|
49
47
|
cli.version ||= require('./pkg').getVer('local') || 'none'
|
|
50
|
-
const jsdURL = `${require('./jsdelivr').
|
|
48
|
+
const jsdURL = `${require('./jsdelivr').getPkgVerURL()}/docs/`,
|
|
51
49
|
locales = []
|
|
52
50
|
try {
|
|
53
51
|
const respText = await (await data.fetch(jsdURL)).text(),
|
|
@@ -64,20 +62,29 @@ module.exports = {
|
|
|
64
62
|
if (env.msgs && langCode == cli.lang) return env.msgs // don't re-fetch same msgs
|
|
65
63
|
|
|
66
64
|
let msgs = data.flatten( // local ones
|
|
67
|
-
require(`../../${ env.modes.dev ? '../_locales/en
|
|
65
|
+
require(`../../${ env.modes.dev ? '../_locales/en' : 'data' }/messages.json`))
|
|
68
66
|
|
|
69
67
|
if (!langCode.startsWith('en')) { // fetch non-English msgs from jsDelivr
|
|
70
|
-
|
|
71
|
-
|
|
68
|
+
try { // check if terminal supports non-Latin scripts
|
|
69
|
+
const nonLatinLocales = await (await data.fetch(
|
|
70
|
+
`${cli.urls.jsdelivr.jsutils}@${cli.commitHashes.data}/assets/data/non-latin-locales.json`
|
|
71
|
+
)).json()
|
|
72
|
+
if (nonLatinLocales.includes(langCode.split('-')[0]) && !env.supports.unicode)
|
|
73
|
+
return msgs // en ones
|
|
74
|
+
} catch (err) {
|
|
75
|
+
log.debug(`Failed to fetch non-Latin locales: ${err}`)
|
|
76
|
+
}
|
|
77
|
+
const msgBaseURL = `${require('./jsdelivr').getCommitURL(cli.commitHashes.locales)}/_locales`
|
|
78
|
+
let msgURL = `${msgBaseURL}/${langCode}/messages.json`, msgFetchesTried = 0
|
|
72
79
|
while (msgFetchesTried < 3)
|
|
73
80
|
try { // fetch remote msgs
|
|
74
|
-
msgs = data.flatten(await (await data.fetch(
|
|
81
|
+
msgs = data.flatten(await (await data.fetch(msgURL)).json())
|
|
75
82
|
break
|
|
76
83
|
} catch (err) { // retry up to 2X (region-stripped + EN)
|
|
77
84
|
msgFetchesTried++ ; if (msgFetchesTried >= 3) break
|
|
78
|
-
log.debug(
|
|
79
|
-
|
|
80
|
-
: `${
|
|
85
|
+
log.debug(msgURL = langCode.includes('-') && msgFetchesTried == 1 ?
|
|
86
|
+
msgURL.replace(/([^_]*)_[^/]*(\/.*)/, '$1$2') // strip region before retrying
|
|
87
|
+
: `${msgBaseURL}/en/messages.json` // else use EN msgs
|
|
81
88
|
)
|
|
82
89
|
}
|
|
83
90
|
}
|
package/dist/cli/lib/log.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const colors = require('./color'),
|
|
2
2
|
{ getDownloads, getVer } = require('./pkg'),
|
|
3
|
+
settings = require('./settings'),
|
|
3
4
|
string = require('./string')
|
|
4
5
|
|
|
5
6
|
const nextMajVer = require('../../../package.json').version.replace(/^(\d+)\..*/, (_, major) => `${ +major +1 }.0.0`)
|
|
@@ -7,6 +8,7 @@ const nextMajVer = require('../../../package.json').version.replace(/^(\d+)\..*/
|
|
|
7
8
|
module.exports = {
|
|
8
9
|
colors,
|
|
9
10
|
|
|
11
|
+
break() { console.log() },
|
|
10
12
|
configURL() { this.info(`${cli.msgs.info_exampleValidConfigFile}: ${cli.urls.config}`) },
|
|
11
13
|
configURLandExit(...args) { this.error(...args); this.configURL(); process.exit(1) },
|
|
12
14
|
data(msg) { console.log(`\n${colors.bw}${msg}${colors.nc}`) },
|
|
@@ -15,9 +17,8 @@ module.exports = {
|
|
|
15
17
|
errorAndExit(...args) { this.error(...args); this.helpDocsCmdsDocsURL(); process.exit(1) },
|
|
16
18
|
ifNotQuiet(msg) { if (!cli.config.quietMode) this.info(msg) },
|
|
17
19
|
info(msg) { console.info(`\n${colors.schemes.default[0]}${msg}${colors.nc}`) },
|
|
18
|
-
break() { console.log() },
|
|
19
|
-
tip(msg) { console.info(`${colors.by}TIP: ${msg}${colors.nc}`) },
|
|
20
20
|
success(msg) { console.log(`\n${colors.bg}${msg}${colors.nc}`) },
|
|
21
|
+
tip(msg) { console.info(`${colors.by}TIP: ${msg}${colors.nc}`) },
|
|
21
22
|
warn(...args) { console.warn(`\n${colors.bo}WARNING:`, ...args, colors.nc) },
|
|
22
23
|
|
|
23
24
|
argDoesNothing(arg) {
|
|
@@ -30,11 +31,10 @@ module.exports = {
|
|
|
30
31
|
this.warn(
|
|
31
32
|
`${cli.msgs.info_configFile} ${cli.msgs.warn_option.toLowerCase()} '${oldKey}: ${oldVal}' ${
|
|
32
33
|
cli.msgs.warn_hasBeenReplacedBy} '${
|
|
33
|
-
newKey}: ${ isNegKey(oldKey) != isNegKey(newKey) ? !oldVal : oldVal }' ${
|
|
34
|
+
newKey}: ${ settings.isNegKey(oldKey) != settings.isNegKey(newKey) ? !oldVal : oldVal }' ${
|
|
34
35
|
cli.msgs.warn_andWillBeRemoved} @ v${nextMajVer}`
|
|
35
36
|
)
|
|
36
37
|
this[`${oldKey}Warned`] = true
|
|
37
|
-
function isNegKey(key) { return /^(?:no|disable|exclude)[A-Z]/.test(key) }
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
40
|
|
package/dist/cli/lib/settings.js
CHANGED
|
@@ -43,12 +43,14 @@ module.exports = {
|
|
|
43
43
|
type: 'cmd', regex: /^--?stats?$/ }
|
|
44
44
|
},
|
|
45
45
|
|
|
46
|
+
isNegKey(key) { return /^(?:no|disable|exclude)[A-Z]/.test(key) },
|
|
47
|
+
|
|
46
48
|
load(ctrlKeys = Object.keys(this.controls)) {
|
|
47
49
|
const inputCtrlKeys = [].concat(ctrlKeys) // force array
|
|
48
50
|
|
|
49
51
|
if (!cli.defaultsSet && !arguments.length) { // init all defaults on arg-less load()
|
|
50
52
|
inputCtrlKeys.forEach(key => {
|
|
51
|
-
const ctrl = this.controls[key] ; if (ctrl.mode ||
|
|
53
|
+
const ctrl = this.controls[key] ; if (ctrl.mode || key.startsWith('legacy_')) return
|
|
52
54
|
cli.config[key] ??= ctrl.defaultVal ?? ( ctrl.type == 'param' ? '' : false )
|
|
53
55
|
})
|
|
54
56
|
cli.defaultsSet = true
|
|
@@ -87,8 +89,8 @@ module.exports = {
|
|
|
87
89
|
if (this.configFileKeyWhitelist && !this.configFileKeyWhitelist.includes(key))
|
|
88
90
|
log.invalidConfigKey(key)
|
|
89
91
|
return
|
|
90
|
-
} else if (
|
|
91
|
-
if (
|
|
92
|
+
} else if (key.startsWith('legacy_') && ctrl.replacedBy) {
|
|
93
|
+
if (this.isNegKey(key) != this.isNegKey(ctrl.replacedBy))
|
|
92
94
|
cli.config[ctrl.replacedBy] = !val // assign opposite val to current key
|
|
93
95
|
else // assign direct val to current key
|
|
94
96
|
cli.config[ctrl.replacedBy] = val
|
|
@@ -106,8 +108,8 @@ module.exports = {
|
|
|
106
108
|
const ctrlKey = Object.keys(this.controls).find(key => this.controls[key]?.regex?.test(arg))
|
|
107
109
|
if (!ctrlKey && cli.msgs) log.errorAndExit(`[${arg}] ${cli.msgs.error_notRecognized}.`)
|
|
108
110
|
if (!inputCtrlKeys.includes(ctrlKey)) return // don't process env.args when load() specific keys
|
|
111
|
+
if (ctrlKey.startsWith('legacy_')) { log.argDoesNothing(arg) ; continue }
|
|
109
112
|
const ctrl = this.controls[ctrlKey]
|
|
110
|
-
if (ctrl.type == 'legacy') { log.argDoesNothing(arg) ; continue }
|
|
111
113
|
if (ctrl.mode) // set cli.config.mode to mode name
|
|
112
114
|
cli.config.mode = ctrlKey.replace(/mode$/i, '').toLowerCase()
|
|
113
115
|
else { // init flag/param/cmd cli.config[ctrlKey] val
|
|
@@ -8,11 +8,15 @@
|
|
|
8
8
|
"config": "https://github.com/adamlui/scss-to-css/blob/main/scss-to-css.config.mjs",
|
|
9
9
|
"docs": "https://github.com/adamlui/scss-to-css/tree/main/docs",
|
|
10
10
|
"github": "https://github.com/adamlui/scss-to-css",
|
|
11
|
-
"jsdelivr":
|
|
11
|
+
"jsdelivr": {
|
|
12
|
+
"jsutils": "https://cdn.jsdelivr.net/gh/adamlui/js-utils",
|
|
13
|
+
"pkg": "https://cdn.jsdelivr.net/gh/adamlui/scss-to-css"
|
|
14
|
+
},
|
|
12
15
|
"npm": "https://www.npmjs.com/package/@adamlui/scss-to-css",
|
|
13
16
|
"src": "https://github.com/adamlui/scss-to-css/tree/main/src"
|
|
14
17
|
},
|
|
15
18
|
"commitHashes": {
|
|
16
|
-
"
|
|
19
|
+
"data": "e7b36d1",
|
|
20
|
+
"locales": "fd35208"
|
|
17
21
|
}
|
|
18
22
|
}
|
package/dist/scss-to-css.js
CHANGED
|
@@ -7,7 +7,7 @@ const fs = require('fs'),
|
|
|
7
7
|
sass = require('sass')
|
|
8
8
|
|
|
9
9
|
Object.assign(globalThis.api ??= {},
|
|
10
|
-
require(`${ /[\\/]src(?:[\\/]|$)/i.test(__dirname) ? '
|
|
10
|
+
require(`${ /[\\/]src(?:[\\/]|$)/i.test(__dirname) ? '..' : './data' }/package-data.json`))
|
|
11
11
|
api.regex = {
|
|
12
12
|
compile: /^(?:build|comp(?:ile|ress)|minify)$/i,
|
|
13
13
|
findSCSS: /^(?:find|search)(?:scss)?$/i
|
package/docs/README.md
CHANGED
|
@@ -8,19 +8,19 @@
|
|
|
8
8
|
<img height=14 src="https://assets.scsstocss.org/images/icons/earth/black/icon32.svg?v=7e4a141">
|
|
9
9
|
</picture>
|
|
10
10
|
English |
|
|
11
|
-
<a href="https://github.com/adamlui/scss-to-css/tree/main/docs/zh-cn
|
|
12
|
-
<a href="https://github.com/adamlui/scss-to-css/tree/main/docs/zh-tw
|
|
13
|
-
<a href="https://github.com/adamlui/scss-to-css/tree/main/docs/ja
|
|
14
|
-
<a href="https://github.com/adamlui/scss-to-css/tree/main/docs/hi
|
|
15
|
-
<a href="https://github.com/adamlui/scss-to-css/tree/main/docs/bn
|
|
16
|
-
<a href="https://github.com/adamlui/scss-to-css/tree/main/docs/mr
|
|
17
|
-
<a href="https://github.com/adamlui/scss-to-css/tree/main/docs/pa
|
|
18
|
-
<a href="https://github.com/adamlui/scss-to-css/tree/main/docs/de
|
|
19
|
-
<a href="https://github.com/adamlui/scss-to-css/tree/main/docs/es
|
|
20
|
-
<a href="https://github.com/adamlui/scss-to-css/tree/main/docs/fr
|
|
21
|
-
<a href="https://github.com/adamlui/scss-to-css/tree/main/docs/it
|
|
22
|
-
<a href="https://github.com/adamlui/scss-to-css/tree/main/docs/nl
|
|
23
|
-
<a href="https://github.com/adamlui/scss-to-css/tree/main/docs/pt
|
|
11
|
+
<a href="https://github.com/adamlui/scss-to-css/tree/main/docs/zh-cn/#readme">简体中文</a> |
|
|
12
|
+
<a href="https://github.com/adamlui/scss-to-css/tree/main/docs/zh-tw/#readme">繁體中文</a> |
|
|
13
|
+
<a href="https://github.com/adamlui/scss-to-css/tree/main/docs/ja/#readme">日本語</a> |
|
|
14
|
+
<a href="https://github.com/adamlui/scss-to-css/tree/main/docs/hi/#readme">हिंदी</a> |
|
|
15
|
+
<a href="https://github.com/adamlui/scss-to-css/tree/main/docs/bn/#readme">বাংলা</a> |
|
|
16
|
+
<a href="https://github.com/adamlui/scss-to-css/tree/main/docs/mr/#readme">मराठी</a> |
|
|
17
|
+
<a href="https://github.com/adamlui/scss-to-css/tree/main/docs/pa/#readme">ਪੰਜਾਬੀ</a> |
|
|
18
|
+
<a href="https://github.com/adamlui/scss-to-css/tree/main/docs/de/#readme">Deutsch</a> |
|
|
19
|
+
<a href="https://github.com/adamlui/scss-to-css/tree/main/docs/es/#readme">Español</a> |
|
|
20
|
+
<a href="https://github.com/adamlui/scss-to-css/tree/main/docs/fr/#readme">Français</a> |
|
|
21
|
+
<a href="https://github.com/adamlui/scss-to-css/tree/main/docs/it/#readme">Italiano</a> |
|
|
22
|
+
<a href="https://github.com/adamlui/scss-to-css/tree/main/docs/nl/#readme">Nederlands</a> |
|
|
23
|
+
<a href="https://github.com/adamlui/scss-to-css/tree/main/docs/pt/#readme">Português</a>
|
|
24
24
|
</h6>
|
|
25
25
|
</td>
|
|
26
26
|
</table>
|
|
@@ -29,17 +29,17 @@
|
|
|
29
29
|
|
|
30
30
|
### Recursively compile all SCSS files into minified CSS
|
|
31
31
|
|
|
32
|
-
<a href="https://
|
|
32
|
+
<a href="https://npmstar.com/compare/@adamlui%2Fscss-to-css">
|
|
33
33
|
<img height=31 src="https://img.shields.io/npm/dm/%40adamlui%2Fscss-to-css?logo=npm&color=af68ff&logoColor=white&labelColor=464646&style=for-the-badge"></a>
|
|
34
34
|
<a href="#%EF%B8%8F-mit-license">
|
|
35
35
|
<img height=31 src="https://img.shields.io/badge/License-MIT-orange.svg?logo=internetarchive&logoColor=white&labelColor=464646&style=for-the-badge"></a>
|
|
36
|
-
<a href="https://github.com/adamlui/js-utils/releases/tag/scss-to-css-2.
|
|
37
|
-
<img height=31 src="https://img.shields.io/badge/Latest_Build-2.
|
|
36
|
+
<a href="https://github.com/adamlui/js-utils/releases/tag/scss-to-css-2.4.1">
|
|
37
|
+
<img height=31 src="https://img.shields.io/badge/Latest_Build-2.4.1-44cc11.svg?logo=icinga&logoColor=white&labelColor=464646&style=for-the-badge"></a>
|
|
38
38
|
<a href="https://www.npmjs.com/package/@adamlui/scss-to-css?activeTab=code">
|
|
39
39
|
<img height=31 src="https://img.shields.io/npm/unpacked-size/%40adamlui%2Fscss-to-css?style=for-the-badge&logo=ebox&logoColor=white&color=blue&labelColor=464646"></a>
|
|
40
40
|
<a href="https://sonarcloud.io/component_measures?metric=new_vulnerabilities&id=adamlui_scss-to-css:src/scss-to-css.js">
|
|
41
41
|
<img height=31 src="https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fsonarcloud.io%2Fapi%2Fmeasures%2Fcomponent%3Fcomponent%3Dadamlui_scss-to-css%3Asrc%2Fscss-to-css.js%26metricKeys%3Dvulnerabilities&query=%24.component.measures.0.value&style=for-the-badge&logo=sonarcloud&logoColor=white&labelColor=464646&label=Vulnerabilities&color=gold"></a>
|
|
42
|
-
<a href="https://github.com/toolleeo/cli-apps
|
|
42
|
+
<a href="https://github.com/toolleeo/cli-apps/#conversion">
|
|
43
43
|
<img height=31 src="https://img.shields.io/badge/Mentioned_in-Awesome-ff69b4?logo=awesomelists&logoColor=white&labelColor=464646&style=for-the-badge"></a>
|
|
44
44
|
|
|
45
45
|
<img height=6px width="100%" src="https://assets.scsstocss.org/images/separators/aqua-gradient.png?v=7e4a141">
|
|
@@ -80,7 +80,7 @@ $ scss-to-css
|
|
|
80
80
|
|
|
81
81
|
Sample output:
|
|
82
82
|
|
|
83
|
-
<img src="https://cdn.jsdelivr.net/gh/adamlui/scss-to-css@
|
|
83
|
+
<img src="https://cdn.jsdelivr.net/gh/adamlui/scss-to-css@fe2867e/assets/images/screenshots/cli/scss-to-css-docs-cmd-output.png">
|
|
84
84
|
|
|
85
85
|
**📝 Note:** Source maps are also generated by default unless `-S` or `--no-source-maps` is passed.
|
|
86
86
|
|
|
@@ -324,7 +324,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
|
|
324
324
|
|
|
325
325
|
## 🛠️ Related utilities
|
|
326
326
|
|
|
327
|
-
### [</> minify.js](https://minify-js.org) <a href="https://github.com/toolleeo/cli-apps
|
|
327
|
+
### [</> minify.js](https://minify-js.org) <a href="https://github.com/toolleeo/cli-apps/#programming"><img height=18 src="https://assets.scsstocss.org/images/badges/awesome/badge.svg?v=7e4a141"></a>
|
|
328
328
|
|
|
329
329
|
> Recursively minify all JavaScript files.
|
|
330
330
|
<br>[Install](https://node.minify-js.org/#-installation) /
|
package/docs/SECURITY.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adamlui/scss-to-css",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.1",
|
|
4
4
|
"description": "Recursively compile all SCSS files into minified CSS",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Adam Lui",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"!docs/*/"
|
|
35
35
|
],
|
|
36
36
|
"bin": {
|
|
37
|
-
"
|
|
38
|
-
"
|
|
37
|
+
"scss-to-css": "dist/cli/index.js",
|
|
38
|
+
"scsstocss": "dist/cli/index.js"
|
|
39
39
|
},
|
|
40
40
|
"directories": {
|
|
41
41
|
"lib": "./dist",
|
|
@@ -79,18 +79,19 @@
|
|
|
79
79
|
"url": "https://github.com/adamlui/scss-to-css/issues"
|
|
80
80
|
},
|
|
81
81
|
"dependencies": {
|
|
82
|
+
"is-unicode-supported": "^2.1.0",
|
|
82
83
|
"node-clipboardy": "^1.0.3",
|
|
83
|
-
"sass": "^1.
|
|
84
|
+
"sass": "^1.98.0"
|
|
84
85
|
},
|
|
85
86
|
"devDependencies": {
|
|
86
|
-
"@eslint/json": "^1.0
|
|
87
|
+
"@eslint/json": "^1.1.0",
|
|
87
88
|
"@eslint/markdown": "^7.5.1",
|
|
88
|
-
"@stylistic/eslint-plugin": "^5.
|
|
89
|
+
"@stylistic/eslint-plugin": "^5.10.0",
|
|
89
90
|
"console-table-printer": "^2.15.0",
|
|
90
91
|
"copyfiles": "^2.4.1",
|
|
91
|
-
"eslint": "^9.39.
|
|
92
|
+
"eslint": "^9.39.4",
|
|
92
93
|
"eslint-plugin-import": "^2.32.0",
|
|
93
|
-
"eslint-plugin-regexp": "^3.
|
|
94
|
+
"eslint-plugin-regexp": "^3.1.0",
|
|
94
95
|
"husky": "^9.1.7"
|
|
95
96
|
}
|
|
96
97
|
}
|