balm-core 3.21.0 → 3.23.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 +9 -16
- package/lib/config/globals.js +1 -1
- package/lib/config/scripts.js +3 -3
- package/lib/plugins/sass.js +88 -78
- package/lib/tasks/public/sass.js +2 -1
- package/lib/tasks/public/webpack.js +14 -11
- package/lib/utilities/loading.js +3 -1
- package/package.json +16 -16
- package/tslib/balm.js +6 -6
- package/tslib/bootstrap/index.js +1 -1
- package/tslib/bundler/esbuild/index.js +2 -2
- package/tslib/bundler/esbuild/transform.js +2 -2
- package/tslib/bundler/rollup/index.js +4 -4
- package/tslib/bundler/webpack/config/common.js +1 -1
- package/tslib/bundler/webpack/config/dev.js +2 -2
- package/tslib/bundler/webpack/config/index.js +2 -2
- package/tslib/bundler/webpack/config/prod.js +2 -2
- package/tslib/bundler/webpack/index.js +4 -4
- package/tslib/bundler/webpack/loaders.js +2 -2
- package/tslib/config/globals.js +4 -4
- package/tslib/config/index.js +13 -13
- package/tslib/config/scripts.js +3 -3
- package/tslib/config/version.js +1 -1
- package/tslib/hello.js +1 -1
- package/tslib/hooks/index.js +1 -1
- package/tslib/index.js +2 -2
- package/tslib/middlewares/index.js +3 -3
- package/tslib/plugins/imagemin.js +1 -1
- package/tslib/plugins/index.js +11 -11
- package/tslib/plugins/less.js +3 -3
- package/tslib/plugins/postcss.js +1 -1
- package/tslib/plugins/replace.js +1 -1
- package/tslib/plugins/sass.js +52 -55
- package/tslib/plugins/sftp.js +1 -1
- package/tslib/tasks/foundation/balm_style.js +1 -1
- package/tslib/tasks/foundation/index.js +2 -2
- package/tslib/tasks/index.js +3 -3
- package/tslib/tasks/private/clean.js +2 -2
- package/tslib/tasks/private/modernizr.js +4 -4
- package/tslib/tasks/private/sprite.js +4 -4
- package/tslib/tasks/public/esbuild.js +1 -1
- package/tslib/tasks/public/html.js +5 -5
- package/tslib/tasks/public/publish.js +3 -3
- package/tslib/tasks/public/remove.js +1 -1
- package/tslib/tasks/public/rollup.js +1 -1
- package/tslib/tasks/public/sass.js +2 -1
- package/tslib/tasks/public/server.js +9 -9
- package/tslib/tasks/public/url.js +2 -2
- package/tslib/tasks/public/webpack.js +17 -8
- package/tslib/utilities/address.js +1 -1
- package/tslib/utilities/cache-core.js +3 -3
- package/tslib/utilities/color.js +1 -1
- package/tslib/utilities/compiling.js +4 -4
- package/tslib/utilities/detect-port.js +2 -2
- package/tslib/utilities/file.js +2 -2
- package/tslib/utilities/index.js +4 -4
- package/tslib/utilities/loading.js +8 -8
- package/tslib/utilities/logger.js +8 -8
- package/tslib/utilities/replacestream.js +1 -1
- package/tslib/utilities/utils.js +1 -1
package/README.md
CHANGED
|
@@ -5,17 +5,16 @@
|
|
|
5
5
|
<br>
|
|
6
6
|
<br>
|
|
7
7
|
|
|
8
|
-
[![NPM version][balm-image]][balm-url]
|
|
8
|
+
[![NPM version][balm-core-image]][balm-core-url]
|
|
9
9
|
[![License][license-image]][license-url]
|
|
10
|
-
[![Dependency Status][deps-image]][deps-url]
|
|
11
|
-
[![Build Status][travis-image]][travis-url]
|
|
12
|
-
[![Build Status][appveyor-image]][appveyor-url]
|
|
13
10
|
[![Coverage Percentage][cover-image]][cover-url]
|
|
14
11
|
|
|
15
12
|
<h1>BalmJS</h1>
|
|
16
13
|
<p>An universal Front-End workflow for webapps</p>
|
|
17
14
|
</div>
|
|
18
15
|
|
|
16
|
+
> :tada: [`balm-core@next`](https://github.com/balmjs/balm/tree/main)(v4) supports for `node@12+`, `sass@latest`, `postcss@8`, `webpack@5`
|
|
17
|
+
|
|
19
18
|
## Introduction
|
|
20
19
|
|
|
21
20
|
BalmJS prescribes best practices and tools to help you stay productive.
|
|
@@ -173,25 +172,19 @@ We'd love for you to contribute and make BalmJS even better than it is today! Pl
|
|
|
173
172
|
|
|
174
173
|
© 2016-present, [Elf-mousE](http://elf-mouse.me/)
|
|
175
174
|
|
|
176
|
-
[balm-core-image]: https://
|
|
175
|
+
[balm-core-image]: https://img.shields.io/npm/v/balm-core.svg
|
|
177
176
|
[balm-core-url]: https://npmjs.org/package/balm-core
|
|
178
|
-
[balm-image]: https://
|
|
177
|
+
[balm-image]: https://img.shields.io/npm/v/balm.svg
|
|
179
178
|
[balm-url]: https://npmjs.org/package/balm
|
|
180
179
|
[license-image]: https://img.shields.io/npm/l/balm-core.svg?sanitize=true
|
|
181
180
|
[license-url]: https://www.npmjs.com/package/balm-core
|
|
182
|
-
[deps-image]: https://david-dm.org/balmjs/balm.svg?path=packages/balm-core&theme=shields.io
|
|
183
|
-
[deps-url]: https://david-dm.org/balmjs/balm?path=packages/balm-core
|
|
184
|
-
[travis-image]: https://travis-ci.com/balmjs/balm.svg?branch=master
|
|
185
|
-
[travis-url]: https://travis-ci.com/balmjs/balm
|
|
186
|
-
[appveyor-image]: https://ci.appveyor.com/api/projects/status/github/balmjs/balm?svg=true
|
|
187
|
-
[appveyor-url]: https://ci.appveyor.com/project/balmjs/balm
|
|
188
181
|
[cover-image]: https://coveralls.io/repos/balmjs/balm/badge.svg
|
|
189
182
|
[cover-url]: https://coveralls.io/r/balmjs/balm
|
|
190
|
-
[balm-cli-image]: https://
|
|
183
|
+
[balm-cli-image]: https://img.shields.io/npm/v/balm-cli.svg
|
|
191
184
|
[balm-cli-url]: https://npmjs.org/package/balm-cli
|
|
192
|
-
[balm-ui-lite-image]: https://
|
|
185
|
+
[balm-ui-lite-image]: https://img.shields.io/npm/v/balm-ui-lite.svg
|
|
193
186
|
[balm-ui-lite-url]: https://npmjs.org/package/balm-ui-lite
|
|
194
|
-
[balm-ui-image]: https://
|
|
187
|
+
[balm-ui-image]: https://img.shields.io/npm/v/balm-ui.svg
|
|
195
188
|
[balm-ui-url]: https://npmjs.org/package/balm-ui
|
|
196
|
-
[balm-scroll-image]: https://
|
|
189
|
+
[balm-scroll-image]: https://img.shields.io/npm/v/balm-scroll.svg
|
|
197
190
|
[balm-scroll-url]: https://npmjs.org/package/balm-scroll
|
package/lib/config/globals.js
CHANGED
|
@@ -10,7 +10,7 @@ var _ansiColors = _interopRequireDefault(require("ansi-colors"));
|
|
|
10
10
|
|
|
11
11
|
// Set env var for ORIGINAL cwd before anything touches it
|
|
12
12
|
process.env.BALM_CWD = process.env.INIT_CWD || process.cwd();
|
|
13
|
-
var gulpModule = "".concat(process.env.
|
|
13
|
+
var gulpModule = "".concat(process.env.BALM_ROOT || process.env.BALM_CWD, "/node_modules/gulp/index.js");
|
|
14
14
|
|
|
15
15
|
if (!_fs["default"].existsSync(gulpModule)) {
|
|
16
16
|
console.error(_ansiColors["default"].bgBlueBright('BalmJS'), _ansiColors["default"].yellow('`balm` module not found :('));
|
package/lib/config/scripts.js
CHANGED
|
@@ -105,10 +105,10 @@ var externals = ''; // Stats
|
|
|
105
105
|
|
|
106
106
|
var stats = {
|
|
107
107
|
colors: true,
|
|
108
|
+
assets: true,
|
|
109
|
+
children: false,
|
|
108
110
|
chunks: false,
|
|
109
|
-
|
|
110
|
-
modules: false,
|
|
111
|
-
children: false
|
|
111
|
+
modules: false
|
|
112
112
|
};
|
|
113
113
|
/**
|
|
114
114
|
* Full custom webpack configuration
|
package/lib/plugins/sass.js
CHANGED
|
@@ -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
|
|
91
|
+
return transformObj(function (file, encoding, callback) {
|
|
21
92
|
if (file.isNull()) {
|
|
22
|
-
|
|
93
|
+
callback(null, file);
|
|
94
|
+
return;
|
|
23
95
|
}
|
|
24
96
|
|
|
25
97
|
if (file.isStream()) {
|
|
26
|
-
|
|
98
|
+
callback(new PluginError(PLUGIN_NAME, 'Streaming not supported'));
|
|
99
|
+
return;
|
|
27
100
|
}
|
|
28
101
|
|
|
29
|
-
if (path.basename(file.path).
|
|
30
|
-
|
|
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
|
-
|
|
109
|
+
callback(null, file);
|
|
110
|
+
return;
|
|
36
111
|
}
|
|
37
112
|
|
|
38
113
|
var opts = options || {};
|
|
39
|
-
opts.data = file.contents.toString(); //
|
|
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
|
|
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
|
-
|
|
145
|
+
handleError(error, file, callback);
|
|
133
146
|
}
|
|
134
147
|
});
|
|
135
148
|
};
|
|
136
149
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
return gulpSass(options);
|
|
140
|
-
};
|
|
141
|
-
|
|
150
|
+
gulpSass.compiler = _sass["default"];
|
|
151
|
+
var _default = gulpSass;
|
|
142
152
|
exports["default"] = _default;
|
package/lib/tasks/public/sass.js
CHANGED
|
@@ -36,7 +36,8 @@ var SassTask = /*#__PURE__*/function (_BalmJS$BalmStyleTask) {
|
|
|
36
36
|
get: function get() {
|
|
37
37
|
return Object.assign({
|
|
38
38
|
includePaths: BalmJS.file.stylePaths,
|
|
39
|
-
outputStyle: 'expanded'
|
|
39
|
+
outputStyle: 'expanded',
|
|
40
|
+
quietDeps: BalmJS.config.logs.level < BalmJS.LogLevel.Warn
|
|
40
41
|
}, BalmJS.config.styles.sassOptions, this.customOptions);
|
|
41
42
|
}
|
|
42
43
|
}, {
|
|
@@ -51,20 +51,23 @@ var WebpackTask = /*#__PURE__*/function (_BalmJS$BalmTask) {
|
|
|
51
51
|
_compiling["default"].start();
|
|
52
52
|
|
|
53
53
|
BalmJS.webpackCompiler = (0, _webpack.webpack)((0, _webpack.webpackConfig)(_this.input, _this.output, customOptions, isHook), function (error, stats) {
|
|
54
|
-
_compiling["default"].stop();
|
|
55
|
-
// if (error) {
|
|
56
|
-
// BalmJS.logger.error(`${this.name} task`, error.stack || error);
|
|
57
|
-
// if (error.details) {
|
|
58
|
-
// BalmJS.logger.error(`${this.name} task`, error.details);
|
|
59
|
-
// }
|
|
60
|
-
// return;
|
|
61
|
-
// }
|
|
54
|
+
_compiling["default"].stop();
|
|
62
55
|
|
|
56
|
+
try {
|
|
57
|
+
var scriptLogLevel = stats.hasErrors() ? BalmJS.LogLevel.Error : stats.hasWarnings() ? BalmJS.LogLevel.Warn : BalmJS.LogLevel.Info;
|
|
63
58
|
|
|
64
|
-
|
|
59
|
+
if (BalmJS.config.logs.level <= scriptLogLevel) {
|
|
60
|
+
console.log(stats.toString(BalmJS.config.scripts.stats));
|
|
61
|
+
}
|
|
62
|
+
} catch (e) {
|
|
63
|
+
// Handle errors here
|
|
64
|
+
BalmJS.logger.error("".concat(_this.name, " task"), error.stack || error);
|
|
65
65
|
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
if (error.details) {
|
|
67
|
+
BalmJS.logger.error("".concat(_this.name, " task"), error.details);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
return;
|
|
68
71
|
}
|
|
69
72
|
|
|
70
73
|
fn && fn(); // Done processing
|
package/lib/utilities/loading.js
CHANGED
|
@@ -54,9 +54,11 @@ var BalmLoading = /*#__PURE__*/function () {
|
|
|
54
54
|
(0, _createClass2["default"])(BalmLoading, [{
|
|
55
55
|
key: "frame",
|
|
56
56
|
get: function get() {
|
|
57
|
+
var _this$frameIndex;
|
|
58
|
+
|
|
57
59
|
var currentFrame = _spinner["default"].frames[(0, _classPrivateFieldGet2["default"])(this, _frameIndex)];
|
|
58
60
|
|
|
59
|
-
(0, _classPrivateFieldSet2["default"])(this, _frameIndex, (0, _classPrivateFieldSet2["default"])(this, _frameIndex,
|
|
61
|
+
(0, _classPrivateFieldSet2["default"])(this, _frameIndex, (0, _classPrivateFieldSet2["default"])(this, _frameIndex, (_this$frameIndex = (0, _classPrivateFieldGet2["default"])(this, _frameIndex), ++_this$frameIndex)) % (0, _classPrivateFieldGet2["default"])(this, _frameCount));
|
|
60
62
|
return currentFrame;
|
|
61
63
|
}
|
|
62
64
|
}, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "balm-core",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.23.1",
|
|
4
4
|
"description": "BalmJS compiler core",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"balm",
|
|
@@ -42,12 +42,12 @@
|
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"ansi-colors": "^4.1.1",
|
|
44
44
|
"async": "^3.2.3",
|
|
45
|
-
"autoprefixer": "
|
|
46
|
-
"babel-loader": "^8.2.
|
|
47
|
-
"browser-sync": "^2.27.
|
|
45
|
+
"autoprefixer": "9",
|
|
46
|
+
"babel-loader": "^8.2.5",
|
|
47
|
+
"browser-sync": "^2.27.9",
|
|
48
48
|
"connect-history-api-fallback": "^1.6.0",
|
|
49
49
|
"css-loader": "5",
|
|
50
|
-
"cssnano": "
|
|
50
|
+
"cssnano": "4",
|
|
51
51
|
"del": "^6.0.0",
|
|
52
52
|
"esbuild": "^0.14",
|
|
53
53
|
"fancy-log": "^2.0.0",
|
|
@@ -69,31 +69,31 @@
|
|
|
69
69
|
"istextorbinary": "^6.0.0",
|
|
70
70
|
"less": "^4.1.2",
|
|
71
71
|
"mini-css-extract-plugin": "1",
|
|
72
|
-
"modernizr": "^3.
|
|
72
|
+
"modernizr": "^3.12.0",
|
|
73
73
|
"optimize-css-assets-webpack-plugin": "^6.0.1",
|
|
74
74
|
"parents": "^1.0.1",
|
|
75
75
|
"plugin-error": "^1.0.1",
|
|
76
|
-
"postcss": "
|
|
77
|
-
"postcss-import": "
|
|
78
|
-
"postcss-load-config": "
|
|
76
|
+
"postcss": "7",
|
|
77
|
+
"postcss-import": "12",
|
|
78
|
+
"postcss-load-config": "2",
|
|
79
79
|
"postcss-loader": "4",
|
|
80
80
|
"postcss-preset-env": "6",
|
|
81
81
|
"postcss-safe-parser": "5",
|
|
82
|
-
"pretty-bytes": "
|
|
82
|
+
"pretty-bytes": "5",
|
|
83
83
|
"readable-stream": "^3.6.0",
|
|
84
84
|
"replace-ext": "^2.0.0",
|
|
85
85
|
"require-dir": "^1.2.0",
|
|
86
|
-
"rollup": "^2.
|
|
86
|
+
"rollup": "^2.68.0",
|
|
87
87
|
"rollup-plugin-terser": "^7.0.2",
|
|
88
88
|
"sass": "1.39.2",
|
|
89
89
|
"ssh2": "0.8.9",
|
|
90
90
|
"strip-ansi": "6",
|
|
91
91
|
"style-loader": "2",
|
|
92
|
-
"terser": "^5.
|
|
92
|
+
"terser": "^5.13.0",
|
|
93
93
|
"terser-webpack-plugin": "4",
|
|
94
94
|
"through2": "^4.0.2",
|
|
95
95
|
"through2-concurrent": "^2.0.0",
|
|
96
|
-
"tslib": "^2.
|
|
96
|
+
"tslib": "^2.4.0",
|
|
97
97
|
"url-loader": "^4.1.1",
|
|
98
98
|
"vinyl-sourcemaps-apply": "^0.2.1",
|
|
99
99
|
"webpack": "4",
|
|
@@ -101,11 +101,11 @@
|
|
|
101
101
|
"webpack-dev-middleware": "3",
|
|
102
102
|
"webpack-hot-middleware": "^2.25.1",
|
|
103
103
|
"webpack-merge": "^5.8.0",
|
|
104
|
-
"workbox-build": "^6.
|
|
104
|
+
"workbox-build": "^6.5.3"
|
|
105
105
|
},
|
|
106
106
|
"devDependencies": {
|
|
107
107
|
"@types/express": "^4.17.13",
|
|
108
|
-
"@types/node": "^17
|
|
108
|
+
"@types/node": "^17",
|
|
109
109
|
"@types/webpack": "4"
|
|
110
110
|
},
|
|
111
111
|
"optionalDependencies": {
|
|
@@ -117,5 +117,5 @@
|
|
|
117
117
|
"engines": {
|
|
118
118
|
"node": ">=10.13.0"
|
|
119
119
|
},
|
|
120
|
-
"gitHead": "
|
|
120
|
+
"gitHead": "dc9280e2ecb912ff389d795634ad460a4ac2e962"
|
|
121
121
|
}
|
package/tslib/balm.js
CHANGED
|
@@ -5,22 +5,22 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
require("./config");
|
|
6
6
|
require("./utilities");
|
|
7
7
|
require("./plugins");
|
|
8
|
-
const tasks_1 =
|
|
8
|
+
const tasks_1 = tslib_1.__importDefault(require("./tasks"));
|
|
9
9
|
const bootstrap_1 = require("./bootstrap");
|
|
10
|
-
const loading_1 =
|
|
10
|
+
const loading_1 = tslib_1.__importDefault(require("./utilities/loading"));
|
|
11
11
|
class Balm {
|
|
12
12
|
constructor() {
|
|
13
13
|
_Balm_config.set(this, void 0);
|
|
14
14
|
BalmJS.loading = false;
|
|
15
15
|
loading_1.default.succeed();
|
|
16
|
-
|
|
16
|
+
tslib_1.__classPrivateFieldSet(this, _Balm_config, BalmJS.config, "f");
|
|
17
17
|
}
|
|
18
18
|
get config() {
|
|
19
|
-
return
|
|
19
|
+
return tslib_1.__classPrivateFieldGet(this, _Balm_config, "f");
|
|
20
20
|
}
|
|
21
21
|
set config(value) {
|
|
22
|
-
|
|
23
|
-
BalmJS.config =
|
|
22
|
+
tslib_1.__classPrivateFieldSet(this, _Balm_config, (0, bootstrap_1.setConfig)(value), "f");
|
|
23
|
+
BalmJS.config = tslib_1.__classPrivateFieldGet(this, _Balm_config, "f");
|
|
24
24
|
}
|
|
25
25
|
set beforeTask(name) {
|
|
26
26
|
BalmJS.beforeTask = (0, bootstrap_1.setTask)(name);
|
package/tslib/bootstrap/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.setTask = exports.setConfig = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const check_config_1 =
|
|
5
|
+
const check_config_1 = tslib_1.__importDefault(require("./check_config"));
|
|
6
6
|
const constants_1 = require("../config/constants");
|
|
7
7
|
function createQuickPath(config, rootKey) {
|
|
8
8
|
const result = {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
const build_1 =
|
|
5
|
-
const transform_1 =
|
|
4
|
+
const build_1 = tslib_1.__importDefault(require("./build"));
|
|
5
|
+
const transform_1 = tslib_1.__importDefault(require("./transform"));
|
|
6
6
|
const esbuild = (input, output, customOptions, callback) => {
|
|
7
7
|
const entryPoints = BalmJS.utils.isString(input)
|
|
8
8
|
? [input]
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
const fs_1 =
|
|
4
|
+
const fs_1 = tslib_1.__importDefault(require("fs"));
|
|
5
5
|
const options_1 = require("./options");
|
|
6
6
|
const esTransform = (entryPoints, output, customTransformOptions, callback) => {
|
|
7
7
|
const build = {
|
|
@@ -15,7 +15,7 @@ const esTransform = (entryPoints, output, customTransformOptions, callback) => {
|
|
|
15
15
|
var e_1, _a;
|
|
16
16
|
try {
|
|
17
17
|
try {
|
|
18
|
-
for (var entryPoints_1 =
|
|
18
|
+
for (var entryPoints_1 = tslib_1.__asyncValues(entryPoints), entryPoints_1_1; entryPoints_1_1 = await entryPoints_1.next(), !entryPoints_1_1.done;) {
|
|
19
19
|
const entryPoint = entryPoints_1_1.value;
|
|
20
20
|
build.input = BalmJS.file.absPath(entryPoint);
|
|
21
21
|
BalmJS.logger.debug('esbuild bundler - transform', {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
const entry_1 =
|
|
5
|
-
const output_1 =
|
|
6
|
-
const build_1 =
|
|
4
|
+
const entry_1 = tslib_1.__importDefault(require("./entry"));
|
|
5
|
+
const output_1 = tslib_1.__importDefault(require("./output"));
|
|
6
|
+
const build_1 = tslib_1.__importDefault(require("./build"));
|
|
7
7
|
const buildLibrary = async (inputOptions, outputOptions) => {
|
|
8
8
|
var e_1, _a;
|
|
9
9
|
const rollup = require('rollup');
|
|
@@ -15,7 +15,7 @@ const buildLibrary = async (inputOptions, outputOptions) => {
|
|
|
15
15
|
const bundle = await rollup.rollup(rollupOptions);
|
|
16
16
|
if (Array.isArray(outputOptions)) {
|
|
17
17
|
try {
|
|
18
|
-
for (var outputOptions_1 =
|
|
18
|
+
for (var outputOptions_1 = tslib_1.__asyncValues(outputOptions), outputOptions_1_1; outputOptions_1_1 = await outputOptions_1.next(), !outputOptions_1_1.done;) {
|
|
19
19
|
const outputOption = outputOptions_1_1.value;
|
|
20
20
|
await (0, build_1.default)(bundle, outputOption);
|
|
21
21
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
const loaders_1 =
|
|
4
|
+
const loaders_1 = tslib_1.__importDefault(require("../loaders"));
|
|
5
5
|
const constants_1 = require("../../../config/constants");
|
|
6
6
|
function getDefaultPlugins(webpack, scripts) {
|
|
7
7
|
const plugins = [
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
const webpack_merge_1 =
|
|
5
|
-
const common_1 =
|
|
4
|
+
const webpack_merge_1 = tslib_1.__importDefault(require("webpack-merge"));
|
|
5
|
+
const common_1 = tslib_1.__importDefault(require("./common"));
|
|
6
6
|
function getDevConfig(webpack, scripts) {
|
|
7
7
|
return (0, webpack_merge_1.default)((0, common_1.default)(webpack, scripts), {
|
|
8
8
|
mode: 'development',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
const dev_1 =
|
|
5
|
-
const prod_1 =
|
|
4
|
+
const dev_1 = tslib_1.__importDefault(require("./dev"));
|
|
5
|
+
const prod_1 = tslib_1.__importDefault(require("./prod"));
|
|
6
6
|
function getDefaultConfig(webpack, scripts) {
|
|
7
7
|
return BalmJS.config.env.isProd || scripts.minify || scripts.ie8
|
|
8
8
|
? (0, prod_1.default)(webpack, scripts)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
const webpack_merge_1 =
|
|
5
|
-
const common_1 =
|
|
4
|
+
const webpack_merge_1 = tslib_1.__importDefault(require("webpack-merge"));
|
|
5
|
+
const common_1 = tslib_1.__importDefault(require("./common"));
|
|
6
6
|
const constants_1 = require("../../../config/constants");
|
|
7
7
|
const bundleAnalyzerReport = process.env.npm_config_report || false;
|
|
8
8
|
const getCssFilename = () => `${BalmJS.config.paths.target.css}/${constants_1.ASYNC_SCRIPTS}/[name].${constants_1.HASH_NAME_PROD}.css`;
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.webpackConfig = exports.webpack = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const webpack_merge_1 =
|
|
6
|
-
const entry_1 =
|
|
7
|
-
const output_1 =
|
|
8
|
-
const config_1 =
|
|
5
|
+
const webpack_merge_1 = tslib_1.__importDefault(require("webpack-merge"));
|
|
6
|
+
const entry_1 = tslib_1.__importDefault(require("./entry"));
|
|
7
|
+
const output_1 = tslib_1.__importDefault(require("./output"));
|
|
8
|
+
const config_1 = tslib_1.__importDefault(require("./config"));
|
|
9
9
|
const webpackModule = process.env.WEBPACK || require.resolve('webpack');
|
|
10
10
|
const webpack = require(webpackModule);
|
|
11
11
|
exports.webpack = webpack;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
const webpack_merge_1 =
|
|
5
|
-
const require_dir_1 =
|
|
4
|
+
const webpack_merge_1 = tslib_1.__importDefault(require("webpack-merge"));
|
|
5
|
+
const require_dir_1 = tslib_1.__importDefault(require("require-dir"));
|
|
6
6
|
const LOADERS = (0, require_dir_1.default)('./rules');
|
|
7
7
|
function getLoaders(customLoaders) {
|
|
8
8
|
const enableDefaultLoaders = Object.assign({
|
package/tslib/config/globals.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
const fs_1 =
|
|
5
|
-
const path_1 =
|
|
6
|
-
const ansi_colors_1 =
|
|
4
|
+
const fs_1 = tslib_1.__importDefault(require("fs"));
|
|
5
|
+
const path_1 = tslib_1.__importDefault(require("path"));
|
|
6
|
+
const ansi_colors_1 = tslib_1.__importDefault(require("ansi-colors"));
|
|
7
7
|
process.env.BALM_CWD = process.env.INIT_CWD || process.cwd();
|
|
8
|
-
const gulpModule = `${process.env.
|
|
8
|
+
const gulpModule = `${process.env.BALM_ROOT || process.env.BALM_CWD}/node_modules/gulp/index.js`;
|
|
9
9
|
if (!fs_1.default.existsSync(gulpModule)) {
|
|
10
10
|
console.error(ansi_colors_1.default.bgBlueBright('BalmJS'), ansi_colors_1.default.yellow('`balm` module not found :('));
|
|
11
11
|
process.exit(1);
|