@@ -24,27 +24,43 @@ async function lts(project: Project) {
24
24
node : '12.22.1' ,
25
25
} ;
26
26
27
- merge ( project . files , {
28
- app : {
29
- // this version of ember doesn't support native class syntax here (which is
30
- // what we have in our base app template)
31
- 'app.js' : `
32
- import Application from '@ember/application';
33
- import Resolver from 'ember-resolver';
34
- import loadInitializers from 'ember-load-initializers';
35
- import config from '@ef4/app-template/config/environment';
27
+ // this version of ember doesn't support native class syntax here (which is
28
+ // what we have in our base app and addon templates)
29
+ function olderAppJS ( moduleName : string ) {
30
+ return `
31
+ import Application from '@ember/application';
32
+ import Resolver from 'ember-resolver';
33
+ import loadInitializers from 'ember-load-initializers';
34
+ import config from '${ moduleName } /config/environment';
36
35
37
- const App = Application.extend({
38
- modulePrefix: config.modulePrefix,
39
- podModulePrefix: config.podModulePrefix,
40
- Resolver
41
- })
36
+ const App = Application.extend({
37
+ modulePrefix: config.modulePrefix,
38
+ podModulePrefix: config.podModulePrefix,
39
+ Resolver
40
+ })
42
41
43
- loadInitializers(App, config.modulePrefix);
44
- export default App
45
- ` ,
46
- } ,
47
- } ) ;
42
+ loadInitializers(App, config.modulePrefix);
43
+ export default App
44
+ ` ;
45
+ }
46
+
47
+ if ( project . name === '@ef4/app-template' ) {
48
+ merge ( project . files , {
49
+ app : {
50
+ 'app.js' : olderAppJS ( '@ef4/app-template' ) ,
51
+ } ,
52
+ } ) ;
53
+ } else if ( project . name === '@ef4/addon-template' ) {
54
+ merge ( project . files , {
55
+ tests : {
56
+ dummy : {
57
+ app : {
58
+ 'app.js' : olderAppJS ( 'dummy' ) ,
59
+ } ,
60
+ } ,
61
+ } ,
62
+ } ) ;
63
+ }
48
64
}
49
65
50
66
async function release ( project : Project ) {
0 commit comments