Skip to content

Commit d3b5702

Browse files
authored
chore: remove build requirement for constraints (#4222)
1 parent 82b5687 commit d3b5702

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

components/actionmenu/package.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,15 @@
1414
"url": "https://github.com/adobe/spectrum-css/issues"
1515
},
1616
"exports": {
17+
".": "./dist/index.css",
1718
"./*.md": "./*.md",
1819
"./package.json": "./package.json",
20+
"./dist/*": "./dist/*",
21+
"./index.css": "./dist/index.css",
22+
"./metadata.json": "./dist/metadata.json",
1923
"./stories/*": "./stories/*"
2024
},
21-
"main": "README.md",
25+
"main": "dist/index.css",
2226
"peerDependencies": {
2327
"@spectrum-css/actionbutton": ">=8.0.0-next.0",
2428
"@spectrum-css/icon": ">=10.0.0-next.0",
@@ -55,7 +59,9 @@
5559
"spectrum",
5660
"spectrum-css",
5761
"adobe",
58-
"adobe-spectrum"
62+
"adobe-spectrum",
63+
"component",
64+
"css"
5965
],
6066
"publishConfig": {
6167
"access": "public"

lint-staged.config.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
module.exports = {
22
"package.json": (files) => ([
3-
/** why build? constraints checks for compiled dist output to validate exports */
4-
"cross-env NODE_ENV=production yarn build",
53
"yarn constraints --fix",
64
"yarn install --refresh-lockfile",
75
`eslint --fix --cache --no-error-on-unmatched-pattern ${files.join(" ")}`,

yarn.config.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ module.exports = defineConfig({
127127
* @returns {void}
128128
*/
129129
function validateComponentPackageJson(workspace, folderName) {
130-
const hasDist = existsSync(join(workspace.cwd, "dist"));
130+
const hasDist = isComponent(workspace) && folderName !== "commons";
131131
const hasIndexCSS = existsSync(join(workspace.cwd, "index.css"));
132132
const hasOtherCSS = fg.sync(["*.css", "!index.css"], { cwd: workspace.cwd, onlyFiles: true }).length > 0;
133133

0 commit comments

Comments
 (0)