Skip to content

Commit

Permalink
Downstreamed changes from @embroider/[email protected] (#122)
Browse files Browse the repository at this point in the history
* chore: Updated comments to match those from documentation

* chore: Replaced Babel plugins with decorator-transforms

* chore: Reconfigured TypeScript and Glint

* chore: Added changeset

---------

Co-authored-by: ijlee2 <[email protected]>
  • Loading branch information
ijlee2 and ijlee2 authored Dec 20, 2023
1 parent 63f57c8 commit a965de5
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 20 deletions.
7 changes: 7 additions & 0 deletions .changeset/beige-timers-roll.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"embroider-css-modules": patch
"my-v1-addon": patch
"my-app": patch
---

Downstreamed changes from @embroider/addon-blueprint@2.11.0
4 changes: 0 additions & 4 deletions docs/my-app/ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ module.exports = function (defaults) {
? '[sha512:hash:base64:5]'
: '[path][name]__[local]',
mode: (resourcePath) => {
// The host app and active child addons are moved into a shared
// temporary directory (`options.workspaceDir`) before css-loader
// processes them.
//
// We want to enable the local mode only for our own host app.
// All other addons should be loaded in the global mode.
const hostAppLocation =
Expand Down
1 change: 1 addition & 0 deletions docs/my-v1-addon/types/dummy/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import '@glint/environment-ember-loose';
import '@glint/environment-ember-template-imports';
import 'ember-source/types';
import 'ember-source/types/preview';

Expand Down
11 changes: 8 additions & 3 deletions packages/embroider-css-modules/babel.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,20 @@
}
],
"@embroider/addon-dev/template-colocation-plugin",
"@babel/plugin-transform-class-static-block",
[
"babel-plugin-ember-template-compilation",
{
"targetFormat": "hbs",
"transforms": []
}
],
["@babel/plugin-proposal-decorators", { "version": "legacy" }],
"@babel/plugin-transform-class-properties"
[
"module:decorator-transforms",
{
"runtime": {
"import": "decorator-transforms/runtime"
}
}
]
]
}
7 changes: 3 additions & 4 deletions packages/embroider-css-modules/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,17 @@
"test": "echo 'A v2 addon does not have tests, run tests in tests/embroider-css-modules'"
},
"dependencies": {
"@embroider/addon-shim": "^1.8.7"
"@embroider/addon-shim": "^1.8.7",
"decorator-transforms": "^1.0.1"
},
"devDependencies": {
"@babel/core": "^7.23.6",
"@babel/plugin-proposal-decorators": "^7.23.6",
"@babel/plugin-transform-class-properties": "^7.23.3",
"@babel/plugin-transform-class-static-block": "^7.23.4",
"@babel/plugin-transform-typescript": "^7.23.6",
"@babel/runtime": "^7.23.6",
"@embroider/addon-dev": "^4.1.3",
"@glint/core": "^1.2.1",
"@glint/environment-ember-loose": "^1.2.1",
"@glint/environment-ember-template-imports": "^1.2.1",
"@glint/template": "^1.2.1",
"@rollup/plugin-babel": "^6.0.4",
"@shared-configs/ember-template-lint": "workspace:*",
Expand Down
1 change: 1 addition & 0 deletions packages/embroider-css-modules/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"allowImportingTsExtensions": true,
"allowJs": true,
"declarationDir": "declarations",
"rootDir": "./src",
"skipLibCheck": true
},
"include": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// These will *not* be published as part of your addon, so be careful that your published code does not rely on them!

import '@glint/environment-ember-loose';
import '@glint/environment-ember-template-imports';

import type EmbroiderCssModulesRegistry from '../src/template-registry.ts';

Expand Down
50 changes: 41 additions & 9 deletions pnpm-lock.yaml

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

0 comments on commit a965de5

Please sign in to comment.