Skip to content

Commit

Permalink
build: ditch transpilation process
Browse files Browse the repository at this point in the history
BREAKING CHANGE: drop support for Node 5
  • Loading branch information
gtramontina committed Nov 21, 2017
1 parent 95f2f5e commit 443ea5f
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 42 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ coverage
.idea
.opt-in
.opt-out
dist
1 change: 0 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ coverage
.idea
.opt-in
.opt-out
lib
test
.editorconfig
.eslintrc
Expand Down
6 changes: 5 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ branches:
notifications:
email: false
node_js:
- 'lts/*'
- '9'
- '8'
- '7'
- '6'
- '5'
- '4'
before_install:
Expand All @@ -21,7 +26,6 @@ before_script:
script:
- npm run test
- npm run check-coverage
- npm run build
after_success:
- 'curl -Lo travis_after_all.py https://git.io/travis_after_all'
- python travis_after_all.py
Expand Down
6 changes: 4 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
environment:
matrix:
- nodejs_version: "9"
- nodejs_version: "8"
- nodejs_version: "7"
- nodejs_version: "6"
- nodejs_version: "5"
- nodejs_version: "4"
- nodejs_version: "0.12"
- nodejs_version: "0.10"

cache:
- node_modules
Expand Down
23 changes: 1 addition & 22 deletions bin/install
Original file line number Diff line number Diff line change
@@ -1,23 +1,2 @@
#!/usr/bin/env node
const exists = require('path-exists')
const exec = require('execa')

function isBuilt() {
return exists('./dist')
}

function build() {
return exec('npm', ['run', 'build'])
}

function install() {
require('../dist/install')()
}

isBuilt().then(function built(yes) {
if (yes) {
install()
} else {
build().then(install)
}
})
require('../lib/install')()
19 changes: 4 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "ghooks",
"description": "Simple git hooks",
"version": "0.0.0-semantically-released",
"main": "./dist/runner.js",
"main": "./lib/runner.js",
"keywords": [
"git",
"hooks",
Expand All @@ -19,12 +19,10 @@
"url": "https://github.com/gtramontina/ghooks/issues"
},
"scripts": {
"prebuild": "rm -rf dist && mkdir dist",
"build": "babel lib --out-dir dist && babel lib/hook.template.raw --out-file dist/hook.template.raw",
"lint": "eslint bin/* lib/* test/",
"test:unit": "mocha --compilers js:babel-register",
"test:unit": "mocha",
"test": "npm run lint && npm run coverage",
"coverage": "nyc --require babel-register --reporter=lcov --reporter=text mocha",
"coverage": "nyc --reporter=lcov --reporter=text mocha",
"check-coverage": "nyc check-coverage --statements 100 --branches 100 --functions 100 --lines 100",
"report-coverage": "cat ./coverage/lcov.info | node_modules/.bin/codecov",
"validate": "npm t && npm run check-coverage",
Expand All @@ -33,7 +31,6 @@
"semantic-release": "semantic-release pre && npm publish && semantic-release post"
},
"dependencies": {
"execa": "0.5.0",
"findup": "0.1.5",
"lodash.clone": "4.5.0",
"manage-path": "2.0.0",
Expand All @@ -42,9 +39,6 @@
"spawn-command": "0.0.2"
},
"devDependencies": {
"babel-cli": "6.18.0",
"babel-preset-es2015": "6.18.0",
"babel-register": "6.18.0",
"chai": "3.5.0",
"chai-string": "1.3.0",
"codecov": "1.0.1",
Expand All @@ -56,7 +50,7 @@
"eslint-plugin-mocha": "4.7.0",
"ghooks": "*",
"mocha": "3.2.0",
"mock-fs": "3.12.1",
"mock-fs": "4.4.2",
"nyc": "10.0.0",
"proxyquire": "1.7.10",
"semantic-release": "6.3.2",
Expand All @@ -65,11 +59,6 @@
"travis-after-all": "1.4.4",
"validate-commit-msg": "2.8.2"
},
"babel": {
"presets": [
"es2015"
]
},
"nyc": {
"extension": [
".raw"
Expand Down

0 comments on commit 443ea5f

Please sign in to comment.