Skip to content

Commit 1045ca1

Browse files
committed
chore: script clean-up for packages and tokens[swc-808]
1 parent 8cbaade commit 1045ca1

30 files changed

+204
-2572
lines changed

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ custom-elements.json
3131
packages/*/src/**/*.css.js
3232
packages/*/custom-elements.json
3333
packages/**/*.js
34-
packages/**/spectrum-vars.json
3534
packages/**/*.js.map
3635
packages/**/*.d.ts
3736
packages/**/*.test-vrt.ts
@@ -50,7 +49,6 @@ projects/**/*.d.ts
5049

5150
tools/*/src/**/*.css.js
5251
tools/*/custom-elements.json
53-
tools/**/spectrum-vars.json
5452
tools/**/*.js
5553
tools/**/*.js.map
5654
tools/**/*.d.ts

.vscode/settings.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"files.exclude": {
33
"**/*.css.ts": { "when": "$(basename)" },
4-
"packages/*/src/spectrum-vars.json": true,
54
"packages/**/*.js.map": true,
65
"packages/**/*.js": { "when": "$(basename).ts" },
76
"packages/**/*.dev.js": { "when": "$(basename).js" },

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Typical development will involve running `yarn storybook`, `yarn test`, and `yar
3434
Creating a new component from the command line can be done by running the following:
3535

3636
```bash
37-
$ yarn new-package
37+
yarn new-package
3838
```
3939

4040
This will scaffold your component's required architecture by prompting you for 2 data points - the desired name for your package and the name of the Spectrum CSS asset from which you will be building.
@@ -92,9 +92,7 @@ The `:nonbreaking` variant lets us release patch updates quickly in cases where
9292
There are several commands that can be useful in specific scenarios:
9393

9494
- `yarn build:clear-cache` to remove previously created artifacts of the `tsc build` process.
95-
- `yarn spectrum-vars` to ensure that theme files are up-to-date.
9695
- `yarn process-icons` to make sure that the most recent icons are included.
97-
- `yarn process-spectrum` to process the spectrum CSS style sources into the individual packages.
9896
- `yarn build` to make sure the available JS has been built from the current TS source.
9997

10098
## Linting

package.json

Lines changed: 1 addition & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
"changeset-publish": "yarn prepublishOnly && yarn changeset version && yarn install && yarn lint:versions --fix && yarn update-version && yarn changeset publish --no-git-tag && yarn push-to-remote && yarn create-git-tag && yarn postpublish",
2727
"update-version": "node ./tasks/update-version.js",
2828
"chromatic": "chromatic --build-script-name storybook:build # note that --project-token must be set in your env variables",
29-
"create-git-tag": "node --no-warnings tasks/create-git-tag.js",
3029
"custom-element-json": "node tasks/custom-element-json.js",
3130
"docs:analyze": "cem analyze --globs \"packages/**/*.ts\" --exclude \"**/*.d.ts\" --exclude \"**/stories/**\" --exclude \"**/icons/**\" --exclude \"**/elements/**\" --outdir projects/documentation --litelement",
3231
"docs:build": "yarn workspace documentation build",
@@ -50,7 +49,6 @@
5049
"lint:versions": "node ./scripts/lint-versions.js",
5150
"new-package": "cd projects/templates && plop",
5251
"postcustom-element-json": "node ./tasks/run-check-cem.js",
53-
"postdocs:analyze": "node ./scripts/add-custom-properties.js --src=\"projects/documentation/custom-elements.json\"",
5452
"postinstall": "husky || true && patch-package",
5553
"postpublish": "yarn prepublish:react && yarn publish:react && yarn postpublish:react",
5654
"postpublish:react": "git reset --hard HEAD^ && git prune && rimraf react",
@@ -65,7 +63,6 @@
6563
"pretest:bench": "yarn build:tests && test -f test/benchmark/cli.js ||:",
6664
"pretest:visual": "yarn build && yarn build",
6765
"process-icons": "wireit",
68-
"process-spectrum": "wireit",
6966
"publish:react": "yarn changeset publish --no-git-tag --tag snapshot --no-push",
7067
"push-to-remote": "git add . && git commit -m \"chore: release new versions #publish\" && git push",
7168
"start": "yarn storybook",
@@ -89,9 +86,6 @@
8986
"test:watch": "yarn test:watch:focus unit",
9087
"test:watch:flags:focus": "yarn build && run-p build:watch \"test:start --watch --group {1} --config web-test-runner.config.ci-chromium-flags.js\" --",
9188
"test:watch:focus": "yarn build && run-p build:watch \"test:start --watch --group {1}\" --",
92-
"update:spectrum-css": "node ./scripts/update-spectrum-css.js --latest || yarn update:spectrum-css:cleanup",
93-
"update:spectrum-css:cleanup": "yarn lint:packagejson && yarn --ignore-scripts && yarn process-spectrum",
94-
"update:spectrum-css:nonbreaking": "node ./scripts/update-spectrum-css.js || yarn update:spectrum-css:cleanup",
9589
"verify-build-artifacts": "node ./scripts/verify-build-artifacts.js",
9690
"vrt:preview": "yarn wds --config test/visual/wds-vrt.config.js",
9791
"vrt:quick-link": "yarn netlify deploy --alias=vrt --dir=projects/vrt-quick-link"
@@ -212,14 +206,10 @@
212206
},
213207
"build:css": {
214208
"command": "node ./tasks/build-css.js",
215-
"dependencies": [
216-
"process-spectrum"
217-
],
218209
"files": [
219210
"packages/**/*.css",
220211
"tools/**/*.css",
221-
"tasks/build-css.js",
222-
"tasks/css-tools.js"
212+
"tasks/build-css.js"
223213
],
224214
"output": [
225215
"packages/**/*.css.ts",
@@ -385,33 +375,6 @@
385375
"icons:workflow"
386376
]
387377
},
388-
"process-spectrum": {
389-
"command": "node ./scripts/spectrum-vars.js && node ./tasks/process-spectrum.js && node ./scripts/generate-tokens.js && yarn format:css",
390-
"files": [
391-
"tasks/process-spectrum.js",
392-
"packages/**/spectrum-config.js",
393-
"tools/**/spectrum-config.js",
394-
"node_modules/@spectrum-css/**/index-vars.css",
395-
"scripts/generate-tokens.js",
396-
"scripts/generate-tokens-wrapper.js",
397-
"node_modules/@spectrum-css/**/*.css",
398-
"scripts/spectrum-vars.js",
399-
"tools/styles/package.json",
400-
".prettierrc.yaml",
401-
".stylelintrc.json"
402-
],
403-
"output": [
404-
"packages/*/src/spectrum-*.css",
405-
"tools/*/src/spectrum-*.css",
406-
"tools/styles/*.css",
407-
"tools/styles/express/*.css",
408-
"!tools/styles/scale-*.css",
409-
"!tools/styles/theme-*.css",
410-
"!tools/styles/express/scale-*.css",
411-
"!tools/styles/express/theme-*.css"
412-
],
413-
"clean": false
414-
},
415378
"storybook": {
416379
"command": "storybook dev -p 8080 -c storybook",
417380
"service": true,

packages/icons-workflow/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,6 @@
6060
"case": "^1.6.1",
6161
"cheerio": "^1.0.0-rc.2",
6262
"fast-glob": "^3.2.12",
63-
"fs": "^0.0.1-security",
64-
"path": "^0.12.7",
6563
"prettier": "^3.0.0"
6664
},
6765
"types": "./src/index.d.ts",

projects/documentation/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,6 @@
222222
"../../tools/**/args.js",
223223
"../../tools/**/template.js",
224224
"scripts/gather-wcd-urls.js",
225-
"scripts/gather-spectrum-urls.js",
226225
"scripts/gather-storybook-urls.js",
227226
"scripts/copy-component-docs.js",
228227
"scripts/component-template-parts.js"

projects/documentation/scripts/copy-component-docs.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import {
2222
overviewDestinationTemplate,
2323
overviewPartialTemplate,
2424
} from './component-template-parts.js';
25-
import { gatherUrls } from './gather-spectrum-urls.js';
2625

2726
const __dirname = path.dirname(fileURLToPath(import.meta.url));
2827

@@ -291,7 +290,6 @@ export async function processREADME(mdPath) {
291290
}
292291

293292
async function main() {
294-
gatherUrls();
295293
fs.mkdirSync(componentDestinationPath, { recursive: true });
296294
fs.mkdirSync(toolDestinationPath, { recursive: true });
297295
fs.mkdirSync(partialPath, { recursive: true });

projects/documentation/scripts/gather-spectrum-urls.js

Lines changed: 0 additions & 76 deletions
This file was deleted.

projects/templates/plop-templates/spectrum-config.js.hbs

Lines changed: 0 additions & 25 deletions
This file was deleted.

renovate.json

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,5 @@
44
"timezone": "America/Los_Angeles",
55
"schedule": ["after 12pm on thursday"],
66
"semanticCommitScope": "",
7-
"labels": ["dependencies"],
8-
"packageRules": [
9-
{
10-
"matchPackageNames": ["@spectrum-css/*"],
11-
"labels": ["Spectrum CSS"]
12-
}
13-
]
7+
"labels": ["dependencies"]
148
}

scripts/add-custom-properties.js

Lines changed: 0 additions & 69 deletions
This file was deleted.

0 commit comments

Comments
 (0)