File tree 8 files changed +2395
-252
lines changed 8 files changed +2395
-252
lines changed Original file line number Diff line number Diff line change 31
31
runs-on : ${{ matrix.os }}-latest
32
32
33
33
strategy :
34
+ fail-fast : false
34
35
matrix :
35
36
os : [ubuntu, windows]
36
37
node-version : [12.x, 14.x]
73
74
needs : [test, lint]
74
75
75
76
strategy :
77
+ fail-fast : false
76
78
matrix :
77
79
ember-try-scenario :
78
80
- ember-lts-3.8
81
+ - ember-lts-3.12
82
+ - ember-lts-3.16
79
83
- ember-lts-3.20
80
84
- ember-lts-3.24
81
85
- ember-lts-3.28
Original file line number Diff line number Diff line change @@ -12,6 +12,25 @@ module.exports = async function () {
12
12
npm : {
13
13
devDependencies : {
14
14
'ember-source' : '~3.8.0' ,
15
+ 'ember-cli' : '~3.8.0' ,
16
+ } ,
17
+ } ,
18
+ } ,
19
+ {
20
+ name : 'ember-lts-3.12' ,
21
+ npm : {
22
+ devDependencies : {
23
+ 'ember-source' : '~3.12.0' ,
24
+ 'ember-cli' : '~3.12.0' ,
25
+ } ,
26
+ } ,
27
+ } ,
28
+ {
29
+ name : 'ember-lts-3.16' ,
30
+ npm : {
31
+ devDependencies : {
32
+ 'ember-source' : '~3.16.0' ,
33
+ 'ember-cli' : '~3.16.0' ,
15
34
} ,
16
35
} ,
17
36
} ,
@@ -20,6 +39,7 @@ module.exports = async function () {
20
39
npm : {
21
40
devDependencies : {
22
41
'ember-source' : '~3.20.5' ,
42
+ 'ember-cli' : '~3.20.0' ,
23
43
} ,
24
44
} ,
25
45
} ,
@@ -28,6 +48,7 @@ module.exports = async function () {
28
48
npm : {
29
49
devDependencies : {
30
50
'ember-source' : '~3.24.3' ,
51
+ 'ember-cli' : '~3.24.0' ,
31
52
} ,
32
53
} ,
33
54
} ,
@@ -36,6 +57,7 @@ module.exports = async function () {
36
57
npm : {
37
58
devDependencies : {
38
59
'ember-source' : '~3.28.0' ,
60
+ 'ember-cli' : '~3.28.0' ,
39
61
} ,
40
62
} ,
41
63
} ,
Original file line number Diff line number Diff line change @@ -96,13 +96,36 @@ module.exports = {
96
96
}
97
97
98
98
this . _addon . logger . debug ( `setup *.hbs compiler with ${ htmlbarsOptions . pluginNames } ` ) ;
99
- return debugTree (
99
+ let output = debugTree (
100
100
this . _addon . transpileTree ( inputTree , {
101
101
isProduction,
102
102
...htmlbarsOptions ,
103
103
} ) ,
104
104
'03-output'
105
105
) ;
106
+
107
+ let checker = new VersionChecker ( this . _addon . project ) . for ( 'ember-cli' , 'npm' ) ;
108
+ let requiresBabelTree = checker . lt ( '3.13.0' ) ;
109
+ let isAddon = this . _addon . parent !== this . _addon . project ;
110
+
111
+ // as a result of https://github.com/ember-cli/ember-cli-htmlbars/pull/749 we are relying
112
+ // on babel for all template comilation. This works fine since [email protected] but before
113
+ // that there was a different path for **addon** templates and they would not be compiled
114
+ // correctly. This change wraps the output of addons in a babel tree since ember-cli
115
+ // isn't doing that properly.
116
+ if ( requiresBabelTree && isAddon ) {
117
+ let babelAddon = this . _addon . parent . addons . find (
118
+ ( addon ) => addon . name === 'ember-cli-babel'
119
+ ) ;
120
+ output = babelAddon . transpileTree ( output , {
121
+ babel : this . _addon . parent . options . babel ,
122
+ 'ember-cli-babel' : {
123
+ compileModules : false ,
124
+ } ,
125
+ } ) ;
126
+ }
127
+
128
+ return output ;
106
129
} ,
107
130
108
131
precompile ( string , _options ) {
Original file line number Diff line number Diff line change 79
79
"ember-resolver" : " ^8.0.2" ,
80
80
"ember-source" : " ~3.28.0" ,
81
81
"ember-source-channel-url" : " ^3.0.0" ,
82
+ "ember-styleguide" : " ^5.0.0" ,
82
83
"ember-template-lint" : " ^3.6.0" ,
83
84
"ember-try" : " ^1.4.0" ,
84
85
"eslint" : " ^7.32.0" ,
109
110
"main" : " lib/ember-addon-main.js" ,
110
111
"configPath" : " tests/dummy/config"
111
112
},
113
+ "resolutions" : {
114
+ "ember-cli-htmlbars" : " link:."
115
+ },
112
116
"release-it" : {
113
117
"plugins" : {
114
118
"release-it-lerna-changelog" : {
Original file line number Diff line number Diff line change
1
+ import { module , test } from 'qunit' ;
2
+ import { visit , currentURL } from '@ember/test-helpers' ;
3
+ import { setupApplicationTest } from 'ember-qunit' ;
4
+
5
+ module ( 'Acceptance | styleguide' , function ( hooks ) {
6
+ setupApplicationTest ( hooks ) ;
7
+
8
+ test ( 'visiting /styleguide' , async function ( assert ) {
9
+ await visit ( '/styleguide' ) ;
10
+
11
+ assert . equal ( currentURL ( ) , '/styleguide' ) ;
12
+
13
+ assert . dom ( '[data-test-es-note-heading]' ) . containsText ( 'says...' ) ;
14
+ } ) ;
15
+ } ) ;
Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ const Router = EmberRouter.extend({
6
6
rootURL : config . rootURL ,
7
7
} ) ;
8
8
9
- Router . map ( function ( ) { } ) ;
9
+ Router . map ( function ( ) {
10
+ this . route ( 'styleguide' ) ;
11
+ } ) ;
10
12
11
13
export default Router ;
Original file line number Diff line number Diff line change
1
+ <EsNote >You should try out this cool note component</EsNote >
You can’t perform that action at this time.
0 commit comments