UNPKG

637 BJavaScriptView Raw
1'use strict';
2
3var path = require('path'),
4 fs = require('fs-extra'),
5 jsonfile = require('jsonfile'),
6 packageSource = path.resolve(__dirname, '../../../package.json'),
7 packageJSON = fs.existsSync(packageSource) ? require(packageSource) : {};
8
9packageJSON.scripts = packageJSON.scripts || {};
10packageJSON.scripts.start = 'node ./node_modules/allons-y/start.js';
11packageJSON.scripts.stop = 'node ./node_modules/allons-y/stop.js';
12
13jsonfile.spaces = 2;
14jsonfile.writeFileSync(packageSource, packageJSON, {
15 spaces: 2
16});
17
18fs.copySync(path.resolve(__dirname, 'allons-y.js'), path.resolve(__dirname, '../../../allons-y.js'));