Quellcode durchsuchen

moved all scripts from package.json to scripts/ folder

sanex3339 vor 9 Jahren
Ursprung
Commit
a24a7cd5d1

+ 14 - 14
package.json

@@ -47,20 +47,20 @@
     "url": "git+https://github.com/sanex3339/javascript-obfuscator.git"
   },
   "scripts": {
-    "start": "npm run watch",
-    "webpack": "node_modules/.bin/webpack",
-    "build": "npm run webpack && npm run tslint && npm test",
-    "watch": "node_modules/.bin/webpack --watch",
-    "test:compile": "node_modules/.bin/tsc -p tsconfig-test.json",
-    "test:dev": "node test/dev/test.js",
-    "test:full": "npm run test:compile && node_modules/.bin/istanbul cover node_modules/.bin/_mocha -- test-tmp/test/**/**.spec.js && npm run test:removeTestTmpDir",
-    "test:coveralls": "npm run test:compile && node_modules/.bin/istanbul cover node_modules/.bin/_mocha -- test-tmp/test/**/**.spec.js --report lcovonly && cat ./coverage/lcov.info | coveralls && npm run test:removeTestTmpDir",
-    "test:mocha": "npm run test:compile && node_modules/.bin/mocha test-tmp/test/**/**.spec.js && npm run test:removeTestTmpDir",
-    "test:removeTestTmpDir": "rm -rf test-tmp",
-    "test": "npm run test:dev && npm run test:full",
-    "tslint": "tslint src/**/*.ts",
-    "travis": "npm run tslint && npm test",
-    "typings": "node_modules/.bin/typings install"
+    "start": "scripts/start",
+    "webpack": "scripts/webpack",
+    "build": "scripts/build",
+    "watch": "scripts/watch",
+    "test:compile": "scripts/test-compile",
+    "test:dev": "scripts/test-dev",
+    "test:full": "scripts/test-full",
+    "test:coveralls": "scripts/test-coveralls",
+    "test:mocha": "scripts/test-mocha",
+    "test:removeTmpDir": "scripts/test-remove-tmp-dir",
+    "test": "scripts/test",
+    "tslint": "scripts/tslint",
+    "travis": "scripts/travis",
+    "typings": "srcipts/typings"
   },
   "author": {
     "name": "Timofey Kachalov"

+ 5 - 0
scripts/build

@@ -0,0 +1,5 @@
+#!/bin/bash
+
+npm run webpack
+npm run tslint
+npm test

+ 3 - 0
scripts/start

@@ -0,0 +1,3 @@
+#!/bin/bash
+
+npm run watch

+ 4 - 0
scripts/test

@@ -0,0 +1,4 @@
+#!/bin/bash
+
+npm run test:dev
+npm run test:full

+ 4 - 0
scripts/test-compile

@@ -0,0 +1,4 @@
+#!/bin/bash
+
+$(npm bin)/tsc -p tsconfig-test.json
+$(npm bin)/babel test-tmp --out-dir test-tmp --source-maps

+ 6 - 0
scripts/test-coveralls

@@ -0,0 +1,6 @@
+#!/bin/bash
+
+npm run test:compile
+$(npm bin)/istanbul cover $(npm bin)/_mocha -- test-tmp/test/**/**.spec.js --report lcovonly
+cat ./coverage/lcov.info | $(npm bin)/coveralls
+npm run test:removeTmpDir

+ 3 - 0
scripts/test-dev

@@ -0,0 +1,3 @@
+#!/bin/bash
+
+node test/dev/test.js

+ 5 - 0
scripts/test-full

@@ -0,0 +1,5 @@
+#!/bin/bash
+
+npm run test:compile
+$(npm bin)/istanbul cover $(npm bin)/_mocha -- test-tmp/test/**/**.spec.js
+npm run test:removeTmpDir

+ 5 - 0
scripts/test-mocha

@@ -0,0 +1,5 @@
+#!/bin/bash
+
+npm run test:compile
+$(npm bin)/mocha test-tmp/test/**/**.spec.js
+npm run test:removeTmpDir

+ 3 - 0
scripts/test-remove-tmp-dir

@@ -0,0 +1,3 @@
+#!/bin/bash
+
+rm -rf test-tmp

+ 4 - 0
scripts/travis

@@ -0,0 +1,4 @@
+#!/bin/bash
+
+npm run tslint
+npm test

+ 3 - 0
scripts/tslint

@@ -0,0 +1,3 @@
+#!/bin/bash
+
+$(npm bin)/tslint src/**/*.ts

+ 3 - 0
scripts/typings

@@ -0,0 +1,3 @@
+#!/bin/bash
+
+$(npm bin)/typings install

+ 3 - 0
scripts/watch

@@ -0,0 +1,3 @@
+#!/bin/bash
+
+$(npm bin)/webpack --watch

+ 3 - 0
scripts/webpack

@@ -0,0 +1,3 @@
+#!/bin/bash
+
+$(npm bin)/webpack

+ 1 - 1
webpack.config.js

@@ -1,4 +1,4 @@
-var fs = require("fs"),
+let fs = require("fs"),
     nodeExternals = require('webpack-node-externals'),
     webpack = require('webpack');