esoftplay 0.0.145 → 0.0.147
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/bin/cli.js +12 -9
- package/package.json +1 -1
- package/publisher.js +12 -23
package/bin/cli.js
CHANGED
|
@@ -290,15 +290,18 @@ function switchStatusAssets(status) {
|
|
|
290
290
|
command('cp ' + from + ' ' + to)
|
|
291
291
|
}
|
|
292
292
|
}
|
|
293
|
-
fs.
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
293
|
+
fs.readdirSync(DIR).forEach((file) => {
|
|
294
|
+
consoleError(file)
|
|
295
|
+
if (!fs.statSync(DIR+'/'+file).isDirectory()) {
|
|
296
|
+
if (status.includes('d'))
|
|
297
|
+
if (file.match(/^.*.debug.*/g)) {
|
|
298
|
+
copyFileFromTo(file, file.replace('.debug.', '.'))
|
|
299
|
+
}
|
|
300
|
+
if (status.includes('l'))
|
|
301
|
+
if (file.match(/^.*.live.*/g)) {
|
|
302
|
+
copyFileFromTo(file, file.replace('.live.', '.'))
|
|
303
|
+
}
|
|
304
|
+
}
|
|
302
305
|
})
|
|
303
306
|
fs.readdirSync(DIR + '/modules/').forEach((mod) => {
|
|
304
307
|
const path = DIR + '/modules/' + mod
|
package/package.json
CHANGED
package/publisher.js
CHANGED
|
@@ -1,26 +1,15 @@
|
|
|
1
|
-
const shell
|
|
2
|
-
const packJson
|
|
3
|
-
const fs
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
let
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
nextLetter = letterVersion[0]
|
|
14
|
-
nextVersion += nextNumber
|
|
15
|
-
nextVersion += "-" + nextLetter
|
|
16
|
-
} else if (letter != "z") {
|
|
17
|
-
nextLetter = letterVersion[letterVersion.indexOf(String(letter)) + 1]
|
|
18
|
-
nextVersion += nextNumber
|
|
19
|
-
nextVersion += "-" + nextLetter
|
|
20
|
-
} else {
|
|
21
|
-
nextNumber = Number(nextNumber) + 1
|
|
22
|
-
nextVersion += nextNumber
|
|
23
|
-
}
|
|
1
|
+
const shell = require('child_process').execSync;
|
|
2
|
+
const packJson = require("./package.json")
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
const version = packJson.version
|
|
5
|
+
const vm = version.match(/([a-z])/g)
|
|
6
|
+
const letter = vm ? vm[0] : null
|
|
7
|
+
const number = version.replace(/-/g, "").replace(letter, "")
|
|
8
|
+
let nextNumber = number.split(".")[2]
|
|
9
|
+
let nextVersion = number.split(".")[0] + "." + number.split(".")[1] + "."
|
|
10
|
+
|
|
11
|
+
nextNumber = Number(nextNumber) + 1
|
|
12
|
+
nextVersion += nextNumber
|
|
24
13
|
const newPackJson = { ...packJson, version: nextVersion }
|
|
25
14
|
fs.writeFileSync("./package.json", JSON.stringify(newPackJson, undefined, 2))
|
|
26
15
|
shell("npm publish", { stdio: ['inherit', 'inherit', 'inherit'] })
|