-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: moved scripts to moon tasks to make it easy to test in CI
- Loading branch information
Showing
7 changed files
with
184 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,108 @@ | ||
$schema: 'https://moonrepo.dev/schemas/project.json' | ||
# Copyright 2023 Adobe. All rights reserved. | ||
# This file is licensed to you under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. You may obtain a copy | ||
# of the License at http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
# Unless required by applicable law or agreed to in writing, software distributed under | ||
# the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS | ||
# OF ANY KIND, either express or implied. See the License for the specific language | ||
# governing permissions and limitations under the License. | ||
$schema: https://moonrepo.dev/schemas/project.json | ||
type: application | ||
fileGroups: | ||
sources: | ||
- 'src/**/*' | ||
output: | ||
- 'dist/**/*' | ||
dependsOn: | ||
- contrast-colors | ||
tasks: | ||
makeDistDir: | ||
command: 'mkdir -p dist' | ||
platform: system | ||
outputs: | ||
- dist | ||
dev: | ||
command: 'parcel src/index.html src/theme.html src/scales.html src/tools.html src/demo.html --no-hmr' | ||
platform: node | ||
inputs: | ||
- '@globs(sources)' | ||
local: true | ||
deps: | ||
- ~:makeDistDir | ||
- ~:copyWorkflowIcons | ||
- ~:copyUIIcons | ||
clean: | ||
command: 'rm -rf dist/*' | ||
platform: system | ||
deps: | ||
- ~:makeDistDir | ||
local: true | ||
copyWorkflowIcons: | ||
command: | ||
- cp | ||
- -r | ||
- node_modules/@adobe/spectrum-css-workflow-icons/dist/spectrum-icons.svg | ||
- dist/ | ||
platform: system | ||
deps: | ||
- ~:makeDistDir | ||
inputs: | ||
- node_modules/@adobe/spectrum-css-workflow-icons/dist/spectrum-icons.svg | ||
outputs: | ||
- dist/spectrum-icons.svg | ||
copyUIIcons: | ||
command: | ||
- cp | ||
- -r | ||
- node_modules/@spectrum-css/icon/dist/spectrum-css-icons.svg | ||
- dist/ | ||
platform: system | ||
deps: | ||
- ~:makeDistDir | ||
inputs: | ||
- node_modules/@spectrum-css/icon/dist/spectrum-css-icons.svg | ||
outputs: | ||
- dist/spectrum-css-icons.svg | ||
copyCNAME: | ||
command: | ||
- cp | ||
- -r | ||
- src/CNAME | ||
- dist/CNAME | ||
platform: system | ||
deps: | ||
- ~:makeDistDir | ||
inputs: | ||
- src/CNAME | ||
outputs: | ||
- dist/CNAME | ||
buildSite: | ||
command: | ||
- parcel | ||
- build | ||
- --no-optimize | ||
- src/index.html | ||
- src/scales.html | ||
- src/tools.html | ||
- src/theme.html | ||
- src/demo.html | ||
- --public-url | ||
- ./ | ||
platform: node | ||
deps: | ||
- ~:makeDistDir | ||
- ~:copyCNAME | ||
- ~:copyUIIcons | ||
- ~:copyWorkflowIcons | ||
inputs: | ||
- '@globs(sources)' | ||
outputs: | ||
- '@globs(output)' | ||
deploySite: | ||
command: 'gh-pages -d dist' | ||
platform: node | ||
local: true | ||
deps: | ||
- ~:clean | ||
- ~:buildSite |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,49 +5,6 @@ | |
"description": "Demonstration UI for Leonardo", | ||
"repository": "[email protected]:adobe/leonardo.git", | ||
"author": "Nate Baldwin <[email protected]>", | ||
"scripts": { | ||
"serve": "pnpm parcel src/index.html src/theme.html src/scales.html src/tools.html src/demo.html --no-hmr", | ||
"clean": "rm -rf dist/*", | ||
"dev": "pnpm copyIcons && pnpm serve", | ||
"copyIcons": "mkdir -p dist && pnpm copyWorkflowIcons && pnpm copyUIIcons", | ||
"copyWorkflowIcons": "cp -r node_modules/@adobe/spectrum-css-workflow-icons/dist/spectrum-icons.svg dist/", | ||
"copyUIIcons": "cp -r node_modules/@spectrum-css/icon/dist/spectrum-css-icons.svg dist/", | ||
"copyCNAME": "cp -r src/CNAME dist/CNAME", | ||
"postPublish": "pnpm deploySite", | ||
"buildSite": "pnpm parcel build --no-optimize src/index.html src/scales.html src/tools.html src/theme.html src/demo.html --public-url ./ && pnpm copyCNAME && pnpm copyIcons", | ||
"deploySite": "pnpm clean && pnpm buildSite && pnpm gh-pages -d dist" | ||
}, | ||
"keywords": [ | ||
"accessibility", | ||
"inclusive", | ||
"wcag", | ||
"contrast", | ||
"color", | ||
"contrast-ratio", | ||
"a11y", | ||
"luminance", | ||
"relative-luminance", | ||
"accessible", | ||
"a11ycolor", | ||
"colour", | ||
"adaptive", | ||
"adaptive-color", | ||
"color-generator", | ||
"contrast-generator", | ||
"color-contrast-generator" | ||
], | ||
"license": "Apache-2.0", | ||
"devDependencies": { | ||
"@parcel/transformer-webmanifest": "^2.9.3", | ||
"gh-pages": "^3.2.3", | ||
"highlight.js": "^11.2.0", | ||
"parcel": "^2.11.0", | ||
"posthtml": "^0.16.5", | ||
"posthtml-doctype": "^1.1.1", | ||
"posthtml-include": "^1.7.2", | ||
"posthtml-modules": "^0.7.4", | ||
"sass": "^1.23.6" | ||
}, | ||
"dependencies": { | ||
"@adobe/focus-ring-polyfill": "^0.1.5", | ||
"@adobe/leonardo-contrast-colors": "workspace:^", | ||
|
@@ -115,5 +72,40 @@ | |
"plotly.js-dist-min": "^2.5.1", | ||
"posthtml-parser": "^0.10.1", | ||
"simple-color-converter": "^2.1.13" | ||
}, | ||
"keywords": [ | ||
"accessibility", | ||
"inclusive", | ||
"wcag", | ||
"contrast", | ||
"color", | ||
"contrast-ratio", | ||
"a11y", | ||
"luminance", | ||
"relative-luminance", | ||
"accessible", | ||
"a11ycolor", | ||
"colour", | ||
"adaptive", | ||
"adaptive-color", | ||
"color-generator", | ||
"contrast-generator", | ||
"color-contrast-generator" | ||
], | ||
"license": "Apache-2.0", | ||
"devDependencies": { | ||
"@parcel/transformer-webmanifest": "^2.9.3", | ||
"buffer": "^5.5.0||^6.0.0", | ||
"gh-pages": "^3.2.3", | ||
"highlight.js": "^11.2.0", | ||
"parcel": "^2.11.0", | ||
"posthtml": "^0.16.5", | ||
"posthtml-doctype": "^1.1.1", | ||
"posthtml-include": "^1.7.2", | ||
"posthtml-modules": "^0.7.4", | ||
"path-browserify": "^1.0.0", | ||
"process": "^0.11.10", | ||
"sass": "^1.23.6", | ||
"vm-browserify": "^1.1.2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,21 +22,17 @@ | |
"@changesets/cli": "^2.27.1", | ||
"@commitlint/cli": "^18.4.3", | ||
"@commitlint/config-conventional": "^18.4.3", | ||
"@moonrepo/cli": "^1.18.1", | ||
"@moonrepo/cli": "^1.22.4", | ||
"@parcel/packager-raw-url": "2.11.0", | ||
"@parcel/transformer-sass": "2.11.0", | ||
"@parcel/transformer-webmanifest": "2.11.0", | ||
"ava": "^6.0.1", | ||
"buffer": "^5.5.0||^6.0.0", | ||
"husky": "^8.0.3", | ||
"lint-staged": "^15.2.0", | ||
"path-browserify": "^1.0.0", | ||
"prettier": "^3.1.1", | ||
"process": "^0.11.10", | ||
"vm-browserify": "^1.1.2" | ||
"prettier": "^3.1.1" | ||
}, | ||
"engines": { | ||
"node": "^20.0.0" | ||
"node": "20.0.0" | ||
}, | ||
"packageManager": "[email protected]" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,10 +11,6 @@ | |
"default": "./index.js" | ||
} | ||
}, | ||
"scripts": { | ||
"dev": "pnpm ava --watch", | ||
"test": "pnpm ava" | ||
}, | ||
"author": "Nate Baldwin <[email protected]>", | ||
"license": "Apache-2.0", | ||
"dependencies": { | ||
|
Oops, something went wrong.