balm-core 3.23.2 → 3.24.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/index.d.ts CHANGED
@@ -29,6 +29,7 @@ interface BalmStyles {
29
29
  extname: string;
30
30
  minify: boolean;
31
31
  atImportPaths: string[];
32
+ entry: string | string[];
32
33
  options: object;
33
34
  sassOptions: object;
34
35
  lessOptions: object;
package/lib/balm.js CHANGED
@@ -44,9 +44,11 @@ var Balm = /*#__PURE__*/function () {
44
44
 
45
45
  BalmJS.loading = false;
46
46
 
47
- _loading["default"].succeed();
47
+ if (!BalmJS.useCacache) {
48
+ _loading["default"].succeed();
48
49
 
49
- (0, _classPrivateFieldSet2["default"])(this, _config, BalmJS.config);
50
+ (0, _classPrivateFieldSet2["default"])(this, _config, BalmJS.config);
51
+ }
50
52
  }
51
53
 
52
54
  (0, _createClass2["default"])(Balm, [{
@@ -7,6 +7,7 @@ exports["default"] = void 0;
7
7
  var extname = 'css';
8
8
  var minify = false;
9
9
  var atImportPaths = [];
10
+ var entry = '';
10
11
  /**
11
12
  * Cssnano optimisations
12
13
  *
@@ -67,6 +68,7 @@ var _default = {
67
68
  extname: extname,
68
69
  minify: minify,
69
70
  atImportPaths: atImportPaths,
71
+ entry: entry,
70
72
  options: options,
71
73
  sassOptions: sassOptions,
72
74
  lessOptions: lessOptions,
package/lib/hello.js CHANGED
@@ -2,12 +2,18 @@
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
4
 
5
+ var _process = require("process");
6
+
5
7
  var _events = require("events");
6
8
 
7
9
  var _cacheCore = _interopRequireDefault(require("./utilities/cache-core"));
8
10
 
9
11
  global.BalmJS = {
10
- emitter: new _events.EventEmitter()
12
+ emitter: new _events.EventEmitter(),
13
+ useCacache: +_process.versions.node.split('.')[0] >= 18
11
14
  };
12
- BalmJS.loading = true;
13
- (0, _cacheCore["default"])();
15
+
16
+ if (!BalmJS.useCacache) {
17
+ BalmJS.loading = true;
18
+ (0, _cacheCore["default"])();
19
+ }
@@ -7,36 +7,111 @@ Object.defineProperty(exports, "__esModule", {
7
7
  });
8
8
  exports["default"] = void 0;
9
9
 
10
+ var _stream = require("stream");
11
+
12
+ var _sass = _interopRequireDefault(require("sass"));
13
+
10
14
  var _replaceExt = _interopRequireDefault(require("replace-ext"));
11
15
 
12
16
  var _vinylSourcemapsApply = _interopRequireDefault(require("vinyl-sourcemaps-apply"));
13
17
 
18
+ // Reference `gulp-sass@5.1.0`
14
19
  var PLUGIN_NAME = 'sass';
15
20
 
16
- //////////////////////////////
21
+ var transformObj = function transformObj(transform) {
22
+ return new _stream.Transform({
23
+ transform: transform,
24
+ objectMode: true
25
+ });
26
+ };
27
+ /**
28
+ * Handles returning the file to the stream
29
+ */
30
+
31
+
32
+ var filePush = function filePush(file, sassObject, callback) {
33
+ // Build Source Maps!
34
+ if (sassObject.map) {
35
+ // Transform map into JSON
36
+ var sassMap = JSON.parse(sassObject.map.toString()); // Grab the stdout and transform it into stdin
37
+
38
+ var sassMapFile = sassMap.file.replace(/^stdout$/, 'stdin'); // Grab the base filename that's being worked on
39
+
40
+ var sassFileSrc = file.relative; // Grab the path portion of the file that's being worked on
41
+
42
+ var sassFileSrcPath = path.dirname(sassFileSrc);
43
+
44
+ if (sassFileSrcPath) {
45
+ var sourceFileIndex = sassMap.sources.indexOf(sassMapFile); // Prepend the path to all files in the sources array except the file that's being worked on
46
+
47
+ sassMap.sources = sassMap.sources.map(function (source, index) {
48
+ return index === sourceFileIndex ? source : path.join(sassFileSrcPath, source);
49
+ });
50
+ } // Remove 'stdin' from sources and replace with filenames!
51
+
52
+
53
+ sassMap.sources = sassMap.sources.filter(function (src) {
54
+ return src !== 'stdin' && src;
55
+ }); // Replace the map file with the original filename (but new extension)
56
+
57
+ sassMap.file = (0, _replaceExt["default"])(sassFileSrc, '.css'); // Apply the map
58
+
59
+ (0, _vinylSourcemapsApply["default"])(file, sassMap);
60
+ }
61
+
62
+ file.contents = sassObject.css;
63
+ file.path = (0, _replaceExt["default"])(file.path, '.css');
64
+
65
+ if (file.stat) {
66
+ file.stat.atime = file.stat.mtime = file.stat.ctime = new Date();
67
+ }
68
+
69
+ callback(null, file);
70
+ };
71
+ /**
72
+ * Handles error message
73
+ */
74
+
75
+
76
+ var handleError = function handleError(error, file, callback) {
77
+ var filePath = (error.file === 'stdin' ? file.path : error.file) || file.path;
78
+ var relativePath = path.relative(process.cwd(), filePath);
79
+ var message = "".concat(require('ansi-colors').underline(relativePath), "\n").concat(error.formatted);
80
+ error.messageFormatted = message;
81
+ error.messageOriginal = error.message;
82
+ error.message = require('strip-ansi')(message);
83
+ error.relativePath = relativePath;
84
+ return callback(new PluginError(PLUGIN_NAME, error));
85
+ }; //////////////////////////////
17
86
  // Main Gulp Sass function
18
87
  //////////////////////////////
88
+
89
+
19
90
  var gulpSass = function gulpSass(options) {
20
- return through2.obj(function (file, encoding, cb) {
91
+ return transformObj(function (file, encoding, callback) {
21
92
  if (file.isNull()) {
22
- return cb(null, file);
93
+ callback(null, file);
94
+ return;
23
95
  }
24
96
 
25
97
  if (file.isStream()) {
26
- return cb(new PluginError(PLUGIN_NAME, 'Streaming not supported'));
98
+ callback(new PluginError(PLUGIN_NAME, 'Streaming not supported'));
99
+ return;
27
100
  }
28
101
 
29
- if (path.basename(file.path).indexOf('_') === 0) {
30
- return cb();
102
+ if (path.basename(file.path).startsWith('_')) {
103
+ callback();
104
+ return;
31
105
  }
32
106
 
33
107
  if (!file.contents.length) {
34
108
  file.path = (0, _replaceExt["default"])(file.path, '.css');
35
- return cb(null, file);
109
+ callback(null, file);
110
+ return;
36
111
  }
37
112
 
38
113
  var opts = options || {};
39
- opts.data = file.contents.toString(); // we set the file path here so that libsass can correctly resolve import paths
114
+ opts.data = file.contents.toString(); // We set the file path here so that libsass can correctly resolve import paths
40
115
 
41
116
  opts.file = file.path; // Ensure `indentedSyntax` is true if a `.sass` file
42
117
 
@@ -53,90 +128,25 @@ var gulpSass = function gulpSass(options) {
53
128
  opts.includePaths = [];
54
129
  }
55
130
 
56
- opts.includePaths.unshift(path.dirname(file.path)); // Generate Source Maps if plugin source-map present
131
+ opts.includePaths.unshift(path.dirname(file.path)); // Generate Source Maps if the source-map plugin is present
57
132
 
58
133
  if (file.sourceMap) {
59
134
  opts.sourceMap = file.path;
60
135
  opts.omitSourceMapUrl = true;
61
136
  opts.sourceMapContents = true;
62
137
  } //////////////////////////////
63
- // Handles returning the file to the stream
64
- //////////////////////////////
65
-
66
-
67
- var filePush = function filePush(sassObj) {
68
- var sassMap;
69
- var sassMapFile;
70
- var sassFileSrc;
71
- var sassFileSrcPath;
72
- var sourceFileIndex; // Build Source Maps!
73
-
74
- if (sassObj.map) {
75
- // Transform map into JSON
76
- sassMap = JSON.parse(sassObj.map.toString()); // Grab the stdout and transform it into stdin
77
-
78
- sassMapFile = sassMap.file.replace(/^stdout$/, 'stdin'); // Grab the base file name that's being worked on
79
-
80
- sassFileSrc = file.relative; // Grab the path portion of the file that's being worked on
81
-
82
- sassFileSrcPath = path.dirname(sassFileSrc);
83
-
84
- if (sassFileSrcPath) {
85
- // Prepend the path to all files in the sources array except the file that's being worked on
86
- sourceFileIndex = sassMap.sources.indexOf(sassMapFile);
87
- sassMap.sources = sassMap.sources.map(function (source, index) {
88
- return index === sourceFileIndex ? source : path.join(sassFileSrcPath, source);
89
- });
90
- } // Remove 'stdin' from sources and replace with filenames!
91
-
92
-
93
- sassMap.sources = sassMap.sources.filter(function (src) {
94
- return src !== 'stdin' && src;
95
- }); // Replace the map file with the original file name (but new extension)
96
-
97
- sassMap.file = (0, _replaceExt["default"])(sassFileSrc, '.css'); // Apply the map
98
-
99
- (0, _vinylSourcemapsApply["default"])(file, sassMap);
100
- }
101
-
102
- file.contents = sassObj.css;
103
- file.path = (0, _replaceExt["default"])(file.path, '.css');
104
-
105
- if (file.stat) {
106
- file.stat.atime = file.stat.mtime = file.stat.ctime = new Date();
107
- }
108
-
109
- cb(null, file);
110
- }; //////////////////////////////
111
- // Handles error message
112
- //////////////////////////////
113
-
114
-
115
- var errorM = function errorM(error) {
116
- var filePath = (error.file === 'stdin' ? file.path : error.file) || file.path;
117
- var relativePath = path.relative(process.cwd(), filePath);
118
- var message = [relativePath, error.formatted].join('\n');
119
- error.messageFormatted = message;
120
- error.messageOriginal = error.message;
121
- error.message = require('strip-ansi')(message);
122
- error.relativePath = relativePath;
123
- return cb(new PluginError(PLUGIN_NAME, error));
124
- }; //////////////////////////////
125
138
  // Sync Sass render
126
139
  //////////////////////////////
127
140
 
128
141
 
129
142
  try {
130
- gulpSass.compiler && filePush(gulpSass.compiler.renderSync(opts));
143
+ gulpSass.compiler && filePush(file, gulpSass.compiler.renderSync(opts), callback);
131
144
  } catch (error) {
132
- return errorM(error);
145
+ handleError(error, file, callback);
133
146
  }
134
147
  });
135
148
  };
136
149
 
137
- var _default = function _default(options) {
138
- gulpSass.compiler = require('sass');
139
- return gulpSass(options);
140
- };
141
-
150
+ gulpSass.compiler = _sass["default"];
151
+ var _default = gulpSass;
142
152
  exports["default"] = _default;
@@ -50,7 +50,18 @@ var BalmStyleTask = /*#__PURE__*/function (_BalmTask) {
50
50
  extname = 'css';
51
51
  }
52
52
 
53
- _this.defaultInput = path.join(BalmJS.config.src.css, '**', "!(_*).".concat(extname));
53
+ if (Array.isArray(BalmJS.config.styles.entry)) {
54
+ _this.defaultInput = BalmJS.config.styles.entry.map(function (styleEntry) {
55
+ return path.join(BalmJS.config.src.css, styleEntry);
56
+ });
57
+ } else {
58
+ if (BalmJS.config.styles.entry) {
59
+ _this.defaultInput = path.join(BalmJS.config.src.css, BalmJS.config.styles.entry);
60
+ } else {
61
+ _this.defaultInput = path.join(BalmJS.config.src.css, '**', "!(_*).".concat(extname));
62
+ }
63
+ }
64
+
54
65
  _this.defaultOutput = BalmJS.config.env.isMP ? path.join(BalmJS.config.dest.base, _constants.MP_ASSETS, BalmJS.config.paths.target.css) : BalmJS.config.dest.css;
55
66
  return _this;
56
67
  }
@@ -36,14 +36,14 @@ var BalmCompiling = /*#__PURE__*/function () {
36
36
  (0, _createClass2["default"])(BalmCompiling, [{
37
37
  key: "start",
38
38
  value: function start() {
39
- if ((0, _classPrivateFieldGet2["default"])(this, _firstCompile)) {
39
+ if (!BalmJS.useCacache && (0, _classPrivateFieldGet2["default"])(this, _firstCompile)) {
40
40
  _loading["default"].render('Compiling to JS...');
41
41
  }
42
42
  }
43
43
  }, {
44
44
  key: "stop",
45
45
  value: function stop() {
46
- if ((0, _classPrivateFieldGet2["default"])(this, _firstCompile)) {
46
+ if (!BalmJS.useCacache && (0, _classPrivateFieldGet2["default"])(this, _firstCompile)) {
47
47
  (0, _classPrivateFieldSet2["default"])(this, _firstCompile, false);
48
48
 
49
49
  _loading["default"].clear();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "balm-core",
3
- "version": "3.23.2",
3
+ "version": "3.24.0",
4
4
  "description": "BalmJS compiler core",
5
5
  "keywords": [
6
6
  "balm",
@@ -40,15 +40,15 @@
40
40
  "directory": "packages/balm-core"
41
41
  },
42
42
  "dependencies": {
43
- "ansi-colors": "^4.1.1",
43
+ "ansi-colors": "^4.1.3",
44
44
  "async": "^3.2.3",
45
45
  "autoprefixer": "9",
46
46
  "babel-loader": "^8.2.5",
47
- "browser-sync": "^2.27.9",
47
+ "browser-sync": "^2.27.10",
48
48
  "connect-history-api-fallback": "^1.6.0",
49
49
  "css-loader": "5",
50
50
  "cssnano": "4",
51
- "del": "^6.0.0",
51
+ "del": "^6.1.0",
52
52
  "esbuild": "^0.14",
53
53
  "fancy-log": "^2.0.0",
54
54
  "file-loader": "^6.2.0",
@@ -70,7 +70,7 @@
70
70
  "less": "^4.1.2",
71
71
  "mini-css-extract-plugin": "1",
72
72
  "modernizr": "^3.12.0",
73
- "optimize-css-assets-webpack-plugin": "^6.0.1",
73
+ "optimize-css-assets-webpack-plugin": "5",
74
74
  "parents": "^1.0.1",
75
75
  "plugin-error": "^1.0.1",
76
76
  "postcss": "7",
@@ -78,7 +78,7 @@
78
78
  "postcss-load-config": "2",
79
79
  "postcss-loader": "4",
80
80
  "postcss-preset-env": "6",
81
- "postcss-safe-parser": "5",
81
+ "postcss-safe-parser": "4",
82
82
  "pretty-bytes": "5",
83
83
  "readable-stream": "^3.6.0",
84
84
  "replace-ext": "^2.0.0",
@@ -104,18 +104,18 @@
104
104
  "workbox-build": "^6.5.3"
105
105
  },
106
106
  "devDependencies": {
107
- "@types/express": "^4.17.13",
107
+ "@types/express": "^4",
108
108
  "@types/node": "^17",
109
109
  "@types/webpack": "4"
110
110
  },
111
111
  "optionalDependencies": {
112
- "imagemin-gifsicle": "^7.0.0",
113
- "imagemin-mozjpeg": "^9.0.0",
114
- "imagemin-optipng": "^8.0.0",
115
- "imagemin-svgo": "^9.0.0"
112
+ "imagemin-gifsicle": "7",
113
+ "imagemin-mozjpeg": "9",
114
+ "imagemin-optipng": "8",
115
+ "imagemin-svgo": "9"
116
116
  },
117
117
  "engines": {
118
118
  "node": ">=10.13.0"
119
119
  },
120
- "gitHead": "b411c85a2dac2c93648c22c7c662a90280246cd0"
120
+ "gitHead": "f0802441a0303e5ffd9ade8b7d1bfeee27987ca1"
121
121
  }
package/tslib/balm.js CHANGED
@@ -12,8 +12,10 @@ class Balm {
12
12
  constructor() {
13
13
  _Balm_config.set(this, void 0);
14
14
  BalmJS.loading = false;
15
- loading_1.default.succeed();
16
- tslib_1.__classPrivateFieldSet(this, _Balm_config, BalmJS.config, "f");
15
+ if (!BalmJS.useCacache) {
16
+ loading_1.default.succeed();
17
+ tslib_1.__classPrivateFieldSet(this, _Balm_config, BalmJS.config, "f");
18
+ }
17
19
  }
18
20
  get config() {
19
21
  return tslib_1.__classPrivateFieldGet(this, _Balm_config, "f");
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const extname = 'css';
4
4
  const minify = false;
5
5
  const atImportPaths = [];
6
+ const entry = '';
6
7
  const options = {
7
8
  discardComments: {
8
9
  removeAll: true
@@ -25,6 +26,7 @@ exports.default = {
25
26
  extname,
26
27
  minify,
27
28
  atImportPaths,
29
+ entry,
28
30
  options,
29
31
  sassOptions,
30
32
  lessOptions,
package/tslib/hello.js CHANGED
@@ -1,10 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
+ const process_1 = require("process");
4
5
  const events_1 = require("events");
5
6
  const cache_core_1 = tslib_1.__importDefault(require("./utilities/cache-core"));
6
7
  global.BalmJS = {
7
- emitter: new events_1.EventEmitter()
8
+ emitter: new events_1.EventEmitter(),
9
+ useCacache: +process_1.versions.node.split('.')[0] >= 18
8
10
  };
9
- BalmJS.loading = true;
10
- (0, cache_core_1.default)();
11
+ if (!BalmJS.useCacache) {
12
+ BalmJS.loading = true;
13
+ (0, cache_core_1.default)();
14
+ }
@@ -1,22 +1,61 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
+ const stream_1 = require("stream");
5
+ const sass_1 = tslib_1.__importDefault(require("sass"));
4
6
  const replace_ext_1 = tslib_1.__importDefault(require("replace-ext"));
5
7
  const vinyl_sourcemaps_apply_1 = tslib_1.__importDefault(require("vinyl-sourcemaps-apply"));
6
8
  const PLUGIN_NAME = 'sass';
7
- const gulpSass = (options) => through2.obj((file, encoding, cb) => {
9
+ const transformObj = (transform) => new stream_1.Transform({ transform, objectMode: true });
10
+ const filePush = (file, sassObject, callback) => {
11
+ if (sassObject.map) {
12
+ const sassMap = JSON.parse(sassObject.map.toString());
13
+ const sassMapFile = sassMap.file.replace(/^stdout$/, 'stdin');
14
+ const sassFileSrc = file.relative;
15
+ const sassFileSrcPath = path.dirname(sassFileSrc);
16
+ if (sassFileSrcPath) {
17
+ const sourceFileIndex = sassMap.sources.indexOf(sassMapFile);
18
+ sassMap.sources = sassMap.sources.map((source, index) => index === sourceFileIndex ? source : path.join(sassFileSrcPath, source));
19
+ }
20
+ sassMap.sources = sassMap.sources.filter((src) => src !== 'stdin' && src);
21
+ sassMap.file = (0, replace_ext_1.default)(sassFileSrc, '.css');
22
+ (0, vinyl_sourcemaps_apply_1.default)(file, sassMap);
23
+ }
24
+ file.contents = sassObject.css;
25
+ file.path = (0, replace_ext_1.default)(file.path, '.css');
26
+ if (file.stat) {
27
+ file.stat.atime = file.stat.mtime = file.stat.ctime = new Date();
28
+ }
29
+ callback(null, file);
30
+ };
31
+ const handleError = (error, file, callback) => {
32
+ const filePath = ((error.file === 'stdin' ? file.path : error.file) ||
33
+ file.path);
34
+ const relativePath = path.relative(process.cwd(), filePath);
35
+ const message = `${require('ansi-colors').underline(relativePath)}\n${error.formatted}`;
36
+ error.messageFormatted = message;
37
+ error.messageOriginal = error.message;
38
+ error.message = require('strip-ansi')(message);
39
+ error.relativePath = relativePath;
40
+ return callback(new PluginError(PLUGIN_NAME, error));
41
+ };
42
+ const gulpSass = (options) => transformObj((file, encoding, callback) => {
8
43
  if (file.isNull()) {
9
- return cb(null, file);
44
+ callback(null, file);
45
+ return;
10
46
  }
11
47
  if (file.isStream()) {
12
- return cb(new PluginError(PLUGIN_NAME, 'Streaming not supported'));
48
+ callback(new PluginError(PLUGIN_NAME, 'Streaming not supported'));
49
+ return;
13
50
  }
14
- if (path.basename(file.path).indexOf('_') === 0) {
15
- return cb();
51
+ if (path.basename(file.path).startsWith('_')) {
52
+ callback();
53
+ return;
16
54
  }
17
55
  if (!file.contents.length) {
18
56
  file.path = (0, replace_ext_1.default)(file.path, '.css');
19
- return cb(null, file);
57
+ callback(null, file);
58
+ return;
20
59
  }
21
60
  const opts = (options || {});
22
61
  opts.data = file.contents.toString();
@@ -38,55 +77,13 @@ const gulpSass = (options) => through2.obj((file, encoding, cb) => {
38
77
  opts.omitSourceMapUrl = true;
39
78
  opts.sourceMapContents = true;
40
79
  }
41
- const filePush = (sassObj) => {
42
- let sassMap;
43
- let sassMapFile;
44
- let sassFileSrc;
45
- let sassFileSrcPath;
46
- let sourceFileIndex;
47
- if (sassObj.map) {
48
- sassMap = JSON.parse(sassObj.map.toString());
49
- sassMapFile = sassMap.file.replace(/^stdout$/, 'stdin');
50
- sassFileSrc = file.relative;
51
- sassFileSrcPath = path.dirname(sassFileSrc);
52
- if (sassFileSrcPath) {
53
- sourceFileIndex = sassMap.sources.indexOf(sassMapFile);
54
- sassMap.sources = sassMap.sources.map((source, index) => {
55
- return index === sourceFileIndex
56
- ? source
57
- : path.join(sassFileSrcPath, source);
58
- });
59
- }
60
- sassMap.sources = sassMap.sources.filter((src) => src !== 'stdin' && src);
61
- sassMap.file = (0, replace_ext_1.default)(sassFileSrc, '.css');
62
- (0, vinyl_sourcemaps_apply_1.default)(file, sassMap);
63
- }
64
- file.contents = sassObj.css;
65
- file.path = (0, replace_ext_1.default)(file.path, '.css');
66
- if (file.stat) {
67
- file.stat.atime = file.stat.mtime = file.stat.ctime = new Date();
68
- }
69
- cb(null, file);
70
- };
71
- const errorM = (error) => {
72
- const filePath = ((error.file === 'stdin' ? file.path : error.file) ||
73
- file.path);
74
- const relativePath = path.relative(process.cwd(), filePath);
75
- const message = [relativePath, error.formatted].join('\n');
76
- error.messageFormatted = message;
77
- error.messageOriginal = error.message;
78
- error.message = require('strip-ansi')(message);
79
- error.relativePath = relativePath;
80
- return cb(new PluginError(PLUGIN_NAME, error));
81
- };
82
80
  try {
83
- gulpSass.compiler && filePush(gulpSass.compiler.renderSync(opts));
81
+ gulpSass.compiler &&
82
+ filePush(file, gulpSass.compiler.renderSync(opts), callback);
84
83
  }
85
84
  catch (error) {
86
- return errorM(error);
85
+ handleError(error, file, callback);
87
86
  }
88
87
  });
89
- exports.default = (options) => {
90
- gulpSass.compiler = require('sass');
91
- return gulpSass(options);
92
- };
88
+ gulpSass.compiler = sass_1.default;
89
+ exports.default = gulpSass;
@@ -17,7 +17,17 @@ class BalmStyleTask extends balm_1.default {
17
17
  default:
18
18
  extname = 'css';
19
19
  }
20
- this.defaultInput = path.join(BalmJS.config.src.css, '**', `!(_*).${extname}`);
20
+ if (Array.isArray(BalmJS.config.styles.entry)) {
21
+ this.defaultInput = BalmJS.config.styles.entry.map((styleEntry) => path.join(BalmJS.config.src.css, styleEntry));
22
+ }
23
+ else {
24
+ if (BalmJS.config.styles.entry) {
25
+ this.defaultInput = path.join(BalmJS.config.src.css, BalmJS.config.styles.entry);
26
+ }
27
+ else {
28
+ this.defaultInput = path.join(BalmJS.config.src.css, '**', `!(_*).${extname}`);
29
+ }
30
+ }
21
31
  this.defaultOutput = BalmJS.config.env.isMP
22
32
  ? path.join(BalmJS.config.dest.base, constants_1.MP_ASSETS, BalmJS.config.paths.target.css)
23
33
  : BalmJS.config.dest.css;
@@ -8,12 +8,12 @@ class BalmCompiling {
8
8
  _BalmCompiling_firstCompile.set(this, true);
9
9
  }
10
10
  start() {
11
- if (tslib_1.__classPrivateFieldGet(this, _BalmCompiling_firstCompile, "f")) {
11
+ if (!BalmJS.useCacache && tslib_1.__classPrivateFieldGet(this, _BalmCompiling_firstCompile, "f")) {
12
12
  loading_1.default.render('Compiling to JS...');
13
13
  }
14
14
  }
15
15
  stop() {
16
- if (tslib_1.__classPrivateFieldGet(this, _BalmCompiling_firstCompile, "f")) {
16
+ if (!BalmJS.useCacache && tslib_1.__classPrivateFieldGet(this, _BalmCompiling_firstCompile, "f")) {
17
17
  tslib_1.__classPrivateFieldSet(this, _BalmCompiling_firstCompile, false, "f");
18
18
  loading_1.default.clear();
19
19
  }