-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpackage.json.js
46 lines (39 loc) · 961 Bytes
/
package.json.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/**
* module bundler with simple configure
*/
'use strict';
const packageConfig = {
// 基础说明配置
name: 'redux-learn',
version: '0.0.1',
author: 'wujohns',
description: 'learn redux',
license: 'MIT',
/**
* scripts
*/
scripts: {
// test: './node_modules/mocha/bin/mocha ./test/build.test.js'
},
engine: {
node: '>=4.0.0'
},
dependencies: {
// 基础工具
'lodash': '^4.17.4',
'async': '^2.4.1', // 目前代码中并未出现,之后考虑移除
// redux 相关
'redux': '^3.7.0',
'redux-logger': '^3.0.6',
'redux-thunk': '^2.2.0'
},
devDependencies: {}
};
const fs = require('fs');
const path = require('path');
const targetFile = path.join(__dirname, './package.json');
fs.writeFileSync(targetFile, JSON.stringify(packageConfig, null, 2), {
encoding: 'utf8',
flags: 'w',
mode: 0o666
});