@@ -101,23 +101,21 @@ module.exports = function (defaults) {
101101 'dist' ,
102102 ) ;
103103
104- [ 'basic' , 'chrome' , 'firefox' , 'bookmarklet' , 'websocket' ] . forEach (
105- function ( dist ) {
106- let entryPoint = concatFiles (
107- new Funnel ( emberDebug , {
108- destDir : 'ember-debug' ,
109- include : [ `${ dist } -debug.js` ] ,
110- } ) ,
111- {
112- inputFiles : [ '**/*.js' ] ,
113- outputFile : '/ember_debug.js' ,
114- sourceMapConfig : { enabled : false } ,
115- } ,
116- ) ;
104+ for ( const dist of [ 'basic' , 'chrome' , 'firefox' , 'bookmarklet' ] ) {
105+ const entryPoint = concatFiles (
106+ new Funnel ( emberDebug , {
107+ destDir : 'ember-debug' ,
108+ include : [ `${ dist } -debug.js` ] ,
109+ } ) ,
110+ {
111+ inputFiles : [ '**/*.js' ] ,
112+ outputFile : '/ember_debug.js' ,
113+ sourceMapConfig : { enabled : false } ,
114+ } ,
115+ ) ;
117116
118- emberDebugs [ dist ] = mergeTrees ( [ emberDebug , entryPoint ] ) ;
119- } ,
120- ) ;
117+ emberDebugs [ dist ] = mergeTrees ( [ emberDebug , entryPoint ] ) ;
118+ }
121119
122120 let tree = app . toTree ( ) ;
123121
@@ -243,7 +241,6 @@ module.exports = function (defaults) {
243241 chrome,
244242 firefox,
245243 bookmarklet,
246- websocket : mergeTrees ( [ tree , emberDebugs . websocket ] ) ,
247244 basic : mergeTrees ( [ tree , emberDebugs . basic ] ) ,
248245 } ;
249246 Object . keys ( dists ) . forEach ( function ( key ) {
@@ -258,20 +255,6 @@ module.exports = function (defaults) {
258255 } ) ;
259256 } ) ;
260257
261- // Add {{ remote-port }} to the head
262- // so that the websocket addon can replace it.
263- dists . websocket = replace ( dists . websocket , {
264- files : [ 'index.html' ] ,
265- patterns : [
266- {
267- match : / < h e a d > / ,
268- replacement : '<head>\n{{ remote-port }}\n' ,
269- } ,
270- ] ,
271- } ) ;
272-
273- let output ;
274-
275258 if ( env === 'test' ) {
276259 // `ember test` expects the index.html file to be in the
277260 // output directory.
@@ -285,18 +268,16 @@ module.exports = function (defaults) {
285268 } ,
286269 ] ,
287270 } ) ;
288- output = mergeTrees ( [ dists . basic , dists . chrome ] ) ;
289- } else {
290- dists . testing = mergeTrees ( [ dists . basic , dists . chrome ] ) ;
291-
292- output = mergeTrees ( [
293- mv ( dists . bookmarklet , 'bookmarklet' ) ,
294- mv ( dists . firefox , 'firefox' ) ,
295- mv ( dists . chrome , 'chrome' ) ,
296- mv ( dists . websocket , 'websocket' ) ,
297- mv ( dists . testing , 'testing' ) ,
298- ] ) ;
271+
272+ return mergeTrees ( [ dists . basic , dists . chrome ] ) ;
299273 }
300274
301- return output ;
275+ dists . testing = mergeTrees ( [ dists . basic , dists . chrome ] ) ;
276+
277+ return mergeTrees ( [
278+ mv ( dists . bookmarklet , 'bookmarklet' ) ,
279+ mv ( dists . firefox , 'firefox' ) ,
280+ mv ( dists . chrome , 'chrome' ) ,
281+ mv ( dists . testing , 'testing' ) ,
282+ ] ) ;
302283} ;
0 commit comments