@@ -20,78 +20,87 @@ module.exports = function (app) {
2020 } )
2121 ] ) ;
2222
23+ const qunit = new Funnel ( path . dirname ( require . resolve ( 'qunit' ) ) , {
24+ annotation : 'tests/qunit.{js,css}' ,
25+ destDir : 'tests' ,
26+ files : [ 'qunit.css' , 'qunit.js' ]
27+ } ) ;
28+
29+ const loader = new Funnel ( path . dirname ( require . resolve ( 'loader.js' ) ) , {
30+ annotation : 'tests/loader.js' ,
31+ destDir : 'tests' ,
32+ files : [ 'loader.js' ]
33+ } ) ;
34+
35+ const tests = new Funnel ( __dirname + '/tests' , {
36+ destDir : 'tests' ,
37+ files : [ 'index.html' ]
38+ } ) ;
39+
2340 const compiled = typescript ( src , {
2441 throwOnError : process . env . EMBER_ENV === 'production' ,
2542 } ) ;
2643
44+ const compiledDeclarations = typescript ( 'lib' , {
45+ tsconfig : {
46+ compilerOptions : {
47+ "declaration" : true ,
48+ }
49+ }
50+ } ) ;
51+
2752 const backburner = new Rollup ( compiled , {
53+ annotation : 'backburner.js' ,
2854 rollup : {
2955 input : 'lib/index.js' ,
30- output : {
56+ output : [ {
3157 file : 'es6/backburner.js' ,
3258 format : 'es' ,
3359 sourcemap : true
34- } ,
35- format : 'es' ,
60+ } , {
61+ file : 'named-amd/backburner.js' ,
62+ exports : 'named' ,
63+ format : 'amd' ,
64+ amd : { id : 'backburner' } ,
65+ sourcemap : true
66+ } , {
67+ file : 'backburner.js' ,
68+ format : 'cjs' ,
69+ sourcemap : true ,
70+ exports : 'named'
71+ } ] ,
3672 plugins : [
37- loadWithInlineMap ( )
73+ loadWithInlineMap ( ) ,
74+ buble ( )
3875 ]
3976 }
4077 } ) ;
4178
79+ const amdTests = new Rollup ( compiled , {
80+ annotation : 'named-amd/tests.js' ,
81+ rollup : {
82+ input : 'tests/index.js' ,
83+ external : [ 'backburner' ] ,
84+ plugins : [
85+ loadWithInlineMap ( ) ,
86+ buble ( )
87+ ] ,
88+ output : [ {
89+ file : 'named-amd/tests.js' ,
90+ format : 'amd' ,
91+ amd : { id : 'backburner-tests' } ,
92+ sourcemap : true
93+ } ]
94+ }
95+ } ) ;
96+
4297 return new MergeTrees ( [
4398 backburner ,
44- new Rollup ( compiled , {
45- rollup : {
46- input : 'lib/index.js' ,
47- plugins : [
48- loadWithInlineMap ( ) ,
49- buble ( )
50- ] ,
51- output : [ {
52- file : 'named-amd/backburner.js' ,
53- exports : 'named' ,
54- format : 'amd' ,
55- amd : { id : 'backburner' } ,
56- sourcemap : true
57- } , {
58- file : 'backburner.js' ,
59- format : 'cjs' ,
60- sourcemap : true
61- } ]
62- }
63- } ) ,
64- new Rollup ( compiled , {
65- annotation : 'named-amd/tests.js' ,
66- rollup : {
67- input : 'tests/index.js' ,
68- external : [ 'backburner' ] ,
69- plugins : [
70- loadWithInlineMap ( ) ,
71- buble ( )
72- ] ,
73- output : [ {
74- file : 'named-amd/tests.js' ,
75- format : 'amd' ,
76- amd : { id : 'backburner-tests' } ,
77- sourcemap : true
78- } ]
79- }
80- } ) ,
81- new Funnel ( path . dirname ( require . resolve ( 'qunit' ) ) , {
82- annotation : 'tests/qunit.{js,css}' ,
83- destDir : 'tests' ,
84- files : [ 'qunit.css' , 'qunit.js' ]
85- } ) ,
86- new Funnel ( path . dirname ( require . resolve ( 'loader.js' ) ) , {
87- annotation : 'tests/loader.js' ,
88- destDir : 'tests' ,
89- files : [ 'loader.js' ]
90- } ) ,
91- new Funnel ( __dirname + '/tests' , {
92- destDir : 'tests' ,
93- files : [ 'index.html' ]
94- } )
99+ compiledDeclarations ,
100+ amdTests ,
101+ qunit ,
102+ loader ,
103+ tests
95104 ] , {
96105 annotation : 'dist'
97106 } ) ;
0 commit comments