-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgen-package.json.js
More file actions
37 lines (32 loc) · 986 Bytes
/
Copy pathgen-package.json.js
File metadata and controls
37 lines (32 loc) · 986 Bytes
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
import fs from 'fs';
const rootPackageJson = JSON.parse(fs.readFileSync('./package.json').toString());
// Create the new package.json
const newPackageJson = {
name: rootPackageJson.name,
version: rootPackageJson.version,
description: rootPackageJson.description,
author: rootPackageJson.author,
license: rootPackageJson.license,
keywords: rootPackageJson.keywords,
bin: {
"c3-cli": "./index.js",
"c3": "./index.js"
},
name: rootPackageJson.name,
name: rootPackageJson.name,
preferGlobal: true,
dependencies: rootPackageJson.dependencies,
repository: {
type: "git",
url: "git+https://github.com/diptox-c3/c3-cli.git"
},
bugs: {
url: "https://github.com/diptox-c3/c3-cli/issues"
},
homepage: "https://github.com/diptox-c3/c3-cli#readme"
}
// Write the new package.json
fs.writeFileSync('./src/package.json',JSON.stringify(newPackageJson,null,2));
// Copy Readme
fs.copyFileSync('./README.md', './src/README.md');
process.exit(0);