@@ -20,78 +20,100 @@ 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' ,
33- sourcemap : true
34- } ,
35- format : 'es' ,
59+ sourcemap : true ,
60+ exports : 'named'
61+ } ] ,
3662 plugins : [
3763 loadWithInlineMap ( )
3864 ]
3965 }
4066 } ) ;
4167
68+ const amdNamed = new Rollup ( compiled , {
69+ rollup : {
70+ input : 'lib/index.js' ,
71+ output : [ {
72+ file : 'named-amd/backburner.js' ,
73+ exports : 'named' ,
74+ format : 'amd' ,
75+ amd : { id : 'backburner' } ,
76+ sourcemap : true
77+ } , {
78+ file : 'backburner.js' ,
79+ format : 'cjs' ,
80+ sourcemap : true ,
81+ exports : 'named'
82+ } ] ,
83+ plugins : [
84+ loadWithInlineMap ( ) ,
85+ buble ( )
86+ ]
87+ }
88+ } ) ;
89+
90+ const amdTests = new Rollup ( compiled , {
91+ annotation : 'named-amd/tests.js' ,
92+ rollup : {
93+ input : 'tests/index.js' ,
94+ external : [ 'backburner' ] ,
95+ output : [ {
96+ file : 'named-amd/tests.js' ,
97+ format : 'amd' ,
98+ amd : { id : 'backburner-tests' } ,
99+ sourcemap : true ,
100+ exports : 'named'
101+ } ] ,
102+ plugins : [
103+ loadWithInlineMap ( ) ,
104+ buble ( )
105+ ]
106+ }
107+ } ) ;
108+
42109 return new MergeTrees ( [
43110 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- } )
111+ compiledDeclarations ,
112+ amdNamed ,
113+ amdTests ,
114+ qunit ,
115+ loader ,
116+ tests
95117 ] , {
96118 annotation : 'dist'
97119 } ) ;
0 commit comments