Selaa lähdekoodia

remove yargs. changes bump version script

Adam Shaw 7 vuotta sitten
vanhempi
sitoutus
a08a2d870b
3 muutettua tiedostoa jossa 7 lisäystä ja 7 poistoa
  1. 1 1
      bin/build-release.sh
  2. 5 4
      bin/bump-version.js
  3. 1 2
      package.json

+ 1 - 1
bin/build-release.sh

@@ -52,7 +52,7 @@ if {
   npm run clean &&
 
   # update package manager json files with version number and release date
-  ./bin/bump-version.js --version=$version &&
+  ./bin/bump-version.js "$version" &&
 
   # build everything
   gulp lint dist archive &&

+ 5 - 4
bin/bump-version.js

@@ -1,14 +1,15 @@
 #!/usr/bin/env node
 
 const fs = require('fs')
-const argv = require('yargs').argv // parsed command line arguments
 
-if (!argv.version) {
-  console.error('Please specify a command line --version argument.')
+let version = process.argv[2] // the first command line arg
+
+if (!version) {
+  console.error('Please specify a single argument, the version.')
   process.exit(1) // error code
 
 } else {
   const packageConfig = require('../package.json')
-  packageConfig.version = argv.version
+  packageConfig.version = version
   fs.writeFileSync('package.json', JSON.stringify(packageConfig, null, '  '))
 }

+ 1 - 2
package.json

@@ -75,8 +75,7 @@
     "tslint": "^5.12.1",
     "tslint-config-standard": "^7.1.0",
     "typescript": "^3.2.2",
-    "xhr-mock": "^2.4.1",
-    "yargs": "^4.8.1"
+    "xhr-mock": "^2.4.1"
   },
   "scripts": {
     "build": "tsc && npm run rollup && npm run sass",