balm-core 4.14.0 → 4.15.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
CHANGED
|
@@ -68,7 +68,7 @@ You need to set up your development environment before you can do anything.
|
|
|
68
68
|
|
|
69
69
|
Install [Node.js® and npm](https://nodejs.org/en/download/) if they are not already on your machine.
|
|
70
70
|
|
|
71
|
-
> **Verify that you are running at least node `
|
|
71
|
+
> **Verify that you are running at least node `14.18.0` and npm `6.14.15`** by running `node -v` and `npm -v` in a terminal/console window. Older versions maybe produce errors, but newer versions are fine.
|
|
72
72
|
|
|
73
73
|
You develop apps in the context of an [Balm workspace](https://balm.js.org/docs/guide/structure.html).
|
|
74
74
|
|
|
@@ -86,15 +86,15 @@ npm init -y
|
|
|
86
86
|
### 1. Installing `balm`
|
|
87
87
|
|
|
88
88
|
```sh
|
|
89
|
-
yarn global add balm-core
|
|
90
|
-
yarn add -D balm
|
|
89
|
+
yarn global add balm-core
|
|
90
|
+
yarn add -D balm
|
|
91
91
|
```
|
|
92
92
|
|
|
93
93
|
OR
|
|
94
94
|
|
|
95
95
|
```sh
|
|
96
|
-
npm install -g balm-core
|
|
97
|
-
npm install -D balm
|
|
96
|
+
npm install -g balm-core
|
|
97
|
+
npm install -D balm
|
|
98
98
|
```
|
|
99
99
|
|
|
100
100
|
> We currently recommend using [Yarn](https://yarnpkg.com/en/docs/install) instead of npm.
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
2
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
3
3
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
4
|
+
import revAll from 'gulp-rev-all';
|
|
4
5
|
import { ASSETS_TYPES, CHUNK, ASSET } from '../../config/constants.js';
|
|
5
6
|
class CacheTask extends BalmJS.BalmTask {
|
|
6
7
|
constructor() {
|
|
7
8
|
super('cache');
|
|
8
9
|
_defineProperty(this, "fn", () => {
|
|
9
10
|
this.init();
|
|
10
|
-
return this.src.pipe(
|
|
11
|
+
return this.src.pipe(revAll.revision(BalmJS.config.assets.options)).pipe($.if(/\.html$/, BalmJS.file.setPublicPath())).pipe(gulp.dest(this.output)).pipe($.revDeleteOriginal()).pipe(revAll.manifestFile()).pipe(gulp.dest(this.output));
|
|
11
12
|
});
|
|
12
13
|
const defaultIncludes = BalmJS.config.scripts.useCache ? ASSETS_TYPES.filter(assetType => assetType !== 'js').map(assetType => BalmJS.file.matchAllFiles(BalmJS.config.dest[assetType])) : ASSETS_TYPES.map(assetType => BalmJS.file.matchAllFiles(BalmJS.config.dest[assetType]));
|
|
13
14
|
const defaultExcludes = [node.path.join(`!${BalmJS.config.dest.js}`, CHUNK.dir, '*'), node.path.join(`!${BalmJS.config.dest.js}`, ASSET.dir, '*'), node.path.join(`!${BalmJS.config.dest.base}`, BalmJS.config.pwa.manifest)];
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import revAll from 'gulp-rev-all';
|
|
1
2
|
class VersionTask extends BalmJS.BalmTask {
|
|
2
3
|
constructor() {
|
|
3
4
|
super('version');
|
|
@@ -11,7 +12,7 @@ class VersionTask extends BalmJS.BalmTask {
|
|
|
11
12
|
this.init(input, output, {
|
|
12
13
|
version: assetsOptions
|
|
13
14
|
});
|
|
14
|
-
return this.src.pipe(
|
|
15
|
+
return this.src.pipe(revAll.revision(this.options)).pipe(gulp.dest(this.output)).pipe(revAll.versionFile()).pipe(gulp.dest(this.output));
|
|
15
16
|
};
|
|
16
17
|
return balmVersion;
|
|
17
18
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "balm-core",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.15.1",
|
|
4
4
|
"description": "BalmJS compiler core",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"balm",
|
|
@@ -120,5 +120,5 @@
|
|
|
120
120
|
"engines": {
|
|
121
121
|
"node": ">=14.18.0"
|
|
122
122
|
},
|
|
123
|
-
"gitHead": "
|
|
123
|
+
"gitHead": "5a935bd962498ce7d64e4bca2f8ef1dc970d71ff"
|
|
124
124
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import revAll from 'gulp-rev-all';
|
|
1
2
|
import { ASSETS_TYPES, CHUNK, ASSET } from '../../config/constants.js';
|
|
2
3
|
class CacheTask extends BalmJS.BalmTask {
|
|
3
4
|
constructor() {
|
|
@@ -5,11 +6,11 @@ class CacheTask extends BalmJS.BalmTask {
|
|
|
5
6
|
this.fn = () => {
|
|
6
7
|
this.init();
|
|
7
8
|
return this.src
|
|
8
|
-
.pipe(
|
|
9
|
+
.pipe(revAll.revision(BalmJS.config.assets.options))
|
|
9
10
|
.pipe($.if(/\.html$/, BalmJS.file.setPublicPath()))
|
|
10
11
|
.pipe(gulp.dest(this.output))
|
|
11
12
|
.pipe($.revDeleteOriginal())
|
|
12
|
-
.pipe(
|
|
13
|
+
.pipe(revAll.manifestFile())
|
|
13
14
|
.pipe(gulp.dest(this.output));
|
|
14
15
|
};
|
|
15
16
|
const defaultIncludes = BalmJS.config.scripts.useCache
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import revAll from 'gulp-rev-all';
|
|
1
2
|
class VersionTask extends BalmJS.BalmTask {
|
|
2
3
|
constructor() {
|
|
3
4
|
super('version');
|
|
@@ -12,9 +13,9 @@ class VersionTask extends BalmJS.BalmTask {
|
|
|
12
13
|
version: assetsOptions
|
|
13
14
|
});
|
|
14
15
|
return this.src
|
|
15
|
-
.pipe(
|
|
16
|
+
.pipe(revAll.revision(this.options))
|
|
16
17
|
.pipe(gulp.dest(this.output))
|
|
17
|
-
.pipe(
|
|
18
|
+
.pipe(revAll.versionFile())
|
|
18
19
|
.pipe(gulp.dest(this.output));
|
|
19
20
|
};
|
|
20
21
|
return balmVersion;
|