diff --git a/.travis.yml b/.travis.yml index 2e54686..080ebb2 100755 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,6 @@ language: node_js sudo: false node_js: - # - "0.6" - # - "0.8" - # - "0.10" - # - "0.11" - "4" - "5" - "6" diff --git a/index.js b/index.js index 2ffc659..8340b98 100755 --- a/index.js +++ b/index.js @@ -17,6 +17,7 @@ const REGEX_LEADING_EXCAPED_HASH = /^\\#/ const SLASH = '/' const KEY_IGNORE = typeof Symbol !== 'undefined' ? Symbol.for('node-ignore') + /* istanbul ignore next */ : 'node-ignore' diff --git a/install.sh b/install.sh deleted file mode 100644 index c143db2..0000000 --- a/install.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -# babel-preset-es2015 fails to install on nodejs < 0.10 -npm install babel-cli babel-preset-es2015 --no-save diff --git a/package.json b/package.json index 7dedee5..0172fa1 100644 --- a/package.json +++ b/package.json @@ -8,8 +8,10 @@ "index.d.ts" ], "scripts": { - "test": "istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec ./test/ignore.js && codecov", - "test-no-cov": "./node_modules/.bin/mocha --reporter spec ./test/ignore.js", + "prepublish": "npm run build", + "build": "babel -o ignore.js index.js", + "test": "npm run build && istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec ./test/ignore.js && codecov", + "test-no-cov": "npm run build && ./node_modules/.bin/mocha --reporter spec ./test/ignore.js", "cov-report": "istanbul report" }, "repository": { @@ -37,6 +39,8 @@ "url": "https://github.com/kaelzhang/node-ignore/issues" }, "devDependencies": { + "babel-cli": "^6.26.0", + "babel-preset-es2015": "^6.24.1", "chai": "~1.7.2", "codecov": "^1.0.1", "istanbul": "^0.4.5", diff --git a/test.sh b/test.sh deleted file mode 100644 index 4d7283e..0000000 --- a/test.sh +++ /dev/null @@ -1,13 +0,0 @@ -export PATH=$PATH:./node_modules/.bin/ -export IGNORE_TEST_WIN32= - -abort() { - printf "\n\x1B[31mError: $@\x1B[0m\n\n" - exit 1 -} - -rm -rf ./coverage - -type babel && babel -o ignore.js index.js || abort 'warn: babel failed' - -npm test