@@ -43,25 +43,6 @@ module.exports = function makeNodeTree(destinationPath) {
43
43
}
44
44
} ) ;
45
45
46
- // Transform all tests to make them runnable in node
47
- nodeTree = replace ( nodeTree , {
48
- files : [ '**/test/**/*_spec.js' ] ,
49
- patterns : [
50
- {
51
- // Override the default DOM adapter with Parse5 for all tests
52
- match : / " u s e s t r i c t " ; / ,
53
- replacement :
54
- "'use strict'; var parse5Adapter = require('angular2/src/dom/parse5_adapter'); " +
55
- "parse5Adapter.Parse5DomAdapter.makeCurrent();"
56
- } ,
57
- {
58
- // Append main() to all tests since all of our tests are wrapped in exported main fn
59
- match : / $ / g,
60
- replacement : "\r\n main();"
61
- }
62
- ]
63
- } ) ;
64
-
65
46
// Now we add the LICENSE file into all the folders that will become npm packages
66
47
outputPackages . forEach ( function ( destDir ) {
67
48
var license = new Funnel ( '.' , { files : [ 'LICENSE' ] , destDir : destDir } ) ;
@@ -134,9 +115,27 @@ module.exports = function makeNodeTree(destinationPath) {
134
115
target : 'ES5'
135
116
} ) ;
136
117
137
-
138
118
nodeTree = mergeTrees ( [ nodeTree , typescriptTree , docs , packageJsons ] ) ;
139
119
120
+ // Transform all tests to make them runnable in node
121
+ nodeTree = replace ( nodeTree , {
122
+ files : [ '**/test/**/*_spec.js' ] ,
123
+ patterns : [
124
+ {
125
+ // Override the default DOM adapter with Parse5 for all tests
126
+ match : / " u s e s t r i c t " ; / ,
127
+ replacement :
128
+ "'use strict'; var parse5Adapter = require('angular2/src/dom/parse5_adapter'); " +
129
+ "parse5Adapter.Parse5DomAdapter.makeCurrent();"
130
+ } ,
131
+ {
132
+ // Append main() to all tests since all of our tests are wrapped in exported main fn
133
+ match : / $ / g,
134
+ replacement : "\r\n main();"
135
+ }
136
+ ]
137
+ } ) ;
138
+
140
139
// TODO(iminar): tree differ seems to have issues with trees created by mergeTrees, investigate!
141
140
// ENOENT error is thrown while doing fs.readdirSync on inputRoot
142
141
// in the meantime, we just do noop mv to create a new tree
0 commit comments