@@ -23,8 +23,14 @@ exports.normalizeWorkspacePath = function normalizeWorkspacePath(workspacePath)
2323 return normalized ;
2424}
2525
26+ exports . isProduction = isProduction ;
27+
28+ function isProduction ( ) {
29+ return process . env . EMBER_ENV === 'production' ;
30+ }
31+
2632function hasTests ( workspace ) {
27- return fs . existsSync ( `${ rootPath } /${ workspace } /test` ) ;
33+ return ! isProduction ( ) && fs . existsSync ( `${ rootPath } /${ workspace } /test` ) ;
2834}
2935
3036exports . funnelSrc = function funnelSrc ( workspace ) {
@@ -52,9 +58,11 @@ exports.funnelSrc = function funnelSrc(workspace) {
5258 * @param {any } compilerOptions
5359 * @returns {BroccoliTree } [workspace]
5460 * ├── dist
55- * │ ├── src/*.js
56- * │ └── types/*.d.ts
57- * └── src/*.ts
61+ * │ ├── src/*.{js,map}
62+ * │ ├── types/*.d.ts
63+ * │ └── test/*.{js,d.ts,map}
64+ * ├── src/*.ts
65+ * └── test/*.ts
5866 */
5967exports . compileSrc = function compileSrc ( src , compilerOptions ) {
6068 const compiled = debugTree ( typescript ( src , {
@@ -122,7 +130,7 @@ exports.packageDist = function packageDist(compiled, workspace, addTestVendor) {
122130 annotation : `mv ${ distPath } to .` ,
123131 } ) ;
124132
125- if ( ! addTestVendor ) {
133+ if ( isProduction ( ) || addTestVendor !== true ) {
126134 return debugTree ( dist , `packageDist/${ workspace } /output` ) ;
127135 }
128136
@@ -172,7 +180,7 @@ function testDist() {
172180 return debugTree (
173181 mergeTrees ( [ qunit , tokenizer , loader , index ] ) ,
174182 'testDist' ) ;
175- } ;
183+ }
176184
177185function rollupPackage ( allDist , workspace ) {
178186 allDist = debugTree (
0 commit comments