1- /*global module, require*/
1+ /*
2+ * Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved.
3+ *
4+ * Permission is hereby granted, free of charge, to any person obtaining a
5+ * copy of this software and associated documentation files (the "Software"),
6+ * to deal in the Software without restriction, including without limitation
7+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8+ * and/or sell copies of the Software, and to permit persons to whom the
9+ * Software is furnished to do so, subject to the following conditions:
10+ *
11+ * The above copyright notice and this permission notice shall be included in
12+ * all copies or substantial portions of the Software.
13+ *
14+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20+ * DEALINGS IN THE SOFTWARE.
21+ *
22+ */
23+ /*global module, require*/
224module . exports = function ( grunt ) {
325 'use strict' ;
426
@@ -10,6 +32,7 @@ module.exports = function (grunt) {
1032 '!src/thirdparty/**' ,
1133 '!src/widgets/bootstrap-*.js' ,
1234 '!src/extensions/**/unittest-files/**/*.js' ,
35+ '!src/extensions/**/thirdparty/**/*.js' ,
1336 '!src/extensions/dev/**' ,
1437 '!src/extensions/disabled/**' ,
1538 '!src/**/*-min.js' ,
@@ -82,31 +105,21 @@ module.exports = function (grunt) {
82105 } ) ;
83106
84107 // load dependencies
108+ grunt . loadTasks ( 'tasks' ) ;
85109 grunt . loadNpmTasks ( 'grunt-contrib-jasmine' ) ;
86110 grunt . loadNpmTasks ( 'grunt-contrib-jshint' ) ;
87111 grunt . loadNpmTasks ( 'grunt-contrib-watch' ) ;
88112
89113 // task: install
90114 grunt . registerTask ( 'install' , [ 'write-config' ] ) ;
91115
92- // task: write-config
93- // merge package.json and src/brackets.config.json into src/config.json
94- grunt . registerTask ( 'write-config' , function ( ) {
95- var packageJSON = grunt . file . readJSON ( "package.json" ) ,
96- appConfigJSON = grunt . file . readJSON ( "src/brackets.config.json" ) ;
97-
98- Object . keys ( packageJSON ) . forEach ( function ( key ) {
99- if ( appConfigJSON [ key ] === undefined ) {
100- appConfigJSON [ key ] = packageJSON [ key ] ;
101- }
102- } ) ;
103-
104- grunt . file . write ( "src/config.json" , JSON . stringify ( appConfigJSON , null , " " ) ) ;
105- } ) ;
106-
107116 // task: test
108117 grunt . registerTask ( 'test' , [ 'jshint' , 'jasmine' ] ) ;
109118
119+ // task: set-sprint
120+ // Update sprint number in package.json and rewrite src/config.json
121+ grunt . registerTask ( 'set-sprint' , [ 'update-sprint-number' , 'write-config' ] ) ;
122+
110123 // Default task.
111124 grunt . registerTask ( 'default' , [ 'test' ] ) ;
112125} ;
0 commit comments