Skip to content

Commit 3500788

Browse files
committed
dropped node 0.12 support, now using yarn instead npm for scripts and travis-ci testing
1 parent b95a248 commit 3500788

28 files changed

+3438
-172
lines changed

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
.awcache
22
.idea
33
npm-debug.log
4-
yarn.lock
54
*.js.map
65
/coverage
76
/node_modules

.travis.yml

+8-5
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,17 @@ sudo: false
22
language: node_js
33

44
node_js:
5-
- "0.12"
6-
- iojs
75
- "4"
86
- "6"
97
- "stable"
10-
11-
script: "npm run travis"
8+
9+
cache:
10+
yarn: true
11+
directories:
12+
- node_modules
13+
14+
script: "yarn run travis"
1215

1316
after_success:
14-
- npm run test:coveralls
17+
- yarn run test:coveralls
1518
- rm -rf ./coverage

bin/javascript-obfuscator.js

-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
11
#!/usr/bin/env node
22

3-
if (!global._babelPolyfill && parseInt(process.version.split('.')[0], 10) < 4) {
4-
require('babel-polyfill');
5-
}
6-
73
require('../dist/index').runCLI(process.argv);

dist/index.js

+30-38
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-4
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,13 @@
1212
"js obfuscator"
1313
],
1414
"engines": {
15-
"node": ">=0.12.0",
16-
"iojs": ">=1.0.0"
15+
"node": ">=4.7"
1716
},
1817
"main": "dist/index.js",
1918
"bin": {
2019
"javascript-obfuscator": "./bin/javascript-obfuscator.js"
2120
},
2221
"dependencies": {
23-
"babel-polyfill": "6.20.0",
24-
"babel-runtime": "6.20.0",
2522
"chance": "1.0.4",
2623
"class-validator": "0.6.8",
2724
"commander": "2.9.0",

scripts/build

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
22

3-
npm run webpack &&
4-
npm run tslint &&
5-
npm test
3+
yarn run webpack &&
4+
yarn run tslint &&
5+
yarn test

scripts/start

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/bash
22

3-
npm run watch
3+
yarn run watch

scripts/test

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/bash
22

3-
npm run test:full
3+
yarn run test:full

scripts/test-compile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
22

3-
$(npm bin)/tsc -p tsconfig-test.json &&
4-
$(npm bin)/babel test-tmp --out-dir test-tmp --source-maps inline --presets es2015 &&
3+
$(yarn bin)/tsc -p tsconfig-test.json &&
4+
$(yarn bin)/babel test-tmp --out-dir test-tmp --source-maps inline --presets es2015 &&
55
rsync -a --prune-empty-dirs --include '*/' --include '*.js' --exclude '*' test/ test-tmp/test/

scripts/test-coveralls

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
npm run test:compile &&
4-
$(npm bin)/istanbul cover $(npm bin)/_mocha -- test-tmp/test/index.spec.js --report lcovonly &&
5-
cat ./coverage/lcov.info | $(npm bin)/coveralls &&
6-
npm run test:removeTmpDir
3+
yarn run test:compile &&
4+
$(yarn bin)/istanbul cover $(yarn bin)/_mocha -- test-tmp/test/index.spec.js --report lcovonly &&
5+
cat ./coverage/lcov.info | $(yarn bin)/coveralls &&
6+
yarn run test:removeTmpDir

scripts/test-dev

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/bash
22

3-
$(npm bin)/ts-node test/dev/dev.ts
3+
$(yarn bin)/ts-node test/dev/dev.ts

scripts/test-dev-compile-performance

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/bash
22

3-
$(npm bin)/ts-node test/dev/dev-compile-performance.ts
3+
$(yarn bin)/ts-node test/dev/dev-compile-performance.ts

scripts/test-dev-runtime-performance

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/bash
22

3-
$(npm bin)/ts-node test/dev/dev-runtime-performance.ts
3+
$(yarn bin)/ts-node test/dev/dev-runtime-performance.ts

scripts/test-full

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
npm run test:compile &&
3+
yarn run test:compile &&
44
node test-tmp/test/dev/dev.js &&
5-
$(npm bin)/istanbul cover $(npm bin)/_mocha -- test-tmp/test/index.spec.js &&
6-
npm run test:removeTmpDir
5+
$(yarn bin)/istanbul cover $(yarn bin)/_mocha -- test-tmp/test/index.spec.js &&
6+
yarn run test:removeTmpDir

scripts/test-mocha

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
22

3-
npm run test:compile &&
4-
$(npm bin)/mocha test-tmp/test/index.spec.js &&
5-
npm run test:removeTmpDir
3+
yarn run test:compile &&
4+
$(yarn bin)/mocha test-tmp/test/index.spec.js &&
5+
yarn run test:removeTmpDir

scripts/travis

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/bash
22

3-
npm run tslint &&
4-
npm test
3+
yarn run tslint &&
4+
yarn test

0 commit comments

Comments
 (0)