@madebyseed/seed-cli-tools 1.9.3 → 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.
@@ -29,9 +29,11 @@ var assets = config.usesTailwind || tailwindConfig.mode === "jit" ? [config.src.
29
29
  */
30
30
 
31
31
  function processCss() {
32
- return gulp.src(config.roots.css, {
33
- allowEmpty: true
34
- }).pipe(plumber(utils.errorHandler)).pipe(postcss(config.plugins.postcss)).pipe(gulp.dest(config.dist.assets));
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 gulp.src(config.roots.scss, {
47
- allowEmpty: true
48
- }).pipe(plumber(utils.errorHandler)).pipe(sass()).pipe(postcss(config.plugins.postcss)).pipe(gulp.dest(config.dist.assets));
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",
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": "80b3e39806640fcd23dada52c0dbfb9787064b63"
59
+ "gitHead": "c48c747d439cfff485b3589a7e48e25c41c32648"
60
60
  }
@@ -38,10 +38,15 @@ const assets =
38
38
  * @private
39
39
  */
40
40
  function processCss() {
41
- return gulp.src(config.roots.css, { allowEmpty: true })
41
+ return new Promise((resolve, reject) => {
42
+ gulp.src(config.roots.css, { allowEmpty: true })
42
43
  .pipe(plumber(utils.errorHandler))
43
44
  .pipe(postcss(config.plugins.postcss))
44
45
  .pipe(gulp.dest(config.dist.assets))
46
+ .on('finish', resolve)
47
+ .on('error', reject)
48
+ })
49
+
45
50
  }
46
51
 
47
52
  /**
@@ -52,11 +57,16 @@ function processCss() {
52
57
  * @private
53
58
  */
54
59
  function processSass() {
55
- return gulp.src(config.roots.scss, { allowEmpty: true })
60
+ return new Promise((resolve, reject) => {
61
+ gulp.src(config.roots.scss, { allowEmpty: true })
56
62
  .pipe(plumber(utils.errorHandler))
57
63
  .pipe(sass())
58
64
  .pipe(postcss(config.plugins.postcss))
59
65
  .pipe(gulp.dest(config.dist.assets))
66
+ .on('finish', resolve)
67
+ .on('error', reject)
68
+ })
69
+
60
70
  }
61
71
 
62
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;