Skip to content

Commit ba948ef

Browse files
committed
build(npm): make package.json valid for fresh clones
1 parent 080f111 commit ba948ef

3 files changed

Lines changed: 20 additions & 113 deletions

File tree

app-template/apply.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ var templates = {
1717
// 'bower.json': '/',
1818
};
1919
var configDir = process.argv[2] || 'copay';
20-
var JSONheader = ' { ' + "\n" + ' "//":"PLEASE! Do not edit this file directly",' + "\n" + ' "//":" Modify it at app-template/", ' + "\n";
20+
var JSONheader = ' { ' + "\n" + ' "//":"Changes to this file will be overwritten",' + "\n" + ' "//":" Modify it in the app-template directory", ' + "\n";
2121

2222
var MakefileHeader = "# PLEASE! Do not edit this file directly \n# Modify it at app-template/\n";
2323

app-template/package.json

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,12 @@
7575
"shelljs": "^0.3.0"
7676
},
7777
"scripts": {
78-
"preinstall": "bower install && npm i fs-extra",
79-
"postinstall": "npm run apply:bitpay && cordova prepare",
78+
"preinstall": "bower install && npm install fs-extra",
79+
"postinstall": "echo && echo \"To finish, choose a distribution by running 'npm run apply:copay' or 'npm run apply:bitpay'.\" && echo",
8080
"start": "npm run build:www && ionic serve --nolivereload --nogulp -s",
8181
"start:ios": "npm run build:www && npm run build:ios && npm run open:ios",
8282
"start:android": "npm run build:www && npm run build:android && npm run run:android",
83+
"start:desktop": "grunt desktop",
8384
"watch": "grunt watch",
8485
"build:www": "grunt",
8586
"build:www-release": "grunt prod",
@@ -89,15 +90,16 @@
8990
"build:android-release": "cordova prepare android && cordova build android --release",
9091
"open:ios": "open platforms/ios/*.xcodeproj",
9192
"open:android": "open -a open -a /Applications/Android\\ Studio.app platforms/android",
92-
"final:www": "npm run clean-all && npm run build:www-release",
93+
"final:www": "npm run build:www-release",
9394
"final:ios": "npm run final:www && npm run build:ios-release && npm run open:ios",
9495
"final:android": "npm run final:www && npm run build:android-release && npm run run:android",
96+
"final:desktop": "grunt desktop",
9597
"run:android": "cordova run android --device",
9698
"log:android": "adb logcat | grep chromium",
97-
"apply:copay": "cd app-template && node apply.js copay",
98-
"apply:bitpay": "cd app-template && node apply.js bitpay",
99+
"apply:copay": "cd app-template && node apply.js copay && cordova prepare",
100+
"apply:bitpay": "cd app-template && node apply.js bitpay && cordova prepare",
99101
"test": "./node_modules/.bin/grunt test-coveralls",
100-
"clean": "trash platforms && trash plugins && npm run postinstall",
102+
"clean": "trash platforms && trash plugins && cordova prepare",
101103
"clean-all": "git clean -dfx && npm install"
102104
},
103105
"devDependencies": {

package.json

Lines changed: 11 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -1,113 +1,18 @@
1-
{
2-
"//":"PLEASE! Do not edit this file directly",
3-
"//":" Modify it at app-template/",
4-
5-
"name": "bitpay",
6-
"description": "Secure Bitcoin Wallet",
7-
"author": "BitPay",
8-
"version": "0.14.0",
9-
"keywords": [
10-
"bitcoin",
11-
"wallet",
12-
"bitpay",
13-
"copay",
14-
"multisignature",
15-
"bitcore"
16-
],
17-
"main": "www/index.html",
18-
"window": {
19-
"title": "BitPay - Secure Bitcoin Wallet",
20-
"icon": "www/img/icon-128.png",
21-
"toolbar": false,
22-
"show": true,
23-
"visible": true,
24-
"resizable": true,
25-
"frame": true,
26-
"width": 400,
27-
"height": 650,
28-
"position": "center",
29-
"fullscreen": false
1+
{
2+
"name": "distribution-not-selected",
3+
"description": "Choose a distribution by running 'npm run apply:copay' or 'npm run apply:bitpay'.",
4+
"primary-package-json": "See the tempate in app-template/package.json",
5+
"scripts": {
6+
"postinstall": "npm run apply:copay && npm install",
7+
"apply:copay": "cd app-template && node apply.js copay",
8+
"apply:bitpay": "cd app-template && node apply.js bitpay"
309
},
31-
"webkit": {
32-
"page-cache": false,
33-
"java": false,
34-
"plugin": false
10+
"dependencies": {
11+
"fs-extra": "^0.30.0"
3512
},
36-
"dom_storage_quota": 200,
37-
"id": "jid1-x7bV5evAaI1P9Q",
38-
"homepage": "https://bitpay.com",
3913
"license": "MIT",
4014
"repository": {
41-
"url": "git://github.com/bitpay/bitpay-wallet.git",
15+
"url": "git://github.com/bitpay/copay.git",
4216
"type": "git"
43-
},
44-
"bugs": {
45-
"url": "https://github.com/bitpay/bitpay-wallet/issues"
46-
},
47-
"dependencies": {
48-
"adm-zip": "^0.4.7",
49-
"angular": "1.4.6",
50-
"angular-mocks": "1.4.10",
51-
"bezier-easing": "^2.0.3",
52-
"bhttp": "^1.2.1",
53-
"bitauth": "^0.3.2",
54-
"bitcore-wallet-client": "4.3.2",
55-
"bower": "^1.7.9",
56-
"chai": "^3.5.0",
57-
"cordova-android": "5.1.1",
58-
"cordova-custom-config": "^3.0.5",
59-
"cordova-plugin-qrscanner": "^2.3.1",
60-
"coveralls": "^2.11.9",
61-
"express": "^4.11.2",
62-
"fs": "0.0.2",
63-
"fs-extra": "^0.30.0",
64-
"grunt-angular-gettext": "^2.2.3",
65-
"grunt-browserify": "^5.0.0",
66-
"grunt-cli": "^1.2.0",
67-
"grunt-contrib-compress": "^1.3.0",
68-
"grunt-contrib-concat": "^1.0.1",
69-
"grunt-contrib-copy": "^1.0.0",
70-
"grunt-contrib-uglify": "^2.0.0",
71-
"grunt-contrib-watch": "^1.0.0",
72-
"grunt-exec": "^1.0.0",
73-
"grunt-nw-builder": "^2.0.3",
74-
"grunt-sass": "^1.2.0",
75-
"load-grunt-tasks": "^3.5.0",
76-
"mocha": "^2.4.5",
77-
"phantomjs-prebuilt": "^2.1.7",
78-
"shelljs": "^0.3.0"
79-
},
80-
"scripts": {
81-
"preinstall": "bower install && npm i fs-extra",
82-
"postinstall": "npm run apply:bitpay && cordova prepare",
83-
"start": "npm run build:www && ionic serve --nolivereload --nogulp -s",
84-
"start:ios": "npm run build:www && npm run build:ios && npm run open:ios",
85-
"start:android": "npm run build:www && npm run build:android && npm run run:android",
86-
"watch": "grunt watch",
87-
"build:www": "grunt",
88-
"build:www-release": "grunt prod",
89-
"build:ios": "cordova prepare ios && cordova build ios --debug",
90-
"build:android": "cordova prepare android && cordova build android --debug",
91-
"build:ios-release": "cordova prepare ios && cordova build ios --release",
92-
"build:android-release": "cordova prepare android && cordova build android --release",
93-
"open:ios": "open platforms/ios/*.xcodeproj",
94-
"open:android": "open -a open -a /Applications/Android\\ Studio.app platforms/android",
95-
"final:www": "npm run clean-all && npm run build:www-release",
96-
"final:ios": "npm run final:www && npm run build:ios-release && npm run open:ios",
97-
"final:android": "npm run final:www && npm run build:android-release && npm run run:android",
98-
"run:android": "cordova run android --device",
99-
"log:android": "adb logcat | grep chromium",
100-
"apply:copay": "cd app-template && node apply.js copay",
101-
"apply:bitpay": "cd app-template && node apply.js bitpay",
102-
"test": "./node_modules/.bin/grunt test-coveralls",
103-
"clean": "trash platforms && trash plugins && npm run postinstall",
104-
"clean-all": "git clean -dfx && npm install"
105-
},
106-
"devDependencies": {
107-
"cordova": "^6.3.1",
108-
"grunt": "^1.0.1",
109-
"ionic": "^2.1.0",
110-
"trash-cli": "^1.4.0",
111-
"lodash": "^4.3.0"
11217
}
11318
}

0 commit comments

Comments
 (0)