Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: minor fixes in build workflow and package alignment #2672

Merged
merged 1 commit into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
58 changes: 23 additions & 35 deletions .storybook/project.json
Expand Up @@ -4,7 +4,8 @@
"tools": [
"{projectRoot}/assets",
"{projectRoot}/decorators",
"{projectRoot}/*.{js,html}"
"{projectRoot}/guides",
"{projectRoot}/*.{js,html,mdx}"
]
},
"targets": {
Expand All @@ -15,29 +16,30 @@
],
"executor": "nx:run-commands",
"options": {
"cwd": "{projectRoot}",
"commands": [
"rimraf {projectRoot}/storybook-static",
"test -d {projectRoot}/storybook-static && echo \"Error: storybook-static directory could not be removed\" && exit 1 || exit 0"
"rimraf storybook-static",
"test -d storybook-static && echo \"Error: storybook-static directory could not be removed\" && exit 1 || exit 0"
],
"parallel": false
},
"configurations": {
"docs": {
"inputs": [
"{workspaceRoot}/dist/preview",
{ "externalDependencies": ["rimraf"] }
],
"cwd": "{workspaceRoot}",
"commands": [
"rimraf dist/preview",
"test -d dist/preview && echo \"Error: dist/preview directory could not be removed\" && exit 1 || exit 0"
]
}
}
},
"build": {
"dependsOn": [
"^build",
{
"target": "build",
"projects": "ui-icons"
}
],
"inputs": [
"{projectRoot}/assets",
"{projectRoot}/decorators",
"{projectRoot}/*.js",
"{projectRoot}/*.html",
"{workspaceRoot}/components/*/dist",
{ "externalDependencies": ["storybook"] }
],
"dependsOn": ["clean", "^build"],
"inputs": ["tools", { "externalDependencies": ["storybook"] }],
"outputs": ["{projectRoot}/storybook-static"],
"executor": "nx:run-commands",
"options": {
Expand All @@ -60,19 +62,9 @@
},
"start": {
"cache": true,
"dependsOn": [
"^build",
{
"target": "build",
"projects": "ui-icons"
}
],
"dependsOn": ["^build"],
"inputs": [
"{projectRoot}/assets",
"{projectRoot}/decorators",
"{projectRoot}/*.js",
"{projectRoot}/*.html",
"{workspaceRoot}/components/*/dist",
"tools",
{ "externalDependencies": ["storybook"] },
{ "env": "WATCH_MODE" }
],
Expand All @@ -85,11 +77,7 @@
"test": {
"cache": true,
"inputs": [
"{projectRoot}/assets",
"{projectRoot}/decorators",
"{projectRoot}/*.js",
"{projectRoot}/*.html",
"{workspaceRoot}/components/*/dist",
"tools",
{ "externalDependencies": ["chromatic", "storybook"] },
{ "env": "CHROMATIC_PROJECT_TOKEN" }
],
Expand Down
3 changes: 1 addition & 2 deletions nx.json
Expand Up @@ -53,8 +53,7 @@
"cache": true,
"dependsOn": [
"^build",
"clean",
{ "target": "build", "projects": "tokens" }
"clean"
],
"inputs": [
"core",
Expand Down
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -13,12 +13,12 @@
"url": "https://github.com/adobe/spectrum-css/issues"
},
"scripts": {
"build": "yarn builder tag:component",
"build": "yarn builder tag:component,ui-icons",
"build:preview": "nx build storybook",
"build:site": "nx clean docs && nx build docs && nx run storybook:build:docs",
"builder": "nx run-many --target build --projects",
"changeset": "changeset",
"ci": "cross-env NODE_ENV=production yarn builder tag:component,ui-icons --skip-nx-cache",
"ci": "cross-env NODE_ENV=production yarn build --skip-nx-cache",
"ci:storybook": "cross-env NODE_ENV=production nx run storybook:build:ci --skip-nx-cache",
"clean": "yarn cleaner tag:component",
"clean:docs": "rimraf dist",
Expand Down
2 changes: 1 addition & 1 deletion site/package.json
Expand Up @@ -19,7 +19,7 @@
"@adobe/focus-ring-polyfill": "^0.1.5",
"@adobe/spectrum-css-workflow-icons": "^1.5.4",
"@spectrum-css/tokens": "^14.0.0",
"@spectrum-css/ui-icons": "^1.1.1",
"@spectrum-css/ui-icons": "^1.1.2",
"browser-sync": "^3.0.2",
"colors": "^1.4.0",
"dependency-solver": "^1.0.6",
Expand Down
4 changes: 0 additions & 4 deletions site/project.json
Expand Up @@ -33,10 +33,6 @@
"target": "build",
"projects": "tag:component"
},
{
"target": "build",
"projects": "ui-icons"
},
"clean"
],
"inputs": ["core", "tools"],
Expand Down
4 changes: 2 additions & 2 deletions yarn.lock
Expand Up @@ -5620,7 +5620,7 @@ __metadata:
languageName: unknown
linkType: soft

"@spectrum-css/ui-icons@npm:^1.1.1, @spectrum-css/ui-icons@npm:^1.1.2, @spectrum-css/ui-icons@workspace:ui-icons":
"@spectrum-css/ui-icons@npm:^1.1.2, @spectrum-css/ui-icons@workspace:ui-icons":
version: 0.0.0-use.local
resolution: "@spectrum-css/ui-icons@workspace:ui-icons"
dependencies:
Expand Down Expand Up @@ -5656,7 +5656,7 @@ __metadata:
"@adobe/focus-ring-polyfill": "npm:^0.1.5"
"@adobe/spectrum-css-workflow-icons": "npm:^1.5.4"
"@spectrum-css/tokens": "npm:^14.0.0"
"@spectrum-css/ui-icons": "npm:^1.1.1"
"@spectrum-css/ui-icons": "npm:^1.1.2"
browser-sync: "npm:^3.0.2"
colors: "npm:^1.4.0"
dependency-solver: "npm:^1.0.6"
Expand Down