File tree 3 files changed +35
-0
lines changed
3 files changed +35
-0
lines changed Original file line number Diff line number Diff line change 3
3
docs
4
4
examples
5
5
packages
6
+ scripts
6
7
src /lib
7
8
src /modules /angular-meteor- * .js
8
9
tests
Original file line number Diff line number Diff line change 18
18
"pretest" : " npm run build:dist" ,
19
19
"test" : " velocity test-packages ./tests --ci" ,
20
20
"test:watch" : " parallelshell \" npm run watch\" \" velocity test-packages ./tests\" " ,
21
+ "dev:start" : " node scripts/dev.js" ,
22
+ "dev:stop" : " node scripts/dev.js --stop" ,
21
23
"watch" : " webpack --watch --progress --config webpack/dist.js" ,
24
+ "prewatch:dev" : " npm run dev:start" ,
22
25
"watch:dev" : " webpack --watch --progress --config webpack/dev.js" ,
23
26
"build:dist" : " webpack --progress --config webpack/dist.js" ,
27
+ "prebuild:dev" : " npm run dev:start" ,
24
28
"build:dev" : " webpack --progress --config webpack/dev.js" ,
25
29
"build:prod" : " webpack --progress --config webpack/prod.js --optimize-minimize" ,
26
30
"build" : " npm run build:dist && npm run build:prod" ,
53
57
"husky" : " ^0.11.1" ,
54
58
"lodash" : " ^3.10.1" ,
55
59
"parallelshell" : " ^2.0.0" ,
60
+ "replace-in-file" : " ^1.0.2" ,
56
61
"validate-commit-msg" : " ^2.0.0" ,
57
62
"velocity-cli" : " ^0.4.3" ,
58
63
"webpack" : " ^1.12.9"
Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env node
2
+ var replace = require ( 'replace-in-file' ) ;
3
+ var fs = require ( 'fs' ) ;
4
+ var isStop = process . argv . slice ( 2 ) . indexOf ( '--stop' ) !== - 1 ;
5
+
6
+ // path to angular-meteor-data package
7
+ var path = 'packages/angular-meteor-data/' ;
8
+ // package definition
9
+ var packageFile = path + 'package.js' ;
10
+ // angular-meteor file
11
+ var npmFile = '.npm/package/node_modules/angular-meteor/dist/angular-meteor.js' ;
12
+ var devFile = 'angular-meteor.js' ;
13
+
14
+ // replace options
15
+ var options = {
16
+ files : packageFile ,
17
+ replace : isStop ? devFile : npmFile ,
18
+ with : isStop ? npmFile : devFile
19
+ } ;
20
+
21
+ // clean up first
22
+ try {
23
+ if ( fs . accessSync ( path + devFile , fs . F_OK ) ) {
24
+ fs . unlinkSync ( path + devFile ) ;
25
+ }
26
+ } catch ( e ) { }
27
+
28
+ // make sure package uses proper file
29
+ replace ( options ) ;
You can’t perform that action at this time.
0 commit comments