Skip to content

Commit

Permalink
chore: minor fixes in build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
castastrophe committed May 7, 2024
1 parent c5eb5e6 commit 64b56e2
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 46 deletions.
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 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 @@ -5619,7 +5619,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 @@ -5655,7 +5655,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

0 comments on commit 64b56e2

Please sign in to comment.