ember-scoped-css 2.0.4 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/all-Bimr-GZ4.cjs +1319 -0
- package/dist/cjs/all.cjs +1 -1
- package/dist/cjs/babel.cjs +1 -1
- package/dist/cjs/rollup.cjs +1 -1
- package/dist/cjs/vite.cjs +1 -1
- package/package.json +1 -1
- package/src/build/unplugin-colocated.js +2 -5
- package/src/lib/path/const.js +1 -0
- package/src/lib/path/utils.isRelevantFile.test.ts +7 -0
- package/src/lib/path/utils.js +1 -0
- package/dist/cjs/all-DIcjm1uz.cjs +0 -1319
package/dist/cjs/all.cjs
CHANGED
package/dist/cjs/babel.cjs
CHANGED
package/dist/cjs/rollup.cjs
CHANGED
package/dist/cjs/vite.cjs
CHANGED
package/package.json
CHANGED
|
@@ -51,11 +51,6 @@ export function colocated(options = {}) {
|
|
|
51
51
|
path.basename(parsed.fileName),
|
|
52
52
|
);
|
|
53
53
|
|
|
54
|
-
/**
|
|
55
|
-
* Rollup doesn't normally watch CSS files
|
|
56
|
-
*/
|
|
57
|
-
this.addWatchFile(filePath);
|
|
58
|
-
|
|
59
54
|
return buildResponse(id, filePath);
|
|
60
55
|
}
|
|
61
56
|
},
|
|
@@ -63,6 +58,8 @@ export function colocated(options = {}) {
|
|
|
63
58
|
const meta = this.getModuleInfo(id)?.meta?.[META];
|
|
64
59
|
|
|
65
60
|
if (meta) {
|
|
61
|
+
this.addWatchFile(meta.fullPath);
|
|
62
|
+
|
|
66
63
|
let code = readFileSync(meta.fullPath, 'utf-8');
|
|
67
64
|
|
|
68
65
|
let css = rewriteCss(
|
package/src/lib/path/const.js
CHANGED
|
@@ -9,6 +9,7 @@ export const leadingSlashPath = {
|
|
|
9
9
|
atEmbroider: path.join('/@embroider'),
|
|
10
10
|
componentsDir: path.join('/components/'),
|
|
11
11
|
templatesDir: path.join('/templates/'),
|
|
12
|
+
routesDir: path.join('/routes/'),
|
|
12
13
|
testem: path.join('/testem'),
|
|
13
14
|
src: path.join('/src/'),
|
|
14
15
|
app: path.join('/app/'),
|
|
@@ -20,6 +20,13 @@ describe('isRelevantFile()', () => {
|
|
|
20
20
|
|
|
21
21
|
expect(result).toBeTruthy();
|
|
22
22
|
});
|
|
23
|
+
|
|
24
|
+
it('for /routes/', () => {
|
|
25
|
+
let file = path.join(paths.viteApp, 'app/routes/application.gts');
|
|
26
|
+
let result = isRelevantFile(file, { cwd: paths.viteApp });
|
|
27
|
+
|
|
28
|
+
expect(result).toBeTruthy();
|
|
29
|
+
});
|
|
23
30
|
});
|
|
24
31
|
|
|
25
32
|
describe('the file is not relevant', () => {
|
package/src/lib/path/utils.js
CHANGED