@adamlui/scss-to-css 1.0.0 → 1.0.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 +81 -0
- package/adamlui-scss-to-css-1.0.1.tgz +0 -0
- package/docs/LICENSE.md +21 -0
- package/docs/SECURITY.md +5 -0
- package/package.json +8 -4
- package/scss-to-css.js +2 -2
package/README.md
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# { } scss-to-css.js
|
|
2
|
+
|
|
3
|
+
<a href="#%EF%B8%8F-mit-license"><img height=25 src="https://img.shields.io/badge/License-MIT-fcde7b.svg?logo=internetarchive&logoColor=white&labelColor=464646&style=for-the-badge"></a>
|
|
4
|
+
|
|
5
|
+
Recursively compile all SCSS files into minified CSS.
|
|
6
|
+
|
|
7
|
+
<img height=10px width="100%" src="https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/aqua.png">
|
|
8
|
+
|
|
9
|
+
## ⚡ Installation
|
|
10
|
+
|
|
11
|
+
- As a global utility:
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
npm install -g @adamlui/scss-to-css
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
- As a dev dependency, from your project root:
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
npm install -D @adamlui/scss-to-css
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## 💻 Usage
|
|
24
|
+
|
|
25
|
+
### Globally:
|
|
26
|
+
|
|
27
|
+
Run the following command from a folder to recursively compile all SCSS:
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
scss-to-css
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Sample output:
|
|
34
|
+
|
|
35
|
+

|
|
36
|
+
|
|
37
|
+
### Dev dependency:
|
|
38
|
+
|
|
39
|
+
1. Add build script to project's `package.json`:
|
|
40
|
+
|
|
41
|
+
```json
|
|
42
|
+
"scripts": {
|
|
43
|
+
"build:css": "scss-to-css"
|
|
44
|
+
},
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
2. Run script from a folder to recursively compile all SCSS:
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
npm run build:css
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## 🏛️ MIT License
|
|
54
|
+
|
|
55
|
+
**Copyright (c) 2024 [Adam Lui](https://github.com/adamlui)**
|
|
56
|
+
|
|
57
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
58
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
59
|
+
in the Software without restriction, including without limitation the rights
|
|
60
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
61
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
62
|
+
furnished to do so, subject to the following conditions:
|
|
63
|
+
|
|
64
|
+
The above copyright notice and this permission notice shall be included in all
|
|
65
|
+
copies or substantial portions of the Software.
|
|
66
|
+
|
|
67
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
68
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
69
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
70
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
71
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
72
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
73
|
+
SOFTWARE.
|
|
74
|
+
|
|
75
|
+
<br>
|
|
76
|
+
|
|
77
|
+
<img height=6px width="100%" src="https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/aqua.png">
|
|
78
|
+
|
|
79
|
+
<a href="https://github.com/adamlui">**Home**</a> /
|
|
80
|
+
<a href="https://github.com/adamlui/js-utils/discussions">Discuss</a> /
|
|
81
|
+
<a href="#--scss-to-cssjs">Back to top ↑</a>
|
|
Binary file
|
package/docs/LICENSE.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# MIT License
|
|
2
|
+
|
|
3
|
+
**Copyright (c) 2024 [Adam Lui](https://github.com/adamlui)**
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/docs/SECURITY.md
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# 🛡️ Security Policy
|
|
2
|
+
|
|
3
|
+
If you find a vulnerability, please open a [draft security advisory](https://github.com/adamlui/js-utils/security/advisories/new).
|
|
4
|
+
|
|
5
|
+
Pull requests are also welcome, but for safety reasons, send an email to adam@kudoai.com and wait for a response before making it public.
|
package/package.json
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adamlui/scss-to-css",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "
|
|
5
|
-
"author":
|
|
6
|
-
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "Recursively compile all SCSS files into minified CSS",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Adam Lui",
|
|
7
|
+
"email": "adam@kudoai.com",
|
|
8
|
+
"url": "https://github.com/adamlui"
|
|
9
|
+
},
|
|
7
10
|
"homepage": "https://github.com/adamlui/js-utils",
|
|
11
|
+
"license": "MIT",
|
|
8
12
|
"main": "scss-to-css.js",
|
|
9
13
|
"bin": {
|
|
10
14
|
"scss-to-css": "scss-to-css.js"
|
package/scss-to-css.js
CHANGED
|
@@ -48,7 +48,7 @@ const scssFiles = (() => {
|
|
|
48
48
|
})();
|
|
49
49
|
|
|
50
50
|
// Compile SCSS files to CSS
|
|
51
|
-
if (scssFiles.length ===
|
|
51
|
+
if (scssFiles.length === 0) console.info('\nNo SCSS files found.');
|
|
52
52
|
else {
|
|
53
53
|
scssFiles.forEach(scssPath => {
|
|
54
54
|
const inputDir = path.dirname(scssPath);
|
|
@@ -58,6 +58,6 @@ else {
|
|
|
58
58
|
);
|
|
59
59
|
console.info(`\nCompiling ${ scssPath } to ${ outputPath }...`);
|
|
60
60
|
execSync(`sass --style compressed "${ scssPath }" "${ outputPath }"`);
|
|
61
|
-
console.info(`${bg}Compilation complete
|
|
61
|
+
console.info(`${bg}Compilation complete!${nc}`);
|
|
62
62
|
});
|
|
63
63
|
}
|