just-scripts 1.8.1 → 1.8.2
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/CHANGELOG.json +16 -1
- package/CHANGELOG.md +10 -2
- package/lib/tasks/sassTask.js +4 -4
- package/lib/tasks/sassTask.js.map +1 -1
- package/package.json +1 -1
- package/src/tasks/sassTask.ts +4 -4
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,22 @@
|
|
|
2
2
|
"name": "just-scripts",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Tue, 05 Apr 2022 20:55:40 GMT",
|
|
6
|
+
"tag": "just-scripts_v1.8.2",
|
|
7
|
+
"version": "1.8.2",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "tristan.watanabe@gmail.com",
|
|
12
|
+
"package": "just-scripts",
|
|
13
|
+
"comment": "Add support for dart-sass",
|
|
14
|
+
"commit": "365c671c3228d59c8861fe249cc132e4b51faf57"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"date": "Thu, 31 Mar 2022 17:04:30 GMT",
|
|
6
21
|
"tag": "just-scripts_v1.8.1",
|
|
7
22
|
"version": "1.8.1",
|
|
8
23
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
# Change Log - just-scripts
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Tue, 05 Apr 2022 20:55:40 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 1.8.2
|
|
8
|
+
|
|
9
|
+
Tue, 05 Apr 2022 20:55:40 GMT
|
|
10
|
+
|
|
11
|
+
### Patches
|
|
12
|
+
|
|
13
|
+
- Add support for dart-sass (tristan.watanabe@gmail.com)
|
|
14
|
+
|
|
7
15
|
## 1.8.1
|
|
8
16
|
|
|
9
|
-
Thu, 31 Mar 2022 17:04:
|
|
17
|
+
Thu, 31 Mar 2022 17:04:30 GMT
|
|
10
18
|
|
|
11
19
|
### Patches
|
|
12
20
|
|
package/lib/tasks/sassTask.js
CHANGED
|
@@ -18,13 +18,13 @@ function sassTask(optionsOrCreateSourceModule, postcssPlugins) {
|
|
|
18
18
|
}
|
|
19
19
|
postcssPlugins = postcssPlugins || [];
|
|
20
20
|
return function sass(done) {
|
|
21
|
-
const
|
|
21
|
+
const sass = tryRequire_1.tryRequire('sass') || tryRequire_1.tryRequire('node-sass');
|
|
22
22
|
const postcss = tryRequire_1.tryRequire('postcss');
|
|
23
23
|
const autoprefixer = tryRequire_1.tryRequire('autoprefixer');
|
|
24
24
|
const postcssRtl = tryRequire_1.tryRequire('postcss-rtl');
|
|
25
25
|
const clean = tryRequire_1.tryRequire('postcss-clean');
|
|
26
|
-
if (!
|
|
27
|
-
just_task_1.logger.warn('One
|
|
26
|
+
if (!sass || !postcss || !autoprefixer) {
|
|
27
|
+
just_task_1.logger.warn('One or more dependencies (sass or node-sass, postcss, autoprefixer) is not installed, so this task has no effect');
|
|
28
28
|
done();
|
|
29
29
|
return;
|
|
30
30
|
}
|
|
@@ -33,7 +33,7 @@ function sassTask(optionsOrCreateSourceModule, postcssPlugins) {
|
|
|
33
33
|
if (files.length) {
|
|
34
34
|
const tasks = files.map((fileName) => function (cb) {
|
|
35
35
|
fileName = path.resolve(fileName);
|
|
36
|
-
|
|
36
|
+
sass.render({
|
|
37
37
|
file: fileName,
|
|
38
38
|
importer: patchSassUrl,
|
|
39
39
|
includePaths: [path.resolve(process.cwd(), 'node_modules')],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sassTask.js","sourceRoot":"","sources":["../../src/tasks/sassTask.ts"],"names":[],"mappings":";;;AAAA,6BAA6B;AAC7B,6BAA6B;AAC7B,yBAAyB;A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AAE;QAClB,MAAM,GAAG,wBAAwB,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;KACxD;SAAM,IAAI,GAAG,KAAK,OAAO,EAAE;QAC1B,MAAM,GAAG,EAAE,CAAC;KACb;IAED,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;AAC1B,CAAC"}
|
package/package.json
CHANGED
package/src/tasks/sassTask.ts
CHANGED
|
@@ -28,14 +28,14 @@ export function sassTask(
|
|
|
28
28
|
postcssPlugins = postcssPlugins || [];
|
|
29
29
|
|
|
30
30
|
return function sass(done: (err?: Error) => void) {
|
|
31
|
-
const
|
|
31
|
+
const sass = tryRequire('sass') || tryRequire('node-sass');
|
|
32
32
|
const postcss = tryRequire('postcss');
|
|
33
33
|
const autoprefixer = tryRequire('autoprefixer');
|
|
34
34
|
const postcssRtl = tryRequire('postcss-rtl');
|
|
35
35
|
const clean = tryRequire('postcss-clean');
|
|
36
36
|
|
|
37
|
-
if (!
|
|
38
|
-
logger.warn('One
|
|
37
|
+
if (!sass || !postcss || !autoprefixer) {
|
|
38
|
+
logger.warn('One or more dependencies (sass or node-sass, postcss, autoprefixer) is not installed, so this task has no effect');
|
|
39
39
|
done();
|
|
40
40
|
return;
|
|
41
41
|
}
|
|
@@ -48,7 +48,7 @@ export function sassTask(
|
|
|
48
48
|
(fileName: string) =>
|
|
49
49
|
function (cb: any) {
|
|
50
50
|
fileName = path.resolve(fileName);
|
|
51
|
-
|
|
51
|
+
sass.render(
|
|
52
52
|
{
|
|
53
53
|
file: fileName,
|
|
54
54
|
importer: patchSassUrl,
|