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).
192192
193193The version that will be set in ` package.json ` after the release.
194194
195+ #### npmPublish
196+
197+ Set to ` true ` to publish a release via npm. Defaults to ` false ` .
198+
195199#### tagTime
196200
197201Timestamp 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 = [
4343 Release . _section ( "publishing to jQuery CDN" ) ,
4444 Release . _copyCdnArtifacts ,
4545 Release . confirmReview ,
46- Release . _pushToCdn
46+ Release . _pushToCdn ,
47+
48+ Release . _section ( "publishing to npm" ) ,
49+ Release . _publishNpm
4750] ;
4851
4952stableTasks = [
You can’t perform that action at this time.
0 commit comments