File tree Expand file tree Collapse file tree 4 files changed +56
-0
lines changed
packages/ember-local-class Expand file tree Collapse file tree 4 files changed +56
-0
lines changed Original file line number Diff line number Diff line change 1+ TODO
Original file line number Diff line number Diff line change 1+ export * from 'glimmer-local-class-transform/-runtime' ;
Original file line number Diff line number Diff line change 1+ const { localClassRegistryPlugin } = require ( 'glimmer-local-class-transform' ) ;
2+
3+ module . exports = {
4+ name : 'ember-local-class' ,
5+ setupPreprocessorRegistry ( type , registry ) {
6+ if ( type === 'parent' ) {
7+ let options = ( this . app ?? this . parent ) . options ?. [ 'ember-local-class' ] ?? { } ;
8+ let runtimeModule = 'ember-local-class/-runtime' ;
9+ let extension = options . extension ?? '.module.css' ;
10+ let pathMapping = options . pathMapping ?? {
11+ '/template\\.hbs$' : `/styles${ extension } ` ,
12+ '/templates/(.*/)?(.*)\\.hbs$' : `/styles/$1$2${ extension } ` ,
13+ '(\\.g?[tj]s|\\.hbs)+$' : extension ,
14+ } ;
15+
16+ registry . add (
17+ 'htmlbars-ast-plugin' ,
18+ localClassRegistryPlugin ( { runtimeModule, pathMapping } )
19+ ) ;
20+ }
21+ }
22+ }
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " ember-local-class" ,
3+ "version" : " 1.0.0-alpha.0" ,
4+ "description" : " An Ember addon to automatically configure `glimmer-local-class-transform`" ,
5+ "keywords" : [
6+ " ember-addon"
7+ ],
8+ "homepage" : " https://github.com/salsify/ember-css-modules/tree/master/packages/ember-local-class" ,
9+ "repository" : {
10+ "type" : " git" ,
11+ "url" :
" git+ssh://[email protected] /salsify/ember-css-modules.git" ,
12+ "directory" : " packages/ember-local-class"
13+ },
14+ "license" : " MIT" ,
15+ "author" : " Dan Freeman" ,
16+ "dependencies" : {
17+ "ember-auto-import" : " ^2.10.0" ,
18+ "ember-cli-babel" : " ^8.2.0" ,
19+ "glimmer-local-class-transform" : " ^1.0.0-alpha.0"
20+ },
21+ "peerDependencies" : {
22+ "@babel/core" : " ^7.0.0"
23+ },
24+ "ember-addon" : {
25+ "before" : [
26+ " ember-cli-htmlbars"
27+ ]
28+ },
29+ "volta" : {
30+ "extends" : " ../../package.json"
31+ }
32+ }
You can’t perform that action at this time.
0 commit comments