uswds-extended 3.14.4 → 3.14.6
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/README.md +1 -0
- package/compile/index.js +18 -6
- package/dist/css/uswds.css +1 -1
- package/dist/css/uswds.min.css +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
package/compile/index.js
CHANGED
|
@@ -59,6 +59,22 @@ const colors = {
|
|
|
59
59
|
SETTINGS
|
|
60
60
|
----------------------------------------
|
|
61
61
|
*/
|
|
62
|
+
|
|
63
|
+
function resolvePackagePath() {
|
|
64
|
+
// 1. Extended location (bundled packages) - PRIORITY
|
|
65
|
+
// Relative to: node_modules/uswds-extended/compile/index.js
|
|
66
|
+
const extendedPath = path.resolve(__dirname, "../packages");
|
|
67
|
+
|
|
68
|
+
// 2. Standard location (peer dependency)
|
|
69
|
+
const standardPath = "./node_modules/@uswds/uswds/packages";
|
|
70
|
+
|
|
71
|
+
if (fs.existsSync(extendedPath)) {
|
|
72
|
+
return extendedPath;
|
|
73
|
+
}
|
|
74
|
+
// Only fall back if bundled packages are missing
|
|
75
|
+
return standardPath;
|
|
76
|
+
}
|
|
77
|
+
|
|
62
78
|
let settings = {
|
|
63
79
|
version: 3,
|
|
64
80
|
compile: {
|
|
@@ -76,7 +92,7 @@ let settings = {
|
|
|
76
92
|
defaults: {
|
|
77
93
|
v3: {
|
|
78
94
|
uswds: "./node_modules/@uswds",
|
|
79
|
-
sass:
|
|
95
|
+
sass: resolvePackagePath(),
|
|
80
96
|
theme: "./node_modules/@uswds/uswds/dist/theme",
|
|
81
97
|
fonts: "./node_modules/@uswds/uswds/dist/fonts",
|
|
82
98
|
img: "./node_modules/@uswds/uswds/dist/img",
|
|
@@ -297,8 +313,6 @@ function buildSass() {
|
|
|
297
313
|
],
|
|
298
314
|
includes: [
|
|
299
315
|
paths.dist.theme,
|
|
300
|
-
getSrcFrom("uswds"),
|
|
301
|
-
`${getSrcFrom("sass")}/packages`.replace("//", "/"),
|
|
302
316
|
getSrcFrom("sass"),
|
|
303
317
|
],
|
|
304
318
|
};
|
|
@@ -309,7 +323,7 @@ function buildSass() {
|
|
|
309
323
|
.pipe(
|
|
310
324
|
sass({
|
|
311
325
|
outputStyle: "compressed",
|
|
312
|
-
|
|
326
|
+
loadPaths: buildSettings.includes,
|
|
313
327
|
quietDeps: !settings.compile.sassDeprecationWarnings,
|
|
314
328
|
}).on("error", handleError)
|
|
315
329
|
)
|
|
@@ -336,8 +350,6 @@ async function buildSassExtended() {
|
|
|
336
350
|
const buildSettings = {
|
|
337
351
|
includes: [
|
|
338
352
|
paths.dist.theme,
|
|
339
|
-
getSrcFrom("uswds"),
|
|
340
|
-
`${getSrcFrom("sass")}/packages`.replace("//", "/"),
|
|
341
353
|
getSrcFrom("sass"),
|
|
342
354
|
],
|
|
343
355
|
};
|
package/dist/css/uswds.css
CHANGED