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.
Files changed (3) hide show
  1. package/bin/cli.js +12 -9
  2. package/package.json +1 -1
  3. 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.readFileSync(DIR).forEach((file) => {
294
- if (status.includes('d'))
295
- if (file.match(/^.*.debug.*/g)) {
296
- copyFileFromTo(file, file.replace('.debug.', '.'))
297
- }
298
- if (status.includes('l'))
299
- if (file.match(/^.*.live.*/g)) {
300
- copyFileFromTo(file, file.replace('.live.', '.'))
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "esoftplay",
3
- "version": "0.0.145",
3
+ "version": "0.0.147",
4
4
  "description": "embedding data from esoftplay framework (web based) into mobile app",
5
5
  "main": "cache/index.js",
6
6
  "types": "../../index.d.ts",
package/publisher.js CHANGED
@@ -1,26 +1,15 @@
1
- const shell = require('child_process').execSync;
2
- const packJson = require("./package.json")
3
- const fs = require('fs');
4
- const letterVersion = ""
5
- const version = packJson.version
6
- const vm = version.match(/([a-z])/g)
7
- const letter = vm ? vm[0] : null
8
- const number = version.replace(/-/g, "").replace(letter, "")
9
- let nextLetter = ""
10
- let nextNumber = number.split(".")[2]
11
- let nextVersion = number.split(".")[0] + "." + number.split(".")[1] + "."
12
- if (!letter) {
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'] })