File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env node
2
+
3
+ // Copy Browser Code To Docs for Github Pages
4
+ // v1.0
5
+ // Automatically copies the www/ contents to /docs so that
6
+ // the repository can automatically be hosted with Github pages
7
+
8
+ var shell = require ( 'child_process' ) . execSync ;
9
+ var fs = require ( 'fs' ) ;
10
+ var path = require ( 'path' ) ;
11
+
12
+ const src = 'www' ;
13
+ const dist = 'docs' ;
14
+
15
+ shell ( `mkdir -p ${ dist } ` ) ;
16
+ shell ( `cp -r ${ src } /* ${ dist } ` ) ;
Original file line number Diff line number Diff line change 9
9
"ionic:build" : " ionic-app-scripts build" ,
10
10
"ionic:serve" : " ionic-app-scripts serve" ,
11
11
"add-contributor" : " all-contributors add" ,
12
- "generate-contributors" : " all-contributors generate"
12
+ "generate-contributors" : " all-contributors generate" ,
13
+ "deploy" : " npm run build --prod" ,
14
+ "postdeploy" : " node copy_www_to_docs.js"
13
15
},
14
16
"dependencies" : {
15
17
"@angular/common" : " 5.0.0" ,
You can’t perform that action at this time.
0 commit comments