Skip to content

Commit

Permalink
fix(build): use transpiled versions of node scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
jlegrone committed Aug 9, 2017
1 parent 34883c9 commit bc3c84b
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 15 deletions.
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,17 @@
"url": "https://github.com/jlegrone/git-config"
},
"engines": {
"git": "^2.60.0",
"git": "^2.6.0",
"node": ">=4"
},
"scripts": {
"prebuild": "rimraf lib",
"build": "babel scripts --out-dir lib",
"commit": "git-cz",
"commitmsg": "validate-commit-msg",
"postinstall": "node scripts/bootstrap-config",
"postinstall": "node lib/bootstrap-config",
"prepublish": "npm run build",
"preuninstall": "node scripts/remove-config",
"preuninstall": "node lib/remove-config",
"semantic-release": "semantic-release pre && npm publish --access public && semantic-release post"
},
"config": {
Expand Down Expand Up @@ -62,11 +63,12 @@
"commitizen": "^2.9.6",
"cz-customizable": "^5.0.0",
"husky": "^0.14.3",
"rimraf": "^2.6.1",
"semantic-release": "^6.3.6",
"validate-commit-msg": "^2.12.2"
},
"dependencies": {
"chalk": "^2.1.0",
"validate-git-version": "^1.0.0"
"validate-git-version": "^1.0.1"
}
}
2 changes: 1 addition & 1 deletion scripts/add-config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { exec } = require('child_process')
import { exec } from 'child_process'

exec(
`git config --global --add include.path ${process.cwd()}/src/jlegrone.gitconfig`,
Expand Down
6 changes: 3 additions & 3 deletions scripts/bootstrap-config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
require('./remove-config')
require('./add-config')
require('./validate-git-version')
import './remove-config'
import './add-config'
import './validate-git-version'
2 changes: 1 addition & 1 deletion scripts/remove-config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { exec } = require('child_process')
import { exec } from 'child_process'

exec(
'sed -i.backup "/jlegrone.gitconfig/d" ~/.gitconfig',
Expand Down
6 changes: 3 additions & 3 deletions scripts/validate-git-version.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const validateGitVersion = require('validate-git-version')
const { blue, yellow, red, green, reset } = require('chalk')
const { name, engines } = require('../package')
import validateGitVersion from 'validate-git-version'
import { blue, yellow, red, green, reset } from 'chalk'
import { name, engines } from '../package'

const onInValid = (currentVersion) => console.log(yellow(
`⚠️ Git version ${red(currentVersion)} is not compatible with ${name}.
Expand Down
11 changes: 8 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2185,6 +2185,10 @@ pify@^2.0.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c"

pify@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176"

pinkie-promise@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa"
Expand Down Expand Up @@ -2832,10 +2836,11 @@ validate-commit-msg@^2.12.2:
findup "0.1.5"
semver-regex "1.0.0"

validate-git-version@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/validate-git-version/-/validate-git-version-1.0.0.tgz#cb85594002ba628793cc915a4399b5e9dd6520df"
validate-git-version@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/validate-git-version/-/validate-git-version-1.0.1.tgz#ccb459edd0466446a0424517f3da0bcc4460524b"
dependencies:
pify "^3.0.0"
semver "^5.4.1"

validate-npm-package-license@^3.0.1:
Expand Down

0 comments on commit bc3c84b

Please sign in to comment.