diff --git a/.moon/toolchain.yml b/.moon/toolchain.yml index 6d074b0b..5ea994b6 100644 --- a/.moon/toolchain.yml +++ b/.moon/toolchain.yml @@ -10,7 +10,7 @@ $schema: 'https://moonrepo.dev/schemas/toolchain.json' node: # The version to use. Must be a semantic version that includes major, minor, and patch. # We suggest using the latest active LTS version: https://nodejs.org/en/about/releases - version: '^20.0.0' + version: '20.0.0' # The package manager to use when managing dependencies. # Accepts "npm" (default), "pnpm", or "yarn". diff --git a/docs/ui/moon.yml b/docs/ui/moon.yml index 2ce8e29c..926dcc7f 100644 --- a/docs/ui/moon.yml +++ b/docs/ui/moon.yml @@ -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 diff --git a/docs/ui/package.json b/docs/ui/package.json index 26ebcc7f..072edc6b 100644 --- a/docs/ui/package.json +++ b/docs/ui/package.json @@ -5,49 +5,6 @@ "description": "Demonstration UI for Leonardo", "repository": "git@github.com:adobe/leonardo.git", "author": "Nate Baldwin ", - "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" } } diff --git a/package.json b/package.json index 21d1a73c..49f70b3b 100644 --- a/package.json +++ b/package.json @@ -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": "pnpm@8.15.4" } diff --git a/packages/contrast-colors/moon.yml b/packages/contrast-colors/moon.yml index 6161a9cc..6503ba8d 100644 --- a/packages/contrast-colors/moon.yml +++ b/packages/contrast-colors/moon.yml @@ -1,4 +1,6 @@ $schema: 'https://moonrepo.dev/schemas/project.json' +type: library + fileGroups: sources: - 'lib/**/*' @@ -8,7 +10,6 @@ fileGroups: tasks: test: command: - - npx - ava inputs: - 'tasks/**/*' diff --git a/packages/contrast-colors/package.json b/packages/contrast-colors/package.json index 3c74fbe6..5070242e 100644 --- a/packages/contrast-colors/package.json +++ b/packages/contrast-colors/package.json @@ -11,10 +11,6 @@ "default": "./index.js" } }, - "scripts": { - "dev": "pnpm ava --watch", - "test": "pnpm ava" - }, "author": "Nate Baldwin ", "license": "Apache-2.0", "dependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 311d9728..0aaa382a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -18,8 +18,8 @@ importers: specifier: ^18.4.3 version: 18.4.3 '@moonrepo/cli': - specifier: ^1.18.1 - version: 1.18.1 + specifier: ^1.22.4 + version: 1.22.4 '@parcel/packager-raw-url': specifier: 2.11.0 version: 2.11.0(@parcel/core@2.11.0) @@ -32,27 +32,15 @@ importers: ava: specifier: ^6.0.1 version: 6.1.1 - buffer: - specifier: ^5.5.0||^6.0.0 - version: 5.7.1 husky: specifier: ^8.0.3 version: 8.0.3 lint-staged: specifier: ^15.2.0 version: 15.2.0 - path-browserify: - specifier: ^1.0.0 - version: 1.0.1 prettier: specifier: ^3.1.1 version: 3.1.1 - process: - specifier: ^0.11.10 - version: 0.11.10 - vm-browserify: - specifier: ^1.1.2 - version: 1.1.2 docs/ui: dependencies: @@ -258,12 +246,18 @@ importers: '@parcel/transformer-webmanifest': specifier: ^2.9.3 version: 2.11.0(@parcel/core@2.11.0) + buffer: + specifier: ^5.5.0||^6.0.0 + version: 5.7.1 gh-pages: specifier: ^3.2.3 version: 3.2.3 parcel: specifier: ^2.11.0 version: 2.11.0(typescript@5.3.3) + path-browserify: + specifier: ^1.0.0 + version: 1.0.1 posthtml: specifier: ^0.16.5 version: 0.16.5 @@ -276,9 +270,15 @@ importers: posthtml-modules: specifier: ^0.7.4 version: 0.7.4(posthtml@0.16.5) + process: + specifier: ^0.11.10 + version: 0.11.10 sass: specifier: ^1.23.6 version: 1.70.0 + vm-browserify: + specifier: ^1.1.2 + version: 1.1.2 packages/contrast-colors: dependencies: @@ -906,72 +906,72 @@ packages: json5: 2.2.3 dev: true - /@moonrepo/cli@1.18.1: - resolution: {integrity: sha512-Ueqd/TJ4cx29hoLyg5yMy91buet1jN7Mr9RzsfPxDEX5DX7La73CJ5KcovUHUGep3ezySgjYSrJ7YSQoKuJSdw==} + /@moonrepo/cli@1.22.4: + resolution: {integrity: sha512-/wsj6m1Gygsh8f6DdMK3IJRVdfI2i5ZIOtMyq+bistTkhmcU8zEB8RR9UV+zYRFC0rmvwgSdgvcpp/DCuGHmMw==} hasBin: true requiresBuild: true dependencies: detect-libc: 2.0.2 optionalDependencies: - '@moonrepo/core-linux-arm64-gnu': 1.18.5 - '@moonrepo/core-linux-arm64-musl': 1.18.5 - '@moonrepo/core-linux-x64-gnu': 1.18.5 - '@moonrepo/core-linux-x64-musl': 1.18.5 - '@moonrepo/core-macos-arm64': 1.18.5 - '@moonrepo/core-macos-x64': 1.18.5 - '@moonrepo/core-windows-x64-msvc': 1.18.5 + '@moonrepo/core-linux-arm64-gnu': 1.22.4 + '@moonrepo/core-linux-arm64-musl': 1.22.4 + '@moonrepo/core-linux-x64-gnu': 1.22.4 + '@moonrepo/core-linux-x64-musl': 1.22.4 + '@moonrepo/core-macos-arm64': 1.22.4 + '@moonrepo/core-macos-x64': 1.22.4 + '@moonrepo/core-windows-x64-msvc': 1.22.4 dev: true - /@moonrepo/core-linux-arm64-gnu@1.18.5: - resolution: {integrity: sha512-YPZNOB2plxnfVTnfrfqDpkYuvEZB+rXDF8hv7nA+JMxvhNURNHWSRqDmH9XB1isaagJzpH7s2i1xWT5eWfbCmg==} + /@moonrepo/core-linux-arm64-gnu@1.22.4: + resolution: {integrity: sha512-Avie5592Qv+Te+Fdmt+TWvFavQ0bmIsug0YwsEnFHcQRkkri5pLEnTAVpv1timsy0gP3K+qQuM6UpJhnGSRRaw==} cpu: [arm64] os: [linux] requiresBuild: true dev: true optional: true - /@moonrepo/core-linux-arm64-musl@1.18.5: - resolution: {integrity: sha512-5D17A+7Pt8PZzmnhQS0UOpQYMti6pGpkupCWNVhI4i92WOe6NViqRaCO8J1DqT6SVfCyGp2VwFCrL55Y+cYE0g==} + /@moonrepo/core-linux-arm64-musl@1.22.4: + resolution: {integrity: sha512-YVDD1nNhiOQkXX/hcaPESdJlTbEPhnB704KbpAfm78AT06Z9R2QtxNpMKBrGy9LwK7f/fDWkKYnIDlEpbvHbLQ==} cpu: [arm64] os: [linux] requiresBuild: true dev: true optional: true - /@moonrepo/core-linux-x64-gnu@1.18.5: - resolution: {integrity: sha512-EQHf7Z+4WwVAfeIu65Nr92hAcBOD6ZuQSAgYZJ62juQgsQmObBx6xtIyustGxjqp3t6dsbfBo69sMpNGhdh+fQ==} + /@moonrepo/core-linux-x64-gnu@1.22.4: + resolution: {integrity: sha512-iiRXQaugZKFyziFzUFITmSPY6WKZ92GLFAy72qt3N6m3PwxicMCtaXL7U8u5bi8211+qqnx6DToIIspSInGbcQ==} cpu: [x64] os: [linux] requiresBuild: true dev: true optional: true - /@moonrepo/core-linux-x64-musl@1.18.5: - resolution: {integrity: sha512-9H2TXp0e9ANkfbr3He82MJhctPRSo0e4n8rvymWATrxcYdqp4LHY8ClZbzBaZTD3CHwIsyiV6zCp+qE76BmhTw==} + /@moonrepo/core-linux-x64-musl@1.22.4: + resolution: {integrity: sha512-b0rUEAJ9agjoolhYR8eYM52cdyjCaniRMEC5BlJhORg1ew5Al83EBtuviusPYdth3lenvWzqqCRZxwy1cq94Dg==} cpu: [x64] os: [linux] requiresBuild: true dev: true optional: true - /@moonrepo/core-macos-arm64@1.18.5: - resolution: {integrity: sha512-wpWTg/s9e23FIN6NfnUqfGCBEb/treRVHg/1wWp4rn/FNyTsz9QwPgcLKTSyUoxb2vl5xwa3Aom9YcQiUUrpWg==} + /@moonrepo/core-macos-arm64@1.22.4: + resolution: {integrity: sha512-KRUjCv/Udq29EDI7J6jaI26MKjAV6Ij8J/vO8aBYLyGGnbaLwzm1PUmhE5GHwZknDE6ARVPelJRHZRPFxd9XGw==} cpu: [arm64] os: [darwin] requiresBuild: true dev: true optional: true - /@moonrepo/core-macos-x64@1.18.5: - resolution: {integrity: sha512-Bcdb1GhahjXWQzVbRRzNGnrXaQi3T/tTXPo8fP0+/ciod36jqcM+P41tQomoJ0Cb7fBE39xVRCf6uJWTIaTvlQ==} + /@moonrepo/core-macos-x64@1.22.4: + resolution: {integrity: sha512-QyJrjJ+LHsW14Y4PnERGbLSweKCrWo6IhdreSXwUXQEu9yxfC2WP1NwLqCphGqkwMsQHmviSQTh5RQJy8RdGAQ==} cpu: [x64] os: [darwin] requiresBuild: true dev: true optional: true - /@moonrepo/core-windows-x64-msvc@1.18.5: - resolution: {integrity: sha512-zr2c8EeQnoajEslL1GnxggkUInLio8ye2/+xn6Hs6ejjl0PXUCdPM1WShDqgiphMmoDK/MskWAlaXaqldD1bZA==} + /@moonrepo/core-windows-x64-msvc@1.22.4: + resolution: {integrity: sha512-T6hmBUPMQ3HXb/OHLRGz5758prsx4zrtlOcFIKcVegXqA3ZO2uLEkAKBcqA9bmhMjBoO9+wJ0T1VZleH7smDBQ==} cpu: [x64] os: [win32] requiresBuild: true @@ -5975,9 +5975,6 @@ packages: resolution: {integrity: sha512-H/RI1/DmuOkL8RuG/EpNPvtzrbF+7jA/R56ydEEm+lqFbYktKB4COR7JXdHkZXRgbSJyimrFB8d0r9+SaRnj0Q==} engines: {node: '>= 12.0.0'} hasBin: true - peerDependenciesMeta: - '@parcel/core': - optional: true dependencies: '@parcel/config-default': 2.11.0(@parcel/core@2.11.0)(typescript@5.3.3) '@parcel/core': 2.11.0