Skip to content

Commit

Permalink
Merge pull request #30 from soxhub/gts-test
Browse files Browse the repository at this point in the history
Added test fixture for gts component
  • Loading branch information
candunaj authored May 15, 2023
2 parents 023793e + 40f66be commit 5277984
Show file tree
Hide file tree
Showing 8 changed files with 264 additions and 103 deletions.
329 changes: 229 additions & 100 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion test-apps/v2-addon/babel.config.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{
"presets": [["@babel/preset-typescript"]],
"plugins": [
["@babel/plugin-transform-typescript", { "allowDeclareFields": true }],
"ember-template-imports/src/babel-plugin",
"@embroider/addon-dev/template-colocation-plugin",
["@babel/plugin-proposal-decorators", { "legacy": true }],
"@babel/plugin-proposal-class-properties",
"ember-template-imports/src/babel-plugin",
"ember-scoped-css/babel-plugin-scoped-class"
]
}
8 changes: 8 additions & 0 deletions test-apps/v2-addon/fixtures/expected-dist/components/time.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/* time.css */
@layer components {

h1.e9f0dc4fe {
color: red;
}

}
13 changes: 13 additions & 0 deletions test-apps/v2-addon/fixtures/expected-dist/components/time.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions test-apps/v2-addon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"@babel/plugin-proposal-class-properties": "^7.16.7",
"@babel/plugin-proposal-decorators": "^7.17.0",
"@babel/plugin-syntax-decorators": "^7.17.0",
"@babel/preset-typescript": "^7.21.5",
"@embroider/addon-dev": "^3.0.0",
"@rollup/plugin-babel": "^5.3.0",
"compare-fixture": "^1.0.1",
Expand All @@ -49,7 +50,7 @@
"prettier": "^2.5.1",
"rollup": "^2.67.0",
"rollup-plugin-copy": "^3.4.0",
"rollup-plugin-glimmer-template-tag": "^0.4.0"
"rollup-plugin-glimmer-template-tag": "^0.4.1"
},
"publishConfig": {
"registry": "https://registry.npmjs.org"
Expand All @@ -64,7 +65,8 @@
"app-js": {
"./components/alert.js": "./dist/_app_/components/alert.js",
"./components/footer.js": "./dist/_app_/components/footer.js",
"./components/header.js": "./dist/_app_/components/header.js"
"./components/header.js": "./dist/_app_/components/header.js",
"./components/time.js": "./dist/_app_/components/time.js"
}
},
"exports": {
Expand Down
1 change: 1 addition & 0 deletions test-apps/v2-addon/rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export default {
// babel.config.json.
babel({
babelHelpers: 'bundled',
extensions: ['.js', '.ts', '.gjs', '.gts'],
}),

// Ensure that standalone .hbs files are properly integrated as Javascript.
Expand Down
3 changes: 3 additions & 0 deletions test-apps/v2-addon/src/components/time.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
h1 {
color: red;
}
3 changes: 3 additions & 0 deletions test-apps/v2-addon/src/components/time.gts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<template>
<h1>Time</h1>
</template>

0 comments on commit 5277984

Please sign in to comment.