@adamlui/scss-to-css 1.6.0 → 1.7.0

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 CHANGED
@@ -6,17 +6,21 @@
6
6
  </picture>
7
7
  &nbsp;English |
8
8
  <a href="https://github.com/adamlui/js-utils/tree/main/scss-to-css/docs/zh-cn#readme">简体中文</a> |
9
- <a href="https://github.com/adamlui/js-utils/tree/main/scss-to-css/docs/zh-tw#readme">繁體中文</a>
9
+ <a href="https://github.com/adamlui/js-utils/tree/main/scss-to-css/docs/zh-tw#readme">繁體中文</a> |
10
+ <a href="https://github.com/adamlui/js-utils/tree/main/scss-to-css/docs/hi#readme">हिंदी</a> |
11
+ <a href="https://github.com/adamlui/js-utils/tree/main/scss-to-css/docs/bn#readme">বাংলা</a> |
12
+ <a href="https://github.com/adamlui/js-utils/tree/main/scss-to-css/docs/mr#readme">मराठी</a> |
13
+ <a href="https://github.com/adamlui/js-utils/tree/main/scss-to-css/docs/pa#readme">ਪੰਜਾਬੀ</a>
10
14
  </h6>
11
15
  </div>
12
16
 
13
- # { } scss-to-css.js
17
+ # { } scss-to-css
14
18
 
15
19
  ### Recursively compile all SCSS files into minified CSS.
16
20
 
17
- <a href="https://www.npmjs.com/package/@adamlui/scss-to-css"><img height=31 src="https://img.shields.io/npm/dt/%40adamlui%2Fscss-to-css?logo=npm&logoColor=white&labelColor=464646&style=for-the-badge"></a>
18
- <a href="#%EF%B8%8F-mit-license"><img height=31 src="https://img.shields.io/badge/License-MIT-red.svg?logo=internetarchive&logoColor=white&labelColor=464646&style=for-the-badge"></a>
19
- <a href="https://www.npmjs.com/package/@adamlui/scss-to-css?activeTab=versions"><img height=31 src="https://img.shields.io/badge/Latest_Build-1.6.0-fc7811.svg?logo=icinga&logoColor=white&labelColor=464646&style=for-the-badge"></a>
21
+ <a href="https://www.npmjs.com/package/@adamlui/scss-to-css"><img height=31 src="https://img.shields.io/npm/dt/%40adamlui%2Fscss-to-css?logo=npm&color=af68ff&logoColor=white&labelColor=464646&style=for-the-badge"></a>
22
+ <a href="#%EF%B8%8F-mit-license"><img height=31 src="https://img.shields.io/badge/License-MIT-orange.svg?logo=internetarchive&logoColor=white&labelColor=464646&style=for-the-badge"></a>
23
+ <a href="https://www.npmjs.com/package/@adamlui/scss-to-css?activeTab=versions"><img height=31 src="https://img.shields.io/badge/Latest_Build-1.7.0-44cc11.svg?logo=icinga&logoColor=white&labelColor=464646&style=for-the-badge"></a>
20
24
  <a href="https://www.npmjs.com/package/@adamlui/scss-to-css?activeTab=code"><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>
21
25
  <a href="https://sonarcloud.io/component_measures?metric=new_vulnerabilities&id=adamlui_js-utils:scss-to-css/scss-to-css.js"><img height=31 src="https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fsonarcloud.io%2Fapi%2Fmeasures%2Fcomponent%3Fcomponent%3Dadamlui_js-utils%3Ascss-to-css%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>
22
26
 
@@ -27,28 +31,27 @@
27
31
  As a **global utility**:
28
32
 
29
33
  ```
30
- npm install -g @adamlui/scss-to-css
34
+ $ npm install -g @adamlui/scss-to-css
31
35
  ```
32
36
 
33
- As a **dev dependency** (e.g. for build scripts):
37
+ As a **dev dependency** (e.g. for build scripts), from your project root:
34
38
 
35
39
  ```
36
- npm install -D @adamlui/scss-to-css
40
+ $ npm install -D @adamlui/scss-to-css
37
41
  ```
38
42
 
39
-
40
- As a **runtime dependency** (e.g. for on-the-fly compilation):
43
+ As a **runtime dependency** (e.g. for on-the-fly compilation), from your project root:
41
44
 
42
45
  ```
43
- npm install @adamlui/scss-to-css
46
+ $ npm install @adamlui/scss-to-css
44
47
  ```
45
48
 
46
- ## 💻 Usage
49
+ ## 💻 Command line usage
47
50
 
48
51
  The basic **global command** is:
49
52
 
50
53
  ```
51
- scss-to-css
54
+ $ scss-to-css
52
55
  ```
53
56
 
54
57
  Sample output:
@@ -62,7 +65,7 @@ Sample output:
62
65
  To specify **input/output** paths:
63
66
 
64
67
  ```
65
- scss-to-css [input_path] [output_path]
68
+ $ scss-to-css [input_path] [output_path]
66
69
  ```
67
70
 
68
71
  - `[input_path]`: Path to SCSS file or directory containing SCSS files to be compiled, relative to the current working directory.
@@ -88,25 +91,25 @@ Replace `<scss-to-css-cmd>` with `scss-to-css` + optional args. Then, `npm run b
88
91
  Compile all SCSS files in the **current directory** (outputs to `css/`):
89
92
 
90
93
  ```
91
- scss-to-css
94
+ $ scss-to-css
92
95
  ```
93
96
 
94
97
  Compile all SCSS files in a **specific directory** (outputs to `path/to/your/directory/css/`):
95
98
 
96
99
  ```
97
- scss-to-css path/to/your/directory
100
+ $ scss-to-css path/to/your/directory
98
101
  ```
99
102
 
100
103
  Compile a **specific file** (outputs to `path/to/your/css/file.min.css`):
101
104
 
102
105
  ```
103
- scss-to-css path/to/your/file.scss
106
+ $ scss-to-css path/to/your/file.scss
104
107
  ```
105
108
 
106
109
  Specify both **input and output** directories (outputs to `output_folder/`):
107
110
 
108
111
  ```
109
- scss-to-css input_folder output_folder
112
+ $ scss-to-css input_folder output_folder
110
113
  ```
111
114
 
112
115
  **💡 Note:** Output CSS is minified unless `-M` or `--no-minify` is passed.
@@ -145,33 +148,35 @@ import * as scssToCSS from '@adamlui/scss-to-css';
145
148
  const scssToCSS = require('@adamlui/scss-to-css');
146
149
  ```
147
150
 
148
- ### compile(inputPath, options)
151
+ ### `compile(inputPath[, options])`
149
152
 
150
- This function compiles SCSS found in the `inputPath` provided into CSS data.
153
+ Compiles SCSS found in the `inputPath` provided into CSS data.
151
154
 
152
155
  If a **file path** is passed, the file's code is compiled to CSS, then an object containing `srcPath` + `code` + `error` is returned:
153
156
 
154
157
  ```js
155
158
  const compileResult = scssToCSS.compile('assets/style.scss');
156
- console.log(compileResult.error); // runtime error, or `undefined` if no error
157
- console.log(compileResult.code); // compiled CSS output of assets/style.scss
159
+
160
+ console.log(compileResult.error); // outputs runtime error, or `undefined` if no error
161
+ console.log(compileResult.code); // outputs compiled CSS from assets/style.scss
158
162
  ```
159
163
 
160
164
  If a **directory path** is passed, SCSS files are searched for (recursively by default), each one's code is loaded then compiled, then an array of objects containing `srcPath` + `code` + `error` is returned:
161
165
 
162
166
  ```js
167
+ // Outputs paths to SCSS files in working directory + all nested directories
163
168
  const results = scssToCSS.compile('.');
164
- results.forEach(result =>
165
- console.log(result.srcPath) // paths to SCSS files in working directory + all nested directories
166
- );
167
- console.log(results[1].code); // compiled CSS output of 2nd SCSS file if found, or `undefined` if not found
169
+ results.forEach(result => console.log(result.srcPath));
170
+
171
+ // Outputs compiled CSS from 2nd SCSS file if found, or `undefined` if not found
172
+ console.log(results[1].code);
168
173
  ```
169
174
 
170
175
  Options are boolean, passed as object properties. For example:
171
176
 
172
177
  ```js
178
+ // Returns array of data objects where `.code` contains unminified CSS
173
179
  scssToCSS.compile(inputDir, { minify: false });
174
- // returns data objects where `.code` contains unminified CSS
175
180
  ```
176
181
 
177
182
  Possible parameters (and their default settings) are:
@@ -185,15 +190,15 @@ Possible parameters (and their default settings) are:
185
190
  sourceMaps (true) Generate CSS source maps.
186
191
  ```
187
192
 
188
- ### findSCSS(searchDir, options)
193
+ ### `findSCSS(searchDir[, options])`
189
194
 
190
- This function searches for all SCSS files within the `searchDir` string passed (useful for discovering what files [`compile()`](#compileinputpath-options) will process) and returns an array containing their filepaths.
195
+ Searches for all SCSS files within the `searchDir` string passed (useful for discovering what files [`compile()`](#compileinputpath-options) will process) and returns an array containing their filepaths.
191
196
 
192
197
  Options are boolean, passed as object properties. For example:
193
198
 
194
199
  ```js
200
+ // Returns array containing filepaths to SCSS files in exactly `searchDir`
195
201
  scssToCSS.findSCSS(searchDir, { recursive: false });
196
- // returns array containing filepaths to SCSS files in exactly `searchDir`
197
202
  ```
198
203
 
199
204
  Possible parameters (and their default settings) are:
@@ -201,7 +206,7 @@ Possible parameters (and their default settings) are:
201
206
  ```
202
207
  recursive (true) Recursively search for nested files if dir path
203
208
  passed.
204
- verbose (false) Show logging in console/terminal.
209
+ verbose (true) Show logging in console/terminal.
205
210
  dotFolders (false) Include dotfolders in file search.
206
211
  ```
207
212
 
@@ -209,12 +214,12 @@ Possible parameters (and their default settings) are:
209
214
 
210
215
  ## 💖 Support
211
216
 
212
- Please consider [giving a GitHub ⭐](https://github.com/adamlui/js-utils) if this helped you!
217
+ Please consider [giving a GitHub ⭐](https://github.com/adamlui/js-utils) or [funding](https://github.com/sponsors/adamlui) this project if it helped you!
213
218
  <br><br>
214
219
 
215
220
  ## 🏛️ MIT License
216
221
 
217
- **Copyright © 2024 [Adam Lui](https://github.com/adamlui)**
222
+ **Copyright © 2024 [Adam Lui](https://github.com/adamlui) & contributors**
218
223
 
219
224
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
220
225
 
@@ -228,4 +233,4 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
228
233
 
229
234
  <a href="https://github.com/adamlui/js-utils">**Home**</a> /
230
235
  <a href="https://github.com/adamlui/js-utils/discussions">Discuss</a> /
231
- <a href="#--scss-to-cssjs">Back to top ↑</a>
236
+ <a href="#--scss-to-css">Back to top ↑</a>
package/docs/LICENSE.md CHANGED
@@ -6,13 +6,17 @@
6
6
  </picture>
7
7
  &nbsp;English |
8
8
  <a href="zh-cn/LICENSE.md">简体中文</a> |
9
- <a href="zh-tw/LICENSE.md">繁體中文</a>
9
+ <a href="zh-tw/LICENSE.md">繁體中文</a> |
10
+ <a href="hi/LICENSE.md">हिंदी</a> |
11
+ <a href="bn/LICENSE.md">বাংলা</a> |
12
+ <a href="mr/LICENSE.md">मराठी</a> |
13
+ <a href="pa/LICENSE.md">ਪੰਜਾਬੀ</a>
10
14
  </h6>
11
15
  </div>
12
16
 
13
17
  # 🏛️ MIT License
14
18
 
15
- **Copyright © 2024 [Adam Lui](https://github.com/adamlui)**
19
+ **Copyright © 2024 [Adam Lui](https://github.com/adamlui) & contributors**
16
20
 
17
21
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
18
22
 
package/docs/SECURITY.md CHANGED
@@ -6,7 +6,11 @@
6
6
  </picture>
7
7
  &nbsp;English |
8
8
  <a href="zh-cn/SECURITY.md">简体中文</a> |
9
- <a href="zh-tw/SECURITY.md">繁體中文</a>
9
+ <a href="zh-tw/SECURITY.md">繁體中文</a> |
10
+ <a href="hi/SECURITY.md">हिंदी</a> |
11
+ <a href="bn/SECURITY.md">বাংলা</a> |
12
+ <a href="mr/SECURITY.md">मराठी</a> |
13
+ <a href="pa/SECURITY.md">ਪੰਜਾਬੀ</a>
10
14
  </h6>
11
15
  </div>
12
16
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adamlui/scss-to-css",
3
- "version": "1.6.0",
3
+ "version": "1.7.0",
4
4
  "description": "Recursively compile all SCSS files into minified CSS",
5
5
  "author": {
6
6
  "name": "Adam Lui",
@@ -29,17 +29,19 @@
29
29
  },
30
30
  "keywords": [
31
31
  "scss",
32
+ "compiler",
33
+ "minifier",
34
+ "cli",
35
+ "api",
32
36
  "sass",
33
37
  "css",
34
- "stylesheets",
35
- "compiler",
36
- "minifier"
38
+ "stylesheets"
37
39
  ],
38
40
  "bugs": {
39
41
  "url": "https://github.com/adamlui/js-utils/issues"
40
42
  },
41
43
  "dependencies": {
42
- "sass": "^1.71.1"
44
+ "sass": "^1.72.0"
43
45
  },
44
46
  "funding": {
45
47
  "type": "github",
package/scss-to-css.js CHANGED
@@ -8,29 +8,45 @@ const fs = require('fs'),
8
8
  // Define MAIN functions
9
9
 
10
10
  function findSCSS(searchDir, options = {}) {
11
- const defaultOptions = { recursive: true, verbose: false, dotFolders: false };
12
- options = { ...defaultOptions, ...options };
11
+
12
+ // Init options
13
+ const defaultOptions = { recursive: true, verbose: true, dotFolders: false };
14
+ options = { ...defaultOptions, ...options };
15
+
16
+ // Search for SCSS
13
17
  const dirFiles = fs.readdirSync(searchDir), scssFiles = [];
18
+ if (options.verbose && !options.isRecursing) console.info('\nSearching for SCSS files...');
14
19
  dirFiles.forEach(file => {
15
20
  const filePath = path.resolve(searchDir, file);
16
- if (fs.statSync(filePath).isDirectory() && file != 'node_modules' &&
17
- (options.dotFolders || !file.startsWith('.')) && options.recursive) {
18
- if (options.verbose) console.info(`Searching for SCSS files in: ${filePath}...`);
21
+ if (fs.statSync(filePath).isDirectory() && file != 'node_modules'
22
+ && (options.dotFolders || !file.startsWith('.')) && options.recursive)
19
23
  scssFiles.push( // recursively find SCSS in eligible dir
20
24
  ...findSCSS(filePath, { ...options, isRecursing: true }));
21
- } else if (file.endsWith('.scss')) // SCSS file found
25
+ else if (file.endsWith('.scss')) // SCSS file found
22
26
  scssFiles.push(filePath); // store it for compilation
23
27
  });
24
- if (options.isRecursing || scssFiles.length > 0) return scssFiles;
25
- else console.info('\nNo SCSS files found.');
28
+
29
+ // Log/return final result
30
+ if (!options.isRecursing && options.verbose) {
31
+ console.info('Search complete. '
32
+ + ( scssFiles.length === 0 ? 'No' : scssFiles.length )
33
+ + ` file${ scssFiles.length > 1 ? 's' : '' } found.`);
34
+ }
35
+ return options.isRecursing || scssFiles.length > 0 ? scssFiles : [];
26
36
  }
27
37
 
28
38
  function compile(inputPath, options = {}) {
39
+
40
+ // Init options
29
41
  const defaultOptions = { minify: true, sourceMaps: true, recursive: true, verbose: true, dotFolders: false };
30
42
  options = { ...defaultOptions, ...options };
43
+
44
+ // Validate inputPath
31
45
  if (typeof inputPath !== 'string')
32
46
  return console.error('ERROR:'
33
47
  + ' First argument must be a string representing a file/folder path.');
48
+
49
+ // Compile SCSS based on inputPath
34
50
  const compileOptions = { style: options.minify ? 'compressed' : 'expanded', sourceMap: options.sourceMaps };
35
51
  if (fs.existsSync(inputPath)) { // compile based on path arg
36
52
  if (inputPath.endsWith('.scss')) { // file path passed
@@ -40,8 +56,9 @@ function compile(inputPath, options = {}) {
40
56
  return { code: compileResult.css, srcMap: compileResult.sourceMap, srcPath: inputPath };
41
57
  } catch (err) { console.error(`\nERROR: ${ err.message }\n`); return { error: err }; }
42
58
  } else { // dir path passed
43
- return findSCSS(inputPath, { recursive: options.recursive, dotFolders: options.dotFolders })
44
- ?.map(scssPath => { // compile found SCSS files
59
+ return findSCSS(inputPath, { recursive: options.recursive, verbosity: options.verbose,
60
+ dotFolders: options.dotFolders
61
+ })?.map(scssPath => { // compile found SCSS files
45
62
  if (options.verbose) console.info(`Compiling ${ scssPath }...`);
46
63
  try { // to compile found file
47
64
  const compileResult = sass.compile(scssPath, compileOptions);
@@ -59,7 +76,7 @@ if (require.main !== module) module.exports = { compile, findSCSS };
59
76
  else { // run as CLI tool
60
77
 
61
78
  // Init UI colors
62
- const nc = '\x1b[0m', // no color
79
+ const nc = '\x1b[0m', // no color
63
80
  br = '\x1b[1;91m', // bright red
64
81
  by = '\x1b[1;33m', // bright yellow
65
82
  bg = '\x1b[1;92m'; // bright green
@@ -68,14 +85,14 @@ else { // run as CLI tool
68
85
  const config = {
69
86
  dryRun: process.argv.some(arg => /^--?(?:n|dry-?run)$/.test(arg)),
70
87
  includeDotFolders: process.argv.some(arg =>
71
- /^--?(?:dd?|(?:include-?)?dot-?(?:folder|dir(?:ector(?:y|ie))?)s?)$/.test(arg)),
88
+ /^--?(?:dd?|(?:include-?)?dot-?(?:folder|dir(?:ector(?:y|ie))?)s?=?(?:true|1)?)$/.test(arg)),
72
89
  noSourceMaps: process.argv.some(arg =>
73
- /^--?(?:S|(?:exclude|disable|no)-?so?u?rce?-?maps?)$/.test(arg)),
90
+ /^--?(?:S|(?:exclude|disable|no)-?so?u?rce?-?maps?|so?u?rce?-?maps?=(?:false|0))$/.test(arg)),
74
91
  noRecursion: process.argv.some(arg =>
75
- /^--?(?:R|(?:disable|no)-?recursion)$/.test(arg)),
92
+ /^--?(?:R|(?:disable|no)-?recursion|recursion=(?:false|0))$/.test(arg)),
76
93
  noMinify: process.argv.some(arg =>
77
- /^--?(?:M|(?:disable|no)-?minif(?:y|ication))$/.test(arg)),
78
- quietMode: process.argv.some(arg => /^--?q(?:uiet)?$/.test(arg))
94
+ /^--?(?:M|(?:disable|no)-?minif(?:y|ication)|minif(?:y|ication)=(?:false|0))$/.test(arg)),
95
+ quietMode: process.argv.some(arg => /^--?q(?:uiet)?(?:-?mode)?$/.test(arg))
79
96
  };
80
97
 
81
98
  // Show HELP screen if -h or --help passed
@@ -125,18 +142,19 @@ else { // run as CLI tool
125
142
 
126
143
  // Find all eligible JavaScript files or arg-passed file
127
144
  const scssFiles = inputArg.endsWith('.scss') ? [inputPath]
128
- : findSCSS(inputPath, { recursive: !config.noRecursion });
145
+ : findSCSS(inputPath, { recursive: !config.noRecursion, verbose: !config.quietMode });
129
146
 
130
- if (config.dryRun && scssFiles?.length > 0) { // print files to be processed
131
- console.info(`\n${by}SCSS files to be compiled:${nc}`);
132
- scssFiles?.forEach(file => console.info(file));
147
+ if (config.dryRun) { // -n or --dry-run passed
148
+ if (scssFiles.length > 0) { // print files to be processed
149
+ console.info(`\n${by}SCSS files to be compiled:${nc}`);
150
+ scssFiles.forEach(file => console.info(file));
151
+ } else console.info(`${by}\nNo SCSS files will be compiled.${nc}`);
133
152
 
134
153
  } else { // actually compile SCSS files
135
- printIfNotQuiet(''); // line break before first log
136
154
 
137
155
  // Build array of compilation data
138
156
  const failedPaths = [];
139
- const compileData = scssFiles?.map(scssPath => {
157
+ const compileData = scssFiles.map(scssPath => {
140
158
  const compileResult = compile(scssPath, {
141
159
  minify: !config.noMinify, sourceMaps: !config.noSourceMaps, verbose: !config.quietMode });
142
160
  if (compileResult.error) failedPaths.push(scssPath);
@@ -169,7 +187,7 @@ else { // run as CLI tool
169
187
  printIfNotQuiet(`${ compileData.length } CSS file${ cssCntSuffix }`
170
188
  + ( !config.noSourceMaps ? ` + ${ compileData.length } source map${ cssCntSuffix }` : '' )
171
189
  + ' generated.');
172
- } else printIfNotQuiet(`${by}No SCSS files processed successfully.${nc}`);
190
+ } else printIfNotQuiet(`${by}No SCSS files processed.${nc}`);
173
191
  if (failedPaths.length > 0) {
174
192
  printIfNotQuiet(`\n${br}`
175
193
  + `${ failedPaths.length } file${ failedPaths.length > 1 ? 's' : '' }`
@@ -1,21 +0,0 @@
1
- <div align="right">
2
- <h6>
3
- <picture>
4
- <source type="image/svg+xml" media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/adamlui/js-utils/main/docs/images/earth-icon/white/icon32.svg">
5
- <img height=14 src="https://raw.githubusercontent.com/adamlui/js-utils/main/docs/images/earth-icon/black/icon32.svg">
6
- </picture>
7
- &nbsp;简体中文 |
8
- <a href="../LICENSE.md">English</a> |
9
- <a href="../zh-tw/LICENSE.md">繁體中文</a>
10
- </h6>
11
- </div>
12
-
13
- # 🏛️ MIT 许可证
14
-
15
- **版权所有 © 2023–2024 [刘展鹏 (Adam Lui)](https://github.com/adamlui)**
16
-
17
- 特此免费向任何获得副本的人授予许可本软件和相关文档文件(『软件』),处理在软件中不受限制,包括但不限于权利使用、复制、修改、合并、发布、分发、再许可和/或出售该软件的副本,并允许该软件是提供这样做,但须满足以下条件:
18
-
19
- 上述版权声明和本许可声明应包含在所有软件的副本或重要部分。
20
-
21
- 本软件『按原样』提供,不提供任何形式的明示或保证暗示的,包括但不限于适销性保证,适用于特定目的和非侵权。 在任何情况下都不得作者或版权持有人对任何索赔、损害或其他责任,无论是在合同、侵权或其他方面的行为中,由以下原因引起,出于或与软件或使用或其他交易有关软件。
@@ -1,228 +0,0 @@
1
- <div align="right">
2
- <h6>
3
- <picture>
4
- <source type="image/svg+xml" media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/adamlui/js-utils/main/docs/images/earth-icon/white/icon32.svg">
5
- <img height=14 src="https://raw.githubusercontent.com/adamlui/js-utils/main/docs/images/earth-icon/black/icon32.svg">
6
- </picture>
7
- &nbsp;简体中文 |
8
- <a href="../..#readme">English</a> |
9
- <a href="../zh-tw#readme">繁體中文</a>
10
- </h6>
11
- </div>
12
-
13
- # { } scss-to-css.js
14
-
15
- ### 将所有 SCSS 文件递归编译为缩小的 CSS。
16
-
17
- <a href="https://www.npmjs.com/package/@adamlui/scss-to-css"><img height=31 src="https://img.shields.io/npm/dt/%40adamlui%2Fscss-to-css?label=%E4%B8%8B%E8%BD%BD&logo=npm&logoColor=white&labelColor=464646&style=for-the-badge"></a>
18
- <a href="#%EF%B8%8F-mit-%E8%AE%B8%E5%8F%AF%E8%AF%81"><img height=31 src="https://img.shields.io/badge/许可证-MIT-red.svg?logo=internetarchive&logoColor=white&labelColor=464646&style=for-the-badge"></a>
19
- <a href="https://www.npmjs.com/package/@adamlui/scss-to-css?activeTab=versions"><img height=31 src="https://img.shields.io/badge/最新版本-1.6.0-fc7811.svg?logo=icinga&logoColor=white&labelColor=464646&style=for-the-badge"></a>
20
- <a href="https://www.npmjs.com/package/@adamlui/scss-to-css?activeTab=code"><img height=31 src="https://img.shields.io/npm/unpacked-size/%40adamlui%2Fscss-to-css?label=%E6%8B%86%E5%B0%81%E5%B0%BA%E5%AF%B8&style=for-the-badge&logo=ebox&logoColor=white&color=blue&labelColor=464646"></a>
21
- <a href="https://sonarcloud.io/component_measures?metric=new_vulnerabilities&id=adamlui_js-utils:scss-to-css/scss-to-css.js"><img height=31 src="https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fsonarcloud.io%2Fapi%2Fmeasures%2Fcomponent%3Fcomponent%3Dadamlui_js-utils%3Ascss-to-css%2Fscss-to-css.js%26metricKeys%3Dvulnerabilities&query=%24.component.measures.0.value&style=for-the-badge&logo=sonarcloud&logoColor=white&labelColor=464646&label=%E6%BC%8F%E6%B4%9E&color=gold"></a>
22
-
23
- <img height=8px width="100%" src="https://github.com/adamlui/js-utils/blob/main/docs/images/aqua-separator.png">
24
-
25
- ## ⚡ 如何安装
26
-
27
- 作为**全局实用程序**:
28
-
29
- ```
30
- npm install -g @adamlui/scss-to-css
31
- ```
32
-
33
- 作为**开发人员依赖**(例如,对于构建脚本):
34
-
35
- ```
36
- npm install -D @adamlui/scss-to-css
37
- ```
38
-
39
-
40
- 作为**运行时依赖**(例如,用于动态编译):
41
-
42
- ```
43
- npm install @adamlui/scss-to-css
44
- ```
45
-
46
- ## 💻 命令行使用
47
-
48
- 基本的**全局命令**是:
49
-
50
- ```
51
- scss-to-css
52
- ```
53
-
54
- 示例输出:
55
-
56
- <img src="https://github.com/adamlui/js-utils/blob/main/scss-to-css/media/images/sample-output.png">
57
-
58
- **💡 笔记:** 默认情况下也会生成源映射,除非传递 `-S` 或 `--no-source-maps`。
59
-
60
- #
61
-
62
- 指定**输入/输出**路径:
63
-
64
- ```
65
- scss-to-css [input_path] [output_path]
66
- ```
67
-
68
- - `[input_path]`: SCSS 文件或包含要编译的 SCSS 文件的目录的路径,相对于当前工作目录。
69
- - `[output_path]`: 将存储 CSS + 源映射文件的文件或目录的路径,相对于原始文件位置(如果未提供,则使用 `css/`)。
70
-
71
- **💡 注意:** 如果传递文件夹,文件将被递归处理,除非传递 `-R` 或 `--no-recursion`。
72
-
73
- #
74
-
75
- 要用作 **包脚本**,请在项目的 `package.json` 中:
76
-
77
- ```json
78
- "scripts": {
79
- "build:css": "<scss-to-css-cmd>"
80
- },
81
- ```
82
-
83
- 将 `<scss-to-css-cmd>` 替换为 `scss-to-css` + 可选参数。 然后,可以使用 `npm run build:css` 来运行该命令。
84
- <br><br>
85
-
86
- ### 命令示例
87
-
88
- 编译 **当前目录** 中的所有 SCSS 文件(输出到 `css/`):
89
-
90
- ```
91
- scss-to-css
92
- ```
93
-
94
- 编译 **特定目录** 中的所有 SCSS 文件(输出到 `path/to/your/directory/css/`):
95
-
96
- ```
97
- scss-to-css path/to/your/directory
98
- ```
99
-
100
- 编译一个**特定文件**(输出到 `path/to/your/css/file.min.css`):
101
-
102
- ```
103
- scss-to-css path/to/your/file.scss
104
- ```
105
-
106
- 指定 **输入和输出** 目录(输出到 `output_folder/`):
107
-
108
- ```
109
- scss-to-css input_folder output_folder
110
- ```
111
-
112
- **💡 注意:** 除非传递 `-M` 或 `--no-minify` ,否则输出 CSS 会被缩小。
113
- <br><br>
114
-
115
- ### 命令行选项
116
-
117
- ```
118
- 配置选项:
119
- -n, --dry-run 实际上并不缩小文件,只是显示它们是否会被处理。
120
- -d, --include-dotfolders 在文件搜索中包括点文件夹。
121
- -S, --no-source-maps 防止生成源映射。
122
- -M, --no-minify 禁用输出 CSS 的缩小。
123
- -R, --no-recursion 禁用递归文件搜索。
124
- -q, --quiet 禁止除错误之外的所有日志记录。
125
-
126
- 信息命令:
127
- -h, --help 显示帮助屏幕。
128
- -v, --version 显示版本号。
129
- ```
130
-
131
- ## 🔌 API 参考
132
-
133
- 您还可以将 **scss-to-css** 导入您的应用程序以使用其 API 方法,无论是作为 ECMAScript 模块还是 CommonJS 模块。
134
-
135
- #### ESM:
136
-
137
- ```js
138
- import * as scssToCSS from '@adamlui/scss-to-css';
139
- ```
140
-
141
- #### CJS:
142
-
143
- ```js
144
- const scssToCSS = require('@adamlui/scss-to-css');
145
- ```
146
-
147
- ### compile(inputPath, options)
148
-
149
- 此函数将在 `inputPath` 中找到的 SCSS 编译为 CSS 数据。
150
-
151
- 如果传递 **文件路径**,则文件的代码将编译为 CSS,然后返回一个包含 `srcPath` + `code` + `error` 的对象:
152
-
153
- ```js
154
- const compileResult = scssToCSS.compile('assets/style.scss');
155
- console.log(compileResult.error); // 运行时错误,如果没有错误则为 `undefined`
156
- console.log(compileResult.code); // 编译后的 assets/style.scss CSS 输出
157
- ```
158
-
159
- 如果传递 **目录路径**,则搜索 SCSS 文件(默认情况下递归),加载每个文件的代码并编译,然后返回包含 `srcPath` + `code` + `error` 的对象数组:
160
-
161
- ```js
162
- const results = scssToCSS.compile('.');
163
- results.forEach(result =>
164
- console.log(result.srcPath) // 工作目录 + 所有嵌套目录中 SCSS 文件的路径
165
- );
166
- console.log(results[1].code); // 如果找到,则编译第二个 SCSS 文件的 CSS 输出,如果未找到,则为 `undefined`
167
- ```
168
-
169
- 选项是布尔值,作为对象属性传递。 例如:
170
-
171
- ```js
172
- scssToCSS.compile(inputDir, { minify: false });
173
- // 返回 `.code` 包含未缩小 CSS 的数据对象
174
- ```
175
-
176
- 可能的参数(及其默认设置)有:
177
-
178
- ```
179
- recursive (true) 如果传递目录路径,则递归搜索嵌套文件。
180
- verbose (true) 在控制台/终端中显示日志记录。
181
- dotFolders (false) 在文件搜索中包括点文件夹。
182
- minify (true) 缩小输出 CSS。
183
- sourceMaps (true) 生成 CSS 源映射。
184
- ```
185
-
186
- ### findSCSS(searchDir, options)
187
-
188
- 此函数搜索传递的 `searchDir` 字符串中的所有 SCSS 文件(对于发现 [`compile()`](#compileinputpath-options) 将处理哪些文件很有用)并返回包含其文件路径的数组。
189
-
190
- 选项是布尔值,作为对象属性传递。 例如:
191
-
192
- ```js
193
- scssToCSS.findSCSS(searchDir, { recursive: false });
194
- // 返回包含恰好位于 `searchDir` 中的 SCSS 文件的文件路径的数组
195
- ```
196
-
197
- 可能的参数(及其默认设置)有:
198
-
199
- ```
200
- recursive (true) 如果传递目录路径,则递归搜索嵌套文件。
201
- verbose (false) 在控制台/终端中显示日志记录。
202
- dotFolders (false) 在文件搜索中包括点文件夹。
203
- ```
204
-
205
- <br>
206
-
207
- ## 💖 支持
208
-
209
- 如果这对您有帮助,请考虑[给予 GitHub ⭐](https://github.com/adamlui/js-utils)!
210
- <br><br>
211
-
212
- ## 🏛️ MIT 许可证
213
-
214
- **版权所有 © 2023–2024 [刘展鹏 (Adam Lui)](https://github.com/adamlui)**
215
-
216
- 特此免费向任何获得副本的人授予许可本软件和相关文档文件(『软件』),处理在软件中不受限制,包括但不限于权利使用、复制、修改、合并、发布、分发、再许可和/或出售该软件的副本,并允许该软件是提供这样做,但须满足以下条件:
217
-
218
- 上述版权声明和本许可声明应包含在所有软件的副本或重要部分。
219
-
220
- 本软件『按原样』提供,不提供任何形式的明示或保证暗示的,包括但不限于适销性保证,适用于特定目的和非侵权。 在任何情况下都不得作者或版权持有人对任何索赔、损害或其他责任,无论是在合同、侵权或其他方面的行为中,由以下原因引起,出于或与软件或使用或其他交易有关软件。
221
-
222
- <br>
223
-
224
- <img height=6px width="100%" src="https://raw.githubusercontent.com/adamlui/js-utils/main/docs/images/aqua-separator.png">
225
-
226
- <a href="https://github.com/adamlui/js-utils">**家**</a> /
227
- <a href="https://github.com/adamlui/js-utils/discussions">讨论</a> /
228
- <a href="#--scss-to-css">回到顶部 ↑</a>
@@ -1,17 +0,0 @@
1
- <div align="right">
2
- <h6>
3
- <picture>
4
- <source type="image/svg+xml" media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/adamlui/js-utils/main/docs/images/earth-icon/white/icon32.svg">
5
- <img height=14 src="https://raw.githubusercontent.com/adamlui/js-utils/main/docs/images/earth-icon/black/icon32.svg">
6
- </picture>
7
- &nbsp;简体中文 |
8
- <a href="../SECURITY.md">English</a> |
9
- <a href="../zh-tw/SECURITY.md">繁體中文</a>
10
- </h6>
11
- </div>
12
-
13
- # 🛡️ 安全政策
14
-
15
- 如果您发现漏洞,请打开[安全公告草案](https://github.com/adamlui/js-utils/security/advisories/new)。
16
-
17
- 也欢迎拉取请求,但出于安全原因,请发送电子邮件至 <adam@kudoai.com> 并等待回复后再公开。
@@ -1,21 +0,0 @@
1
- <div align="right">
2
- <h6>
3
- <picture>
4
- <source type="image/svg+xml" media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/adamlui/js-utils/main/docs/images/earth-icon/white/icon32.svg">
5
- <img height=14 src="https://raw.githubusercontent.com/adamlui/js-utils/main/docs/images/earth-icon/black/icon32.svg">
6
- </picture>
7
- &nbsp;繁體中文 |
8
- <a href="../LICENSE.md">English</a> |
9
- <a href="../zh-cn/LICENSE.md">简体中文</a>
10
- </h6>
11
- </div>
12
-
13
- # 🏛️ MIT 许可证
14
-
15
- **版權所有 © 2023–2024 [刘展鹏 (Adam Lui)](https://github.com/adamlui)**
16
-
17
- 特此免費授予任何取得副本的人許可本軟體和相關文件文件(『軟體』),處理在軟體中不受限制,包括但不限於權利使用、複製、修改、合併、發布、分發、再授權和/或出售該軟體的副本,並允許該軟體是提供這樣做,但須滿足以下條件:
18
-
19
- 上述版權聲明和本許可聲明應包含在所有軟體的副本或重要部分。
20
-
21
- 本軟體『依現況』提供,不提供任何形式的明示或保證暗示的,包括但不限於適銷性保證,適用於特定目的和非侵權。 在任何情況下都不得作者或版權持有人對任何索賠、損害或其他責任,無論是在合約、侵權或其他方面的行為中,由以下原因引起,出於或與軟體或使用或其他交易有關軟體。
@@ -1,227 +0,0 @@
1
- <div align="right">
2
- <h6>
3
- <picture>
4
- <source type="image/svg+xml" media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/adamlui/js-utils/main/docs/images/earth-icon/white/icon32.svg">
5
- <img height=14 src="https://raw.githubusercontent.com/adamlui/js-utils/main/docs/images/earth-icon/black/icon32.svg">
6
- </picture>
7
- &nbsp;繁體中文 |
8
- <a href="../..#readme">English</a> |
9
- <a href="../zh-cn#readme">简体中文</a>
10
- </h6>
11
- </div>
12
-
13
- # { } scss-to-css.js
14
-
15
- ### 將所有 SCSS 檔案遞歸編譯為縮小的 CSS。
16
-
17
- <a href="https://www.npmjs.com/package/@adamlui/scss-to-css"><img height=31 src="https://img.shields.io/npm/dt/%40adamlui%2Fscss-to-css?label=%E4%B8%8B%E8%BC%89&logo=npm&logoColor=white&labelColor=464646&style=for-the-badge"></a>
18
- <a href="#%EF%B8%8F-mit-%E8%AE%B8%E5%8F%AF%E8%AF%81"><img height=31 src="https://img.shields.io/badge/許可證-MIT-red.svg?logo=internetarchive&logoColor=white&labelColor=464646&style=for-the-badge"></a>
19
- <a href="https://www.npmjs.com/package/@adamlui/scss-to-css?activeTab=versions"><img height=31 src="https://img.shields.io/badge/最新版本-1.6.0-fc7811.svg?logo=icinga&logoColor=white&labelColor=464646&style=for-the-badge"></a>
20
- <a href="https://www.npmjs.com/package/@adamlui/scss-to-css?activeTab=code"><img height=31 src="https://img.shields.io/npm/unpacked-size/%40adamlui%2Fscss-to-css?label=%E6%8B%86%E5%B0%81%E5%B0%BA%E5%AF%B8&style=for-the-badge&logo=ebox&logoColor=white&color=blue&labelColor=464646"></a>
21
- <a href="https://sonarcloud.io/component_measures?metric=new_vulnerabilities&id=adamlui_js-utils:scss-to-css/scss-to-css.js"><img height=31 src="https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fsonarcloud.io%2Fapi%2Fmeasures%2Fcomponent%3Fcomponent%3Dadamlui_js-utils%3Ascss-to-css%2Fscss-to-css.js%26metricKeys%3Dvulnerabilities&query=%24.component.measures.0.value&style=for-the-badge&logo=sonarcloud&logoColor=white&labelColor=464646&label=%E6%BC%8F%E6%B4%9E&color=gold"></a>
22
-
23
- <img height=8px width="100%" src="https://github.com/adamlui/js-utils/blob/main/docs/images/aqua-separator.png">
24
-
25
- ## ⚡ 如何安裝
26
-
27
- 作為**全域實用程式**:
28
-
29
- ```
30
- npm install -g @adamlui/scss-to-css
31
- ```
32
-
33
- 作為**開發人員依賴**(例如,對於建置腳本):
34
-
35
- ```
36
- npm install -D @adamlui/scss-to-css
37
- ```
38
-
39
- 作為**運行時依賴**(例如,用於動態編譯):
40
-
41
- ```
42
- npm install @adamlui/scss-to-css
43
- ```
44
-
45
- ## 💻 命令列使用
46
-
47
- 基本的**全域命令**是:
48
-
49
- ```
50
- scss-to-css
51
- ```
52
-
53
- 範例輸出:
54
-
55
- <img src="https://github.com/adamlui/js-utils/blob/main/scss-to-css/media/images/sample-output.png">
56
-
57
- **💡 筆記:** 預設也會產生來源映射,除非傳遞 `-S` 或 `--no-source-maps`。
58
-
59
- #
60
-
61
- 指定**輸入/輸出**路徑:
62
-
63
- ```
64
- scss-to-css [input_path] [output_path]
65
- ```
66
-
67
- - `[input_path]`: SCSS 檔案或包含要編譯的 SCSS 檔案的目錄的路徑,相對於目前工作目錄。
68
- - `[output_path]`: 將儲存 CSS + 來源對應檔案的檔案或目錄的路徑,相對於原始檔案位置(如果未提供,則使用 `css/`)。
69
-
70
- **💡 注意:** 如果傳遞資料夾,檔案將被遞歸處理,除非傳遞 `-R` 或 `--no-recursion`。
71
-
72
- #
73
-
74
- 若要用作 **套件腳本**,請在專案的 `package.json` 中:
75
-
76
- ```json
77
- "scripts": {
78
- "build:css": "<scss-to-css-cmd>"
79
- },
80
- ```
81
-
82
- 將 `<scss-to-css-cmd>` 替換為 `scss-to-css` + 可選參數。 然後,可以使用 `npm run build:css` 來執行該指令。
83
- <br><br>
84
-
85
- ### 命令範例
86
-
87
- 編譯 **目前目錄** 中的所有 SCSS 檔案(輸出到 `css/`):
88
-
89
- ```
90
- scss-to-css
91
- ```
92
-
93
- 編譯 **特定目錄** 中的所有 SCSS 檔案(輸出到 `path/to/your/directory/css/`):
94
-
95
- ```
96
- scss-to-css path/to/your/directory
97
- ```
98
-
99
- 編譯一個**特定檔案**(輸出到 `path/to/your/css/file.min.css`):
100
-
101
- ```
102
- scss-to-css path/to/your/file.scss
103
- ```
104
-
105
- 指定 **輸入和輸出** 目錄(輸出到 `output_folder/`):
106
-
107
- ```
108
- scss-to-css input_folder output_folder
109
- ```
110
-
111
- **💡 注意:** 除非傳遞 `-M` 或 `--no-minify` ,否則輸出 CSS 會被縮小。
112
- <br><br>
113
-
114
- ### 命令列選項
115
-
116
- ```
117
- 配置選項:
118
- -n, --dry-run 實際上並不會縮小文件,只是顯示它們是否會被處理。
119
- -d, --include-dotfolders 在檔案搜尋中包含點資料夾。
120
- -S, --no-source-maps 防止產生來源映射。
121
- -M, --no-minify 禁用輸出 CSS 的縮小。
122
- -R, --no-recursion 停用遞歸檔案搜尋。
123
- -q, --quiet 禁止錯誤以外的所有日誌記錄。
124
-
125
- 訊息命令:
126
- -h, --help 顯示幫助畫面。
127
- -v, --version 顯示版本號。
128
- ```
129
-
130
- ## 🔌 API 參考
131
-
132
- 您也可以將 **scss-to-css** 匯入您的應用程式以使用其 API 方法,無論是作為 ECMAScript 模組還是 CommonJS 模組。
133
-
134
- #### ESM:
135
-
136
- ```js
137
- import * as scssToCSS from '@adamlui/scss-to-css';
138
- ```
139
-
140
- #### CJS:
141
-
142
- ```js
143
- const scssToCSS = require('@adamlui/scss-to-css');
144
- ```
145
-
146
- ### compile(inputPath, options)
147
-
148
- 此函數將在 `inputPath` 中找到的 SCSS 編譯為 CSS 資料。
149
-
150
- 如果傳遞 **檔案路徑**,則檔案的程式碼將編譯為 CSS,然後傳回一個包含 `srcPath` + `code` + `error` 的物件:
151
-
152
- ```js
153
- const compileResult = scssToCSS.compile('assets/style.scss');
154
- console.log(compileResult.error); // 執行階段錯誤,如果沒有錯誤則為 `undefined`
155
- console.log(compileResult.code); // 編譯後的 assets/style.scss CSS 輸出
156
- ```
157
-
158
- 如果传递 **目录路径**,则搜索 SCSS 文件(默认情况下递归),加载每个文件的代码并编译,然后返回包含 `srcPath` + `code` + `error` 的对象数组:
159
-
160
- ```js
161
- const results = scssToCSS.compile('.');
162
- results.forEach(result =>
163
- console.log(result.srcPath) // 工作目錄 + 所有巢狀目錄中 SCSS 檔案的路徑
164
- );
165
- console.log(results[1].code); // 如果找到,則編譯第二個 SCSS 檔案的 CSS 輸出,如果找不到,則為 `undefined`
166
- ```
167
-
168
- 選項是布林值,作為物件屬性傳遞。 例如:
169
-
170
- ```js
171
- scssToCSS.compile(inputDir, { minify: false });
172
- // 傳回 `.code` 包含未縮小 CSS 的資料對象
173
- ```
174
-
175
- 可能的參數(及其預設設定)有:
176
-
177
- ```
178
- recursive (true) 如果傳遞目錄路徑,則遞歸搜尋巢狀檔案。
179
- verbose (true) 在控制台/終端機中顯示日誌記錄。
180
- dotFolders (false) 在檔案搜尋中包含點資料夾。
181
- minify (true) 縮小輸出 CSS。
182
- sourceMaps (true) 產生 CSS 來源映射。
183
- ```
184
-
185
- ### findSCSS(searchDir, options)
186
-
187
- 此函數搜尋傳遞的 `searchDir` 字串中的所有 SCSS 檔案(對於發現 [`compile()`](#compileinputpath-options) 將處理哪些檔案很有用)並傳回包含其檔案路徑的陣列。
188
-
189
- 選項是布林值,作為物件屬性傳遞。 例如:
190
-
191
- ```js
192
- scssToCSS.findSCSS(searchDir, { recursive: false });
193
- // 傳回包含恰好位於 `searchDir` 中的 SCSS 檔案的檔案路徑的陣列
194
- ```
195
-
196
- 可能的參數(及其預設設定)有:
197
-
198
- ```
199
- recursive (true) 如果傳遞目錄路徑,則遞歸搜尋巢狀檔案。
200
- verbose (false) 在控制台/終端機中顯示日誌記錄。
201
- dotFolders (false) 在檔案搜尋中包含點資料夾。
202
- ```
203
-
204
- <br>
205
-
206
- ## 💖 支援
207
-
208
- 如果這對您有幫助,請考慮[給予 GitHub ⭐](https://github.com/adamlui/js-utils)!
209
- <br><br>
210
-
211
- ## 🏛️ MIT 许可证
212
-
213
- **版權所有 © 2023–2024 [刘展鹏 (Adam Lui)](https://github.com/adamlui)**
214
-
215
- 特此免費授予任何取得副本的人許可本軟體和相關文件文件(『軟體』),處理在軟體中不受限制,包括但不限於權利使用、複製、修改、合併、發布、分發、再授權和/或出售該軟體的副本,並允許該軟體是提供這樣做,但須滿足以下條件:
216
-
217
- 上述版權聲明和本許可聲明應包含在所有軟體的副本或重要部分。
218
-
219
- 本軟體『依現況』提供,不提供任何形式的明示或保證暗示的,包括但不限於適銷性保證,適用於特定目的和非侵權。 在任何情況下都不得作者或版權持有人對任何索賠、損害或其他責任,無論是在合約、侵權或其他方面的行為中,由以下原因引起,出於或與軟體或使用或其他交易有關軟體。
220
-
221
- <br>
222
-
223
- <img height=6px width="100%" src="https://raw.githubusercontent.com/adamlui/js-utils/main/docs/images/aqua-separator.png">
224
-
225
- <a href="https://github.com/adamlui/js-utils">**家**</a> /
226
- <a href="https://github.com/adamlui/js-utils/discussions">讨论</a> /
227
- <a href="#--scss-to-css">回到顶部 ↑</a>
@@ -1,17 +0,0 @@
1
- <div align="right">
2
- <h6>
3
- <picture>
4
- <source type="image/svg+xml" media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/adamlui/js-utils/main/docs/images/earth-icon/white/icon32.svg">
5
- <img height=14 src="https://raw.githubusercontent.com/adamlui/js-utils/main/docs/images/earth-icon/black/icon32.svg">
6
- </picture>
7
- &nbsp;繁體中文 |
8
- <a href="../SECURITY.md">English</a> |
9
- <a href="../zh-cn/SECURITY.md">简体中文</a>
10
- </h6>
11
- </div>
12
-
13
- # 🛡️ 安全策略
14
-
15
- 如果您發現漏洞,請打開[安全公告草案](https://github.com/adamlui/js-utils/security/advisories/new)。
16
-
17
- 也歡迎拉取請求,但出於安全原因,請發送電子郵件至 <adam@kudoai.com> 並等待回復後再公開。