prepare-package 0.0.2 → 0.0.3
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/dist/index.js +4 -3
- package/package.json +3 -2
- package/src/index.js +1 -1
package/dist/index.js
CHANGED
|
@@ -32,7 +32,7 @@ if (isLivePreparation) {
|
|
|
32
32
|
function _replaceMain() {
|
|
33
33
|
let content = jetpack.read(theirPackageJSON.main)
|
|
34
34
|
// .replace(/{version}/igm, package.version)
|
|
35
|
-
.replace(/{version}/igm,
|
|
35
|
+
.replace(/{version}/igm, theirPackageJSON.version)
|
|
36
36
|
}
|
|
37
37
|
jetpack.write(
|
|
38
38
|
theirPackageJSON.main,
|
|
@@ -45,8 +45,9 @@ fetch(`https://purge.jsdelivr.net/npm/${theirPackageJSON.name}@latest`, {
|
|
|
45
45
|
tries: 3,
|
|
46
46
|
})
|
|
47
47
|
.then(result => {
|
|
48
|
-
console.log(chalk.green(`[prepare-package]: Purged... name=${theirPackageJSON.name}`), result);
|
|
48
|
+
// console.log(chalk.green(`[prepare-package]: Purged... name=${theirPackageJSON.name}`), result);
|
|
49
|
+
console.log(chalk.green(`[prepare-package]: Purged... ${theirPackageJSON.name}`));
|
|
49
50
|
})
|
|
50
51
|
.catch(e => {
|
|
51
|
-
console.log(chalk.red(`[prepare-package]: Failed to purge...
|
|
52
|
+
console.log(chalk.red(`[prepare-package]: Failed to purge... ${theirPackageJSON.name}`, e));
|
|
52
53
|
})
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "prepare-package",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "Prepare a Node.js package before being published",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"test": "./node_modules/mocha/bin/mocha test/ --recursive --timeout=10000",
|
|
8
|
-
"start": "node ./src/index.js"
|
|
8
|
+
"start": "node ./src/index.js",
|
|
9
|
+
"prepare": "node ./src/index.js"
|
|
9
10
|
},
|
|
10
11
|
"preparePackage": {
|
|
11
12
|
"input": "src",
|
package/src/index.js
CHANGED
|
@@ -32,7 +32,7 @@ if (isLivePreparation) {
|
|
|
32
32
|
function _replaceMain() {
|
|
33
33
|
let content = jetpack.read(theirPackageJSON.main)
|
|
34
34
|
// .replace(/{version}/igm, package.version)
|
|
35
|
-
.replace(/{version}/igm,
|
|
35
|
+
.replace(/{version}/igm, theirPackageJSON.version)
|
|
36
36
|
}
|
|
37
37
|
jetpack.write(
|
|
38
38
|
theirPackageJSON.main,
|