@@ -18,6 +18,10 @@ var exec = require('child_process').exec;
18
18
var execPromise = Q . denodeify ( exec ) ;
19
19
var prompt = require ( 'prompt' ) ;
20
20
21
+ // TODO:
22
+ // 1. Think about using runSequence
23
+ // 2. Think about using spawn instead of exec in case of long error messages.
24
+
21
25
22
26
var docShredder = require ( './public/doc-shredder/doc-shredder' ) ;
23
27
@@ -38,13 +42,6 @@ var _excludeMatchers = _excludePatterns.map(function(excludePattern){
38
42
return new Minimatch ( excludePattern )
39
43
} ) ;
40
44
41
- /*
42
- Within this repo generated files are checked in so that we can avoid running the
43
- shredder over the entire _examples dir each time someone refreshes the repo
44
- ( the ‘shred-devguide-examples’ gulp task). The gulp ‘serve-and-watch’ shredder is only
45
- a ‘partial’ shredder. It only shred’s files in directories changed during
46
- the current session.
47
- */
48
45
49
46
gulp . task ( 'help' , taskListing . withFilters ( function ( taskName ) {
50
47
var isSubTask = taskName . substr ( 0 , 1 ) == "_" ;
@@ -97,7 +94,6 @@ gulp.task('build-api-docs', ['_shred-api-examples'], function() {
97
94
return buildApiDocs ( ) ;
98
95
} ) ;
99
96
100
-
101
97
gulp . task ( '_shred-devguide-examples' , [ '_shred-clean-devguide' ] , function ( ) {
102
98
return docShredder . shred ( _devguideShredOptions ) ;
103
99
} ) ;
@@ -120,7 +116,6 @@ gulp.task('_build-shred-maps', function() {
120
116
return build - shred - maps ( true ) ;
121
117
} ) ;
122
118
123
-
124
119
gulp . task ( 'git-changed-examples' , [ '_shred-devguide-examples' ] , function ( ) {
125
120
var after , sha , messageSuffix ;
126
121
if ( argv . after ) {
@@ -168,14 +163,19 @@ gulp.task('git-changed-examples', ['_shred-devguide-examples'], function(){
168
163
} ) ;
169
164
170
165
gulp . task ( 'check-deploy' , function ( ) {
171
- return execPromise ( [ 'npm run harp -- compile . ./deploy' ] , { } ) . then ( function ( ) {
172
- execPromise ( 'npm run live-server ./deploy' ) ;
166
+ console . log ( 'running harp compile...' ) ;
167
+ return execPromise ( 'npm run harp -- compile . ./www' , { } ) . then ( function ( ) {
168
+ execPromise ( 'npm run live-server ./www' ) ;
173
169
return askDeploy ( ) ;
174
170
} ) . then ( function ( shouldDeploy ) {
175
171
if ( shouldDeploy ) {
176
- console . log ( "Sorry! Deploy to Firebase has not yet been implemented." )
172
+ console . log ( 'deploying...' ) ;
173
+ return execPromise ( 'firebase deploy' ) ;
174
+ } else {
175
+ return [ 'Not deploying' ] ;
177
176
}
178
- return ;
177
+ } ) . then ( function ( s ) {
178
+ console . log ( s . join ( '' ) ) ;
179
179
} ) ;
180
180
} ) ;
181
181
0 commit comments