[travis] shapeup package.json in release
remove devDependencies from package.json. resolve #495.
This commit is contained in:
parent
df8c28688a
commit
dd7bf7c1c1
|
@ -7,6 +7,7 @@ chmod 600 ~/.ssh/id_rsa
|
||||||
echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
|
echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
|
||||||
git checkout -b release
|
git checkout -b release
|
||||||
cp -f ./.travis/.gitignore-release .gitignore
|
cp -f ./.travis/.gitignore-release .gitignore
|
||||||
|
node ./.travis/shapeup.js
|
||||||
git add --all
|
git add --all
|
||||||
git rm --cached `git ls-files --full-name -i --exclude-standard`
|
git rm --cached `git ls-files --full-name -i --exclude-standard`
|
||||||
git config --global user.email "AyaMorisawa4869@gmail.com"
|
git config --global user.email "AyaMorisawa4869@gmail.com"
|
||||||
|
|
13
.travis/shapeup.js
Normal file
13
.travis/shapeup.js
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
'use strict'
|
||||||
|
|
||||||
|
const fs = require('fs')
|
||||||
|
const filename = process.argv[2] || 'package.json'
|
||||||
|
|
||||||
|
fs.readFile(filename, (err, data) => {
|
||||||
|
if (err) process.exit(2)
|
||||||
|
const object = JSON.parse(data)
|
||||||
|
delete object.devDependencies
|
||||||
|
fs.writeFile(filename, JSON.stringify(object, null, 4) + '\n', err => {
|
||||||
|
if (err) process.exit(3)
|
||||||
|
})
|
||||||
|
})
|
Loading…
Reference in a new issue