Skip to content

Commit

Permalink
refactor(ui-icons): s2 migration of assets
Browse files Browse the repository at this point in the history
  • Loading branch information
castastrophe committed Apr 30, 2024
1 parent df4e35a commit 3c41671
Show file tree
Hide file tree
Showing 255 changed files with 4,115 additions and 3,866 deletions.
2 changes: 2 additions & 0 deletions .env.example
Expand Up @@ -18,3 +18,5 @@ WATCH_MODE=true
NX_VERBOSE_LOGGING=false
NX_SKIP_NX_CACHE=false
NX_PERF_LOGGING=false

ARTIFACTORY_API_TOKEN=${ARTIFACTORY_API_TOKEN:-$ARTIFACTORY_API_KEY}
30 changes: 19 additions & 11 deletions .github/CONTRIBUTING.md
Expand Up @@ -33,19 +33,15 @@ you are good to go!
All submissions should come in the form of pull requests and need to be reviewed
by project committers.

**Important:** This project uses node >= 20 and yarn 4.1.1.

Start by [forking](https://help.github.com/articles/fork-a-repo/) the repo, then [clone](https://help.github.com/articles/cloning-a-repository/) your fork:

```shell
git clone git@github.com:yourusername/spectrum-css.git
```

Set up a branch for your feature or bug fix, push it to your fork, and set up a remote for the upstream repo:

```shell
git checkout -b feat-my-awesome-new-feature
git push -u origin feat-my-awesome-new-feature
git remote add upstream git@github.com:adobe/spectrum-css.git
```
### Setup

To ensure your Node environment is always aligned with the project, we strongly recommend using [nvm](https://github.com/nvm-sh/nvm?tab=readme-ov-file#installing-and-updating). Once you have nvm installed, you can run:

Expand All @@ -55,10 +51,16 @@ nvm use

This will ensure the correct version of node is installed and used for the project. You always want to run nvm use when you first clone the project and whenever you switch branches.

Install [yarn](https://yarnpkg.com/en/docs/install):
If you have not already done so, enable [corepack](https://yarnpkg.com/getting-started/install). Corepack is the tool that manages the package version for yarn.

```shell
brew install yarn || curl -o- -L https://yarnpkg.com/install.sh | bash
corepack enable
```

Before running an install, run the setup script; this script runs `nvm use` and exports any available authorization tokens.

```shell
bash ./tasks/setup.sh
```

Install dependencies:
Expand All @@ -67,7 +69,13 @@ Install dependencies:
yarn install
```

**Important:** Requires >= Node 18.8.1 and Yarn 1.22.0.
Set up a branch for your feature or bug fix, push it to your fork, and set up a remote for the upstream repo:

```shell
git checkout -b feat-my-awesome-new-feature
git push -u origin feat-my-awesome-new-feature
git remote add upstream git@github.com:adobe/spectrum-css.git
```

To generate a new component, run the generator:

Expand Down Expand Up @@ -103,7 +111,7 @@ git merge upstream/main
Run your updates through the formatter which will automatically fix any linting issues. Note that this is also handled on commit via lint-staged so running this manually is only necessary if you used a `--no-verify` flag on any of your commits.

```shell
nx affected --target format
yarn nx affected --target format
```

Review your changes and any possible conflicts and push to your fork:
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
@@ -1,12 +1,13 @@
dist
dist-site

!tokens/dist
!ui-icons/dist

# Recommended update re:https://docs.netlify.com/integrations/frameworks/eleventy/
**/node_modules/**

temp
.npmrc*
.nx
.env
.tmp
Expand Down
@@ -1,4 +1,4 @@
import { Template } from "@spectrum-css/button/stories/template";
import { Template } from "../../../components/button/stories/template";

export default {
title: "Foundations/Down state",
Expand Down
@@ -1,4 +1,4 @@
import { Template } from "@spectrum-css/checkbox/stories/template";
import { Template } from "../../../components/checkbox/stories/template";

export default {
title: "Foundations/Down state",
Expand Down
4 changes: 2 additions & 2 deletions .storybook/package.json
Expand Up @@ -21,8 +21,8 @@
},
"dependencies": {
"@adobe/spectrum-css-workflow-icons": "^1.5.4",
"@spectrum-css/tokens": "^14.0.0-next.6",
"@spectrum-css/ui-icons": "^1.1.2"
"@spectrum-css/tokens": "workspace:^",
"@spectrum-css/ui-icons": "workspace:^"
},
"devDependencies": {
"@babel/core": "^7.24.4",
Expand Down
16 changes: 2 additions & 14 deletions .storybook/project.json
Expand Up @@ -23,13 +23,7 @@
}
},
"build": {
"dependsOn": [
"^build",
{
"target": "build",
"projects": "ui-icons"
}
],
"dependsOn": ["^build"],
"inputs": [
"{projectRoot}/assets",
"{projectRoot}/decorators",
Expand Down Expand Up @@ -60,13 +54,7 @@
},
"start": {
"cache": true,
"dependsOn": [
"^build",
{
"target": "build",
"projects": "ui-icons"
}
],
"dependsOn": ["^build"],
"inputs": [
"{projectRoot}/assets",
"{projectRoot}/decorators",
Expand Down
30 changes: 28 additions & 2 deletions .yarnrc.yml
@@ -1,5 +1,31 @@
cacheFolder: ./.yarn/cache
nodeLinker: node-modules # todo: test pnp or pnpm mode
yarnPath: .yarn/releases/yarn-4.1.1.cjs
changesetIgnorePatterns:
- "**/*.stories.{js,ts}"
- "**/stories/*.{js,ts}"
defaultSemverRangePrefix: "^"
enableColors: true
enableTelemetry: false
injectEnvironmentFiles:
- ".env?"

nodeLinker: node-modules
## Default settings for yarn init packages
initScope: "spectrum-css"
initFields:
author: Adobe
license: "Apache-2.0"
bugs.url: "https://github.com/adobe/spectrum-css/issues"
main: "dist/index.css"
publishConfig.access: "public"

yarnPath: .yarn/releases/yarn-4.1.1.cjs
npmPublishAccess: "public"
npmPublishRegistry: "https://npm.pkg.github.com"
npmAlwaysAuth: false

npmScopes:
a4u:
npmRegistryServer: "https://artifactory.corp.adobe.com/artifactory/api/npm/npm-a4u-release/"
npmAlwaysAuth: true
npmAuthToken: ${ARTIFACTORY_API_TOKEN:-}
npmAuthIdent: ${NPM_EMAIL}:${NPM_AUTH}
68 changes: 33 additions & 35 deletions components/accordion/package.json
@@ -1,37 +1,35 @@
{
"name": "@spectrum-css/accordion",
"version": "5.0.0",
"description": "The Spectrum CSS accordion component",
"license": "Apache-2.0",
"author": "Adobe",
"homepage": "https://opensource.adobe.com/spectrum-css/accordion",
"repository": {
"type": "git",
"url": "https://github.com/adobe/spectrum-css.git",
"directory": "components/accordion"
},
"bugs": {
"url": "https://github.com/adobe/spectrum-css/issues"
},
"main": "dist/index.css",
"files": [
"dist/*",
"CHANGELOG.md",
"package.json",
"stories/template.js",
"metadata/mods.md"
],
"peerDependencies": {
"@spectrum-css/icon": ">=4",
"@spectrum-css/tokens": ">=14.0.0-next.3"
},
"keywords": [
"spectrum",
"css",
"design system",
"adobe"
],
"publishConfig": {
"access": "public"
}
"name": "@spectrum-css/accordion",
"version": "5.0.0",
"description": "The Spectrum CSS accordion component",
"license": "Apache-2.0",
"author": "Adobe",
"homepage": "https://opensource.adobe.com/spectrum-css/accordion",
"repository": {
"type": "git",
"url": "https://github.com/adobe/spectrum-css.git",
"directory": "components/accordion"
},
"bugs": {
"url": "https://github.com/adobe/spectrum-css/issues"
},
"main": "dist/index.css",
"files": [
"dist/*",
"metadata/mods.md",
"stories/template.js"
],
"peerDependencies": {
"@spectrum-css/icon": ">=4",
"@spectrum-css/tokens": ">=14.0.0-next.3"
},
"keywords": [
"adobe",
"css",
"design system",
"spectrum"
],
"publishConfig": {
"access": "public"
}
}
74 changes: 36 additions & 38 deletions components/actionbar/package.json
@@ -1,40 +1,38 @@
{
"name": "@spectrum-css/actionbar",
"version": "8.0.0",
"description": "The Spectrum CSS actionbar component",
"license": "Apache-2.0",
"author": "Adobe",
"homepage": "https://opensource.adobe.com/spectrum-css/actionbar",
"repository": {
"type": "git",
"url": "https://github.com/adobe/spectrum-css.git",
"directory": "components/actionbar"
},
"bugs": {
"url": "https://github.com/adobe/spectrum-css/issues"
},
"main": "dist/index.css",
"files": [
"dist/*",
"CHANGELOG.md",
"package.json",
"stories/template.js",
"metadata/mods.md"
],
"peerDependencies": {
"@spectrum-css/actiongroup": ">=4",
"@spectrum-css/closebutton": ">=4",
"@spectrum-css/fieldlabel": ">=7",
"@spectrum-css/popover": ">=6",
"@spectrum-css/tokens": ">=14.0.0-next.3"
},
"keywords": [
"spectrum",
"css",
"design system",
"adobe"
],
"publishConfig": {
"access": "public"
}
"name": "@spectrum-css/actionbar",
"version": "8.0.0",
"description": "The Spectrum CSS actionbar component",
"license": "Apache-2.0",
"author": "Adobe",
"homepage": "https://opensource.adobe.com/spectrum-css/actionbar",
"repository": {
"type": "git",
"url": "https://github.com/adobe/spectrum-css.git",
"directory": "components/actionbar"
},
"bugs": {
"url": "https://github.com/adobe/spectrum-css/issues"
},
"main": "dist/index.css",
"files": [
"dist/*",
"metadata/mods.md",
"stories/template.js"
],
"peerDependencies": {
"@spectrum-css/actiongroup": ">=4",
"@spectrum-css/closebutton": ">=4",
"@spectrum-css/fieldlabel": ">=7",
"@spectrum-css/popover": ">=6",
"@spectrum-css/tokens": ">=14.0.0-next.3"
},
"keywords": [
"adobe",
"css",
"design system",
"spectrum"
],
"publishConfig": {
"access": "public"
}
}

0 comments on commit 3c41671

Please sign in to comment.