File tree Expand file tree Collapse file tree 3 files changed +35
-1
lines changed Expand file tree Collapse file tree 3 files changed +35
-1
lines changed Original file line number Diff line number Diff line change @@ -192,6 +192,10 @@ The previous release version (used for determining what changed).
192
192
193
193
The version that will be set in ` package.json ` after the release.
194
194
195
+ #### npmPublish
196
+
197
+ Set to ` true ` to publish a release via npm. Defaults to ` false ` .
198
+
195
199
#### tagTime
196
200
197
201
Timestamp for the release tag.
Original file line number Diff line number Diff line change
1
+ module . exports = function ( Release ) {
2
+ Release . define ( {
3
+ _publishNpm : function ( ) {
4
+ if ( ! Release . npmPublish ) {
5
+ return ;
6
+ }
7
+
8
+ Release . chdir ( Release . dir . repo ) ;
9
+
10
+ var npmCommand = "npm publish" ;
11
+
12
+ if ( Release . preRelease ) {
13
+ npmCommand += " --tag beta" ;
14
+ }
15
+
16
+ if ( Release . isTest ) {
17
+ console . log ( "Actual release would now publish to npm" ) ;
18
+ console . log ( "Would run: " + npmCommand . cyan ) ;
19
+ return ;
20
+ }
21
+
22
+ console . log ( "Publishing to npm, running " + npmCommand . cyan ) ;
23
+ Release . exec ( npmCommand ) ;
24
+ console . log ( ) ;
25
+ }
26
+ } ) ;
27
+ } ;
Original file line number Diff line number Diff line change @@ -43,7 +43,10 @@ commonTasks = [
43
43
Release . _section ( "publishing to jQuery CDN" ) ,
44
44
Release . _copyCdnArtifacts ,
45
45
Release . confirmReview ,
46
- Release . _pushToCdn
46
+ Release . _pushToCdn ,
47
+
48
+ Release . _section ( "publishing to npm" ) ,
49
+ Release . _publishNpm
47
50
] ;
48
51
49
52
stableTasks = [
You can’t perform that action at this time.
0 commit comments