@madebyseed/seed-cli-tools 1.9.2 → 1.9.4
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/lib/tasks/build-css.js
CHANGED
|
@@ -19,7 +19,7 @@ var messages = require("./includes/messages.js");
|
|
|
19
19
|
var utils = require("./includes/utilities");
|
|
20
20
|
|
|
21
21
|
var tailwindConfig = config.usesTailwind ? require(path.join(config.themeRoot, config.tailwindConfig)) : {};
|
|
22
|
-
var assets = config.usesTailwind || tailwindConfig.mode === "jit" ? [config.src.css, config.src.sections, config.src.layout, config.src.snippets, config.src.assets, config.src.js, config.src.icons, config.tailwindConfig] : [config.src.css, config.tailwindConfig];
|
|
22
|
+
var assets = config.usesTailwind || tailwindConfig.mode === "jit" ? [config.src.css, config.src.scss, config.src.sections, config.src.layout, config.src.snippets, config.src.assets, config.src.templates, config.src.js, config.src.icons, config.tailwindConfig] : [config.src.css, config.src.scss, config.tailwindConfig];
|
|
23
23
|
/**
|
|
24
24
|
* Process css and tailwind
|
|
25
25
|
*
|
|
@@ -29,9 +29,11 @@ var assets = config.usesTailwind || tailwindConfig.mode === "jit" ? [config.src.
|
|
|
29
29
|
*/
|
|
30
30
|
|
|
31
31
|
function processCss() {
|
|
32
|
-
return
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
return new Promise(function (resolve, reject) {
|
|
33
|
+
gulp.src(config.roots.css, {
|
|
34
|
+
allowEmpty: true
|
|
35
|
+
}).pipe(plumber(utils.errorHandler)).pipe(postcss(config.plugins.postcss)).pipe(gulp.dest(config.dist.assets)).on('finish', resolve).on('error', reject);
|
|
36
|
+
});
|
|
35
37
|
}
|
|
36
38
|
/**
|
|
37
39
|
* Process sass files
|
|
@@ -43,9 +45,11 @@ function processCss() {
|
|
|
43
45
|
|
|
44
46
|
|
|
45
47
|
function processSass() {
|
|
46
|
-
return
|
|
47
|
-
|
|
48
|
-
|
|
48
|
+
return new Promise(function (resolve, reject) {
|
|
49
|
+
gulp.src(config.roots.scss, {
|
|
50
|
+
allowEmpty: true
|
|
51
|
+
}).pipe(plumber(utils.errorHandler)).pipe(sass()).pipe(postcss(config.plugins.postcss)).pipe(gulp.dest(config.dist.assets)).on('finish', resolve).on('error', reject);
|
|
52
|
+
});
|
|
49
53
|
}
|
|
50
54
|
/**
|
|
51
55
|
* Concatenate css via gulp-cssimport
|
|
@@ -144,13 +144,6 @@ if (config.usesTailwind) {
|
|
|
144
144
|
}
|
|
145
145
|
|
|
146
146
|
config.plugins.postcss.push(require('autoprefixer'));
|
|
147
|
-
|
|
148
|
-
if (config.optimize) {
|
|
149
|
-
config.plugins.postcss.push(cssnano({
|
|
150
|
-
preset: "default"
|
|
151
|
-
}));
|
|
152
|
-
}
|
|
153
|
-
|
|
154
147
|
config.plugins.postcss.push(pxtorem({
|
|
155
148
|
rootValue: 16,
|
|
156
149
|
unitPrecision: 5,
|
|
@@ -160,6 +153,13 @@ config.plugins.postcss.push(pxtorem({
|
|
|
160
153
|
mediaQuery: true,
|
|
161
154
|
exclude: /node_modules/i
|
|
162
155
|
}));
|
|
156
|
+
|
|
157
|
+
if (config.optimize) {
|
|
158
|
+
config.plugins.postcss.push(cssnano({
|
|
159
|
+
preset: "default"
|
|
160
|
+
}));
|
|
161
|
+
}
|
|
162
|
+
|
|
163
163
|
config.plugins.postcss.push(reporter({
|
|
164
164
|
clearReportedMessages: true
|
|
165
165
|
}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@madebyseed/seed-cli-tools",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.4",
|
|
4
4
|
"description": "Seed CLI Tools",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"webpack-stream": "^7.0.0",
|
|
57
57
|
"yargs": "^17.0.1"
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "c48c747d439cfff485b3589a7e48e25c41c32648"
|
|
60
60
|
}
|
package/src/tasks/build-css.js
CHANGED
|
@@ -18,15 +18,17 @@ const assets =
|
|
|
18
18
|
config.usesTailwind || tailwindConfig.mode === "jit"
|
|
19
19
|
? [
|
|
20
20
|
config.src.css,
|
|
21
|
+
config.src.scss,
|
|
21
22
|
config.src.sections,
|
|
22
23
|
config.src.layout,
|
|
23
24
|
config.src.snippets,
|
|
24
25
|
config.src.assets,
|
|
26
|
+
config.src.templates,
|
|
25
27
|
config.src.js,
|
|
26
28
|
config.src.icons,
|
|
27
29
|
config.tailwindConfig,
|
|
28
30
|
]
|
|
29
|
-
: [config.src.css, config.tailwindConfig];
|
|
31
|
+
: [config.src.css, config.src.scss, config.tailwindConfig];
|
|
30
32
|
|
|
31
33
|
/**
|
|
32
34
|
* Process css and tailwind
|
|
@@ -36,10 +38,15 @@ const assets =
|
|
|
36
38
|
* @private
|
|
37
39
|
*/
|
|
38
40
|
function processCss() {
|
|
39
|
-
return
|
|
41
|
+
return new Promise((resolve, reject) => {
|
|
42
|
+
gulp.src(config.roots.css, { allowEmpty: true })
|
|
40
43
|
.pipe(plumber(utils.errorHandler))
|
|
41
44
|
.pipe(postcss(config.plugins.postcss))
|
|
42
45
|
.pipe(gulp.dest(config.dist.assets))
|
|
46
|
+
.on('finish', resolve)
|
|
47
|
+
.on('error', reject)
|
|
48
|
+
})
|
|
49
|
+
|
|
43
50
|
}
|
|
44
51
|
|
|
45
52
|
/**
|
|
@@ -50,11 +57,16 @@ function processCss() {
|
|
|
50
57
|
* @private
|
|
51
58
|
*/
|
|
52
59
|
function processSass() {
|
|
53
|
-
return
|
|
60
|
+
return new Promise((resolve, reject) => {
|
|
61
|
+
gulp.src(config.roots.scss, { allowEmpty: true })
|
|
54
62
|
.pipe(plumber(utils.errorHandler))
|
|
55
63
|
.pipe(sass())
|
|
56
64
|
.pipe(postcss(config.plugins.postcss))
|
|
57
65
|
.pipe(gulp.dest(config.dist.assets))
|
|
66
|
+
.on('finish', resolve)
|
|
67
|
+
.on('error', reject)
|
|
68
|
+
})
|
|
69
|
+
|
|
58
70
|
}
|
|
59
71
|
|
|
60
72
|
/**
|
|
@@ -147,10 +147,6 @@ if (config.usesTailwind) {
|
|
|
147
147
|
|
|
148
148
|
config.plugins.postcss.push(require('autoprefixer'))
|
|
149
149
|
|
|
150
|
-
if (config.optimize) {
|
|
151
|
-
config.plugins.postcss.push((cssnano({ preset: "default" })))
|
|
152
|
-
}
|
|
153
|
-
|
|
154
150
|
config.plugins.postcss.push(pxtorem({
|
|
155
151
|
rootValue: 16,
|
|
156
152
|
unitPrecision: 5,
|
|
@@ -161,6 +157,10 @@ config.plugins.postcss.push(pxtorem({
|
|
|
161
157
|
exclude: /node_modules/i
|
|
162
158
|
}))
|
|
163
159
|
|
|
160
|
+
if (config.optimize) {
|
|
161
|
+
config.plugins.postcss.push((cssnano({ preset: "default" })))
|
|
162
|
+
}
|
|
163
|
+
|
|
164
164
|
config.plugins.postcss.push(reporter({ clearReportedMessages: true }))
|
|
165
165
|
|
|
166
166
|
module.exports = config;
|