Skip to content

chore: script clean-up for packages and tokens[swc-808] #5419

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

Open
wants to merge 1 commit into
base: CSS-Cutoff
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ jobs:
- downstream
- run:
name: Generate Custom Elements Manifest
command: yarn docs:analyze
command: yarn analyze:docs
- run:
name: Move CEM to Storybook directory
command: cp projects/documentation/custom-elements.json storybook/
Expand All @@ -251,7 +251,7 @@ jobs:
- downstream
- run:
name: Generate Custom Elements Manifest
command: yarn docs:analyze
command: yarn analyze:docs
- run:
name: Move CEM to Storybook directory
command: cp projects/documentation/custom-elements.json storybook/
Expand Down
6 changes: 1 addition & 5 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
cem-react-wrapper.config.js @jianliao
scripts/cem-plugin-react-wrappers.js @jianliao
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can loop in Jian if needed but we can also code review these too.

scripts/generate-icon-react-wrapper.js @jianliao
tasks/build-react.js @jianliao
* @adobe/swc-maintainers
* @adobe/swc-maintainers
2 changes: 1 addition & 1 deletion .github/workflows/chromatic-vrt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
uses: ./.github/actions/setup-job

- name: Generate Custom Elements Manifest
run: yarn docs:analyze
run: yarn analyze:docs

- name: Move CEM to Storybook directory
run: cp projects/documentation/custom-elements.json storybook/
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
uses: ./.github/actions/setup-job

- name: Generate Custom Elements Manifest
run: yarn docs:analyze
run: yarn analyze:docs

- name: Move CEM to Storybook directory
run: cp projects/documentation/custom-elements.json storybook/
Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ custom-elements.json
packages/*/src/**/*.css.js
packages/*/custom-elements.json
packages/**/*.js
packages/**/spectrum-vars.json
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a legacy asset from the vars and expressvars days. Might be worth looking into copying over the metadata.json functionality from CSS though.

packages/**/*.js.map
packages/**/*.d.ts
packages/**/*.test-vrt.ts
Expand All @@ -50,7 +49,6 @@ projects/**/*.d.ts

tools/*/src/**/*.css.js
tools/*/custom-elements.json
tools/**/spectrum-vars.json
tools/**/*.js
tools/**/*.js.map
tools/**/*.d.ts
Expand Down
1 change: 0 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"files.exclude": {
"**/*.css.ts": { "when": "$(basename)" },
"packages/*/src/spectrum-vars.json": true,
"packages/**/*.js.map": true,
"packages/**/*.js": { "when": "$(basename).ts" },
"packages/**/*.dev.js": { "when": "$(basename).js" },
Expand Down
106 changes: 0 additions & 106 deletions INVENTORY.md

This file was deleted.

38 changes: 18 additions & 20 deletions README.md
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you for this heading clean up!

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Spectrum Web Components is a future-looking project to develop Adobe Spectrum de

To this end, Spectrum Web Components only targets _modern_, evergreen browsers that fully implement the Custom Elements V1 specification, e.g. Chrome, Firefox, Safari. Polyfills will be avoided as much as possible but documented if necessary.

# Requirements
## Requirements

- NodeJS >= 20.0.0
- Typescript
Expand All @@ -17,9 +17,9 @@ To this end, Spectrum Web Components only targets _modern_, evergreen browsers t
- We support all viewport sizes across supported desktop browsers.
- While our components are designed to be responsive and mobile-friendly, we do not yet fully support mobile browsers due to limited testing in mobile hardware. We advise testing updates on mobile devices before updating and are happy to address any reported issues.

# Getting started
## Getting started

```bash
```sh
git clone https://github.com/adobe/spectrum-web-components.git
cd spectrum-web-components
yarn
Expand All @@ -33,8 +33,8 @@ Typical development will involve running `yarn storybook`, `yarn test`, and `yar

Creating a new component from the command line can be done by running the following:

```bash
$ yarn new-package
```sh
yarn new-package
```

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.
Expand All @@ -49,35 +49,35 @@ You can find this information in the [Spectrum CSS GitHub project](https://githu

For additional information, please see the [generating components documentation](https://opensource.adobe.com/spectrum-web-components/guides/generating-components) and capturing the value of the package name: `"name": "@spectrum-css/accordion"`. In this example, that name is `accordion`. _Note_ that the project scope `@spectrum-css` is stripped out of the response.

# Storybook
## Storybook

Testing & reviewing changes can be done using the Storybook instance. Running `yarn storybook` will spin up a local instance of Storybook, triggering the browser to open at completion. From there you can make changes to your code and the browser will automatically refresh.

You can run [Storybook](https://storybook.js.org) through the command:

```bash
```sh
yarn storybook
```

By default, the resulting site will be available at [http://localhost:8000](http://localhost:8000).

# Documentation
## Documentation

The Spectrum Web Components documentation site is available via the following command:

```bash
```sh
yarn docs:start
```

By default, the resulting site will be available at [http://localhost:8080](http://localhost:8080).

In the case that you'd like to serve and test a static build of the documentation from the root directory (`localhost` or otherwise), use:

```bash
```sh
yarn docs:build
```

# Updating Spectrum CSS
## Updating Spectrum CSS

There are two mechanisms for broadly updating SWC's Spectrum CSS dependencies:

Expand All @@ -87,14 +87,12 @@ There are two mechanisms for broadly updating SWC's Spectrum CSS dependencies:
We aim to keep Spectrum CSS as current as possible, to track the Spectrum design system closely.
The `:nonbreaking` variant lets us release patch updates quickly in cases where more work is required to be compatible with 'latest.'

# Advanced development
## Advanced development

There are several commands that can be useful in specific scenarios:

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

## Linting
Expand All @@ -105,15 +103,15 @@ The project will be linted on a pre-commit hook, but you can also run the lint s

There are downstream issues that can arise from multiple packages in this mono-repo using dependencies with mismatched version strings. By default, changesets will bump version numbers of internal dependencies when the various packages are published and the depended version is pointing to the latest release, which can help to mitigate this issue. Running `yarn lint:versions` will check that all version strings for each dependency match across the repo.

`yarn list:versions --fix` will modify the `package.json` files, updating all dependencies to the latest version available in the library _a potentially dangerous operation_. If this is what you want to do when `yarn lint:versions` discovers mismatched versions, this step can greatly reduce the amount of work to achieve matching version numbers.
`yarn list:versions --fix` will modify the `package.json` files, updating all dependencies to the latest version available in the library - _a potentially dangerous operation_. If this is what you want to do when `yarn lint:versions` discovers mismatched versions, this step can greatly reduce the amount of work to achieve matching version numbers.

## Testing

### Unit tests

Unit tests are run with [Web Test Runner](https://modern-web.dev/docs/test-runner/overview/) in Playwright using the Chai, Mocha and Sinon helper libraries. These tests can be executed with:

```
```sh
yarn test
```

Expand All @@ -127,7 +125,7 @@ Visual regressions are tracked via screenshot testing powered by [`@web/test-run

To create a local baseline for comparing your changes to later in the development cycle, use the following:

```bash
```sh
yarn test:visual:clean # start with a clean slate
# yarn test:visual:clean:baseline # removes only baseline images
# yarn test:visual:clean:current # removes only images updated in the most recent test pass
Expand Down Expand Up @@ -203,7 +201,7 @@ For a list of component waiting to be implemented, visit our [`missing component

The build process compiles `.css` files using PostCSS and wraps them in the `lit-html` `css` template tag and writes out a `.css.ts` file for easy import into TypeScript files. This file should not be edited, and is ignored by `.gitignore`, but you may also wish to hide the files in your IDE.

# Contributing
## Contributing

We'd be very grateful if you contributed to the project! Check out our [contribution guidelines](CONTRIBUTING.md) for more information.

Expand Down
Loading
Loading