boss-css 0.0.15 → 0.0.17
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/cli/tasks/init.cjs +11 -9
- package/dist/cli/tasks/init.mjs +11 -9
- package/dist/devtools-app/index.mjs +19 -19
- package/dist/parser/jsx/browser.cjs +8 -3
- package/dist/parser/jsx/browser.mjs +8 -3
- package/dist/parser/jsx/extractCode.cjs +3 -2
- package/dist/parser/jsx/extractCode.mjs +3 -2
- package/dist/parser/jsx/extractProps.cjs +7 -1
- package/dist/parser/jsx/extractProps.mjs +7 -1
- package/dist/runtime/index.cjs +10 -8
- package/dist/runtime/index.mjs +10 -8
- package/dist/tasks/postcss.cjs +16 -5
- package/dist/tasks/postcss.mjs +16 -5
- package/package.json +1 -7
package/dist/cli/tasks/init.cjs
CHANGED
|
@@ -255,8 +255,8 @@ const init = async (config) => {
|
|
|
255
255
|
packageJson
|
|
256
256
|
});
|
|
257
257
|
const isStencil = framework.id === "stencil";
|
|
258
|
-
const cssAutoLoad = !isStencil;
|
|
259
|
-
const detectedSrcRoot = await detectSrcRoot(cwd);
|
|
258
|
+
const cssAutoLoad = !isStencil && !isNext;
|
|
259
|
+
const detectedSrcRoot = await detectSrcRoot(cwd, isNext);
|
|
260
260
|
const normalizedSrcRoot = normalizeRelativePath(await resolveTextValue({
|
|
261
261
|
label: "Where is your source root?",
|
|
262
262
|
value: flags.srcRoot,
|
|
@@ -559,7 +559,11 @@ const normalizePostcssMode = (value) => {
|
|
|
559
559
|
if (normalized === "auto" || normalized === "manual" || normalized === "skip") return normalized;
|
|
560
560
|
}
|
|
561
561
|
};
|
|
562
|
-
const detectSrcRoot = async (cwd) => {
|
|
562
|
+
const detectSrcRoot = async (cwd, isNext) => {
|
|
563
|
+
if (isNext) {
|
|
564
|
+
if (await exists(node_path.default.join(cwd, "src"))) return "src";
|
|
565
|
+
return ".";
|
|
566
|
+
}
|
|
563
567
|
for (const candidate of [
|
|
564
568
|
"src",
|
|
565
569
|
"app",
|
|
@@ -1826,16 +1830,14 @@ const logInitSummary = ({ configDir, isNext, postcssMode, postcssDetection, conf
|
|
|
1826
1830
|
if (isNext) {
|
|
1827
1831
|
_clack_prompts.log.message("Next.js note:");
|
|
1828
1832
|
if (selectedStrategyId === "classname-only") {
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
_clack_prompts.log.message(`- Classname-only mode skips instrumentation. Import ${importStyles} in your app entry.`);
|
|
1833
|
+
_clack_prompts.log.message("- Classname-only mode skips instrumentation.");
|
|
1834
|
+
_clack_prompts.log.message("- Import Boss styles manually in your root layout (e.g. `import '../.bo$$/styles.css'`).");
|
|
1832
1835
|
} else {
|
|
1833
1836
|
_clack_prompts.log.message("- Updated instrumentation files with Boss CSS imports.");
|
|
1834
1837
|
_clack_prompts.log.message("Boss PostCSS auto-disables dirDependencies when a Turbopack env flag is set.");
|
|
1835
1838
|
if (!cssAutoLoad) {
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
_clack_prompts.log.message(`- css.autoLoad is false. Import ${importStyles} in your app entry.`);
|
|
1839
|
+
_clack_prompts.log.message("- css.autoLoad is false.");
|
|
1840
|
+
_clack_prompts.log.message("- Import Boss styles manually in your root layout (e.g. `import '../.bo$$/styles.css'`).");
|
|
1839
1841
|
}
|
|
1840
1842
|
}
|
|
1841
1843
|
} else {
|
package/dist/cli/tasks/init.mjs
CHANGED
|
@@ -251,8 +251,8 @@ const init = async (config) => {
|
|
|
251
251
|
packageJson
|
|
252
252
|
});
|
|
253
253
|
const isStencil = framework.id === "stencil";
|
|
254
|
-
const cssAutoLoad = !isStencil;
|
|
255
|
-
const detectedSrcRoot = await detectSrcRoot(cwd);
|
|
254
|
+
const cssAutoLoad = !isStencil && !isNext;
|
|
255
|
+
const detectedSrcRoot = await detectSrcRoot(cwd, isNext);
|
|
256
256
|
const normalizedSrcRoot = normalizeRelativePath(await resolveTextValue({
|
|
257
257
|
label: "Where is your source root?",
|
|
258
258
|
value: flags.srcRoot,
|
|
@@ -555,7 +555,11 @@ const normalizePostcssMode = (value) => {
|
|
|
555
555
|
if (normalized === "auto" || normalized === "manual" || normalized === "skip") return normalized;
|
|
556
556
|
}
|
|
557
557
|
};
|
|
558
|
-
const detectSrcRoot = async (cwd) => {
|
|
558
|
+
const detectSrcRoot = async (cwd, isNext) => {
|
|
559
|
+
if (isNext) {
|
|
560
|
+
if (await exists(path.join(cwd, "src"))) return "src";
|
|
561
|
+
return ".";
|
|
562
|
+
}
|
|
559
563
|
for (const candidate of [
|
|
560
564
|
"src",
|
|
561
565
|
"app",
|
|
@@ -1822,16 +1826,14 @@ const logInitSummary = ({ configDir, isNext, postcssMode, postcssDetection, conf
|
|
|
1822
1826
|
if (isNext) {
|
|
1823
1827
|
log.message("Next.js note:");
|
|
1824
1828
|
if (selectedStrategyId === "classname-only") {
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
log.message(`- Classname-only mode skips instrumentation. Import ${importStyles} in your app entry.`);
|
|
1829
|
+
log.message("- Classname-only mode skips instrumentation.");
|
|
1830
|
+
log.message("- Import Boss styles manually in your root layout (e.g. `import '../.bo$$/styles.css'`).");
|
|
1828
1831
|
} else {
|
|
1829
1832
|
log.message("- Updated instrumentation files with Boss CSS imports.");
|
|
1830
1833
|
log.message("Boss PostCSS auto-disables dirDependencies when a Turbopack env flag is set.");
|
|
1831
1834
|
if (!cssAutoLoad) {
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
log.message(`- css.autoLoad is false. Import ${importStyles} in your app entry.`);
|
|
1835
|
+
log.message("- css.autoLoad is false.");
|
|
1836
|
+
log.message("- Import Boss styles manually in your root layout (e.g. `import '../.bo$$/styles.css'`).");
|
|
1835
1837
|
}
|
|
1836
1838
|
}
|
|
1837
1839
|
} else {
|