2017-05-27 14:12:15 -05:00
|
|
|
'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
|
2017-05-27 14:25:06 -05:00
|
|
|
fs.writeFile(filename, JSON.stringify(object, null, '\t') + '\n', err => {
|
2017-05-27 14:12:15 -05:00
|
|
|
if (err) process.exit(3)
|
|
|
|
})
|
|
|
|
})
|