diff --git a/.github/disabled-workflows/ci_next.yml b/.github/disabled-workflows/ci_next.yml index 914133c354a..20b3222204a 100644 --- a/.github/disabled-workflows/ci_next.yml +++ b/.github/disabled-workflows/ci_next.yml @@ -45,10 +45,10 @@ jobs: run: npm ci --no-audit --no-fund - name: Lint scripts - run: npm run eslint + run: npm run lint:scripts - name: Lint styles - run: npm run stylelint + run: npm run lint:styles - name: Build docs run: npm run docs diff --git a/.github/disabled-workflows/publish_npm_next.yml b/.github/disabled-workflows/publish_npm_next.yml index 74997e0b351..e5765b47fcd 100644 --- a/.github/disabled-workflows/publish_npm_next.yml +++ b/.github/disabled-workflows/publish_npm_next.yml @@ -70,7 +70,7 @@ jobs: - name: Build themes for dist run: | npm run sass:flat - npm run dist:swatches + npm run sass:swatches - name: Determine correct version to publish run: | diff --git a/.github/workflows/_compile-themes.yml b/.github/workflows/_compile-themes.yml index 563a61ca2c9..fab1e6bbf21 100644 --- a/.github/workflows/_compile-themes.yml +++ b/.github/workflows/_compile-themes.yml @@ -41,7 +41,7 @@ jobs: - name: Build swatch for a11y tests run: | - npm run dist:swatches + npm run sass:swatches:dist npx sass-build build --file packages/default/dist/default-ocean-blue-a11y.scss --outFile packages/default/dist/default-ocean-blue-a11y.css - name: Pack themes diff --git a/.github/workflows/_lint-scripts.yml b/.github/workflows/_lint-scripts.yml index d8f93bf2022..566e551804e 100644 --- a/.github/workflows/_lint-scripts.yml +++ b/.github/workflows/_lint-scripts.yml @@ -38,8 +38,8 @@ jobs: - name: Lint scripts run: | - npm run eslint + npm run lint:scripts - name: Check types run: | - npm run check-types + npm run typecheck -w packages/html diff --git a/.github/workflows/_lint-styles.yml b/.github/workflows/_lint-styles.yml index f8e68ab7fe4..0f006269bb4 100644 --- a/.github/workflows/_lint-styles.yml +++ b/.github/workflows/_lint-styles.yml @@ -42,7 +42,7 @@ jobs: - name: Lint styles run: | - npm run stylelint + npm run lint:styles - name: Ensure standalone build run: | diff --git a/.github/workflows/_render-test-pages.yml b/.github/workflows/_render-test-pages.yml index 88030f6374e..b044f4e94ea 100644 --- a/.github/workflows/_render-test-pages.yml +++ b/.github/workflows/_render-test-pages.yml @@ -114,7 +114,7 @@ jobs: env: HEADLESS: 'true' run: | - npm run render-test-pages + npm run test:render-test-pages - name: Pack test pages env: diff --git a/.github/workflows/_test-contrast.yml b/.github/workflows/_test-contrast.yml index 7d16dece812..22ba2a10043 100644 --- a/.github/workflows/_test-contrast.yml +++ b/.github/workflows/_test-contrast.yml @@ -73,7 +73,7 @@ jobs: run: find .tmp -name "*.tar" -type f -exec tar -xf {} \; - name: Test contrast (${{ matrix.chunk }} of ${{ matrix.max-chunks }}) - run: xvfb-run --auto-servernum --server-args="-screen 0, 1366x768x24" npm run test-contrast + run: xvfb-run --auto-servernum --server-args="-screen 0, 1366x768x24" npm run test:contrast env: MAX_CHUNKS: ${{ inputs.max-chunks }} CURRENT_CHUNK: ${{ matrix.chunk }} diff --git a/.github/workflows/ci_weekly.yml b/.github/workflows/ci_weekly.yml index 415f0eea354..5d49435d980 100644 --- a/.github/workflows/ci_weekly.yml +++ b/.github/workflows/ci_weekly.yml @@ -42,15 +42,15 @@ jobs: - name: Lint scripts run: | - npm run eslint + npm run lint:scripts - name: Check types run: | - npm run check-types + npm run typecheck -w packages/html - name: Build scripts run: | - npm run build:scripts + npm run build - name: Build test pages run: | @@ -58,7 +58,7 @@ jobs: - name: Lint styles run: | - npm run stylelint + npm run lint:styles - name: Ensure standalone build run: | diff --git a/.gitignore b/.gitignore index 268cac4d0ee..648e4a9edc7 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,7 @@ debug.log # Lock files # package-lock.json + +# NX +.nx/cache +.nx/workspace-data diff --git a/.husky/pre-commit b/.husky/pre-commit index 0100eae146e..1fb913e3d56 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1 +1 @@ -npm run lint-staged +npm run lint:staged diff --git a/README.md b/README.md index af0f5c1202b..52601816ad6 100644 --- a/README.md +++ b/README.md @@ -59,28 +59,10 @@ To guard against regressions and make pull request reviews easier, the CI build To generate screenshots for a specific theme: 1. Build the theme with `npm run sass` -1. Run `npm run create-screenshots `, substituting `` with a theme name. +1. Run `npm run test:create-screenshots `, substituting `` with a theme name. These steps will create new screenshots in `tests/_output`. Note that due to platform differences, all of the files will be marked as changed. -### Embedding Resources - -To avoid hosting-related issues in projects that use the themes, the resources are embedded by encoding them in the output CSS. For more details, refer to [this issue](https://github.com/telerik/kendo-theme-default/issues/41#issuecomment-258472183). - -To embed the latest resources: - -1. Run the `npm run embed-assets` task. The task generates a file with the same name which registers a Base64-encoded version in the `$data-uris` SCSS map. For example, the `foo.woff` font file will be encoded in a `foo.scss` file which can later be imported through `@import './font/foo';`. -1. Inline the encoded file inside the CSS through `map-get( $data-uris, 'foo.woff' )`. For example: - -```scss -$web-font-uri: map-get( $data-uris, 'WebComponentsIcons.woff' ); - -@font-face { - font-family: 'WebComponentsIcons'; - src: url( $web-font-uri ) format( "woff" ); -} -``` - ### Documenting Variables The available variables for customizing each theme are listed in the article on customization for each theme (`docs/customization.md`) The file is generated from the SCSS source files by running the `npm run docs` command. diff --git a/gulpfile.js b/gulpfile.js index 44deee147e3..f574bfe40f7 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -5,16 +5,12 @@ const { globSync } = require("glob"); const gulp = require("gulp"); const { sassFlatten } = require('@progress/kendo-theme-tasks/src/build/sass-flatten'); -const { embedFileBase64 } = require('@progress/kendo-theme-tasks/src/embedFile'); -const { getArg, getEnvArg } = require("@progress/kendo-theme-tasks/src/utils"); -const { createComponent } = require('@progress/kendo-theme-tasks/src/create'); - +const { getArg } = require("@progress/kendo-theme-tasks/src/utils"); // Settings const paths = { sass: { all: "packages/*/scss/**/*.scss", - assets: "packages/*/scss/**/*.{png,gif,ttf,woff}", themes: "packages/!(html)", theme: "scss/all.scss", swatches: "lib/swatches/*.json", @@ -147,28 +143,6 @@ function swatchJsonTransformer( json ) { } // #endregion - -// #region assets -gulp.task("assets", function() { - let files = globSync(paths.sass.assets); - let template = fs.readFileSync('lib/data-uri.template', 'utf8'); - - files.forEach( file => { - embedFileBase64({ - file: file, - output: { - filename: '[name].scss', - path: path.dirname( file ) - }, - template: template - }); - }); - - return Promise.resolve(); -}); -// #endregion - - // #region dist function distFlat() { let file = paths.sass.theme; @@ -194,22 +168,3 @@ function distSwatches() { } gulp.task("dist:swatches", distSwatches); // #endregion - -// #region Components - -/** - * A task that creates all the needed files for a new component. - * - * @example npm run create-component --name=accordion - * @example gulp create-component --name accordion - * - * @param {string} [name] - The name of the new component. - */ -gulp.task("create-component", function( done ) { - const name = getArg('--name') || getEnvArg('name') || null; - - createComponent({ name }); - done(); -}); - -// #endregion diff --git a/integrations/gulp-sass/package.json b/integrations/gulp-sass/package.json index 02526912f90..c2ee8ad87fb 100644 --- a/integrations/gulp-sass/package.json +++ b/integrations/gulp-sass/package.json @@ -1,4 +1,6 @@ { + "name": "integrations.gulp", + "version": "0.0.0", "scripts": { "build": "gulp compile" }, diff --git a/integrations/parcel/package.json b/integrations/parcel/package.json index 786bee425dc..616e253dffa 100644 --- a/integrations/parcel/package.json +++ b/integrations/parcel/package.json @@ -1,4 +1,6 @@ { + "name": "integrations.parcel", + "version": "0.0.0", "targets": { "default": { "source": "styles/default.scss" diff --git a/integrations/vite/package.json b/integrations/vite/package.json index 6383226eb61..628133e2a8c 100644 --- a/integrations/vite/package.json +++ b/integrations/vite/package.json @@ -1,4 +1,6 @@ { + "name": "integrations.vite", + "version": "0.0.0", "scripts": { "build": "vite build" }, diff --git a/integrations/webpack/package.json b/integrations/webpack/package.json index be0b6909dfa..4b39cb97396 100644 --- a/integrations/webpack/package.json +++ b/integrations/webpack/package.json @@ -1,4 +1,6 @@ { + "name": "integrations.webpack", + "version": "0.0.0", "scripts": { "build": "webpack" }, diff --git a/nx.json b/nx.json new file mode 100644 index 00000000000..a6e17a31c7d --- /dev/null +++ b/nx.json @@ -0,0 +1,44 @@ +{ + "$schema": "./node_modules/nx/schemas/nx-schema.json", + "defaultBase": "develop", + "workspaceLayout": { + "libsDir": "packages" + }, + "targetDefaults": { + "lint": { + "cache": true, + "executor": "nx:run-script", + "options": { + "script": "lint" + } + }, + "build": { + "cache": true + }, + "build:tests": { + "cache": true + }, + "sass": { + "cache": true, + "outputs": [ + "{projectRoot}/dist/**/*.css" + ] + }, + "sass:flat": { + "cache": true, + "outputs": [ + "{projectRoot}/dist/**/*.scss" + ] + }, + "sass:swatches": { + "cache": true, + "outputs": [ + "{projectRoot}/dist/**/*.css", + "{projectRoot}/dist/**/*.scss" + ] + }, + "docs": { + "cache": true + } + } +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index ac8b9a2eb56..5d41d328ba0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -37,6 +37,8 @@ "lint-staged": "^15.0.2", "node-sass": "^9.0.0", "nunjucks": "^3.2.3", + "nx": "^19.6.5", + "postcss-calc": "^9.0.0", "sass": "^1.63.6", "sass-build": "^1.1.6", "sass-embedded": "^1.63.6", @@ -3340,12 +3342,12 @@ } }, "node_modules/@nrwl/tao": { - "version": "19.5.7", - "resolved": "https://registry.npmjs.org/@nrwl/tao/-/tao-19.5.7.tgz", - "integrity": "sha512-c1rN6HY97+cEwoM5Q9412399Ac1rw7pI/3IS5iJSYkeI5TTGOobIpdCavJPZVcfqo4+wegXPA3F/OmulgbOUJA==", + "version": "19.6.5", + "resolved": "https://registry.npmjs.org/@nrwl/tao/-/tao-19.6.5.tgz", + "integrity": "sha512-EoUN/kE6CMWJ4ZZgcXAyiOzn8BSshG2DhC5PNwzLTAxRBus8FgXR/9c0XOzchaP46Kq3hoBGFgeyW434tfuv5w==", "dev": true, "dependencies": { - "nx": "19.5.7", + "nx": "19.6.5", "tslib": "^2.3.0" }, "bin": { @@ -3406,9 +3408,9 @@ } }, "node_modules/@nx/nx-darwin-arm64": { - "version": "19.5.7", - "resolved": "https://registry.npmjs.org/@nx/nx-darwin-arm64/-/nx-darwin-arm64-19.5.7.tgz", - "integrity": "sha512-5jFAZSfV8QVNoxOXayZw4/jNJbxMMctNOYZW8Qj4eU8Ti+OmhsLgouxz/9enCh5SDITriOMZ7IHZ9rhrlGQoig==", + "version": "19.6.5", + "resolved": "https://registry.npmjs.org/@nx/nx-darwin-arm64/-/nx-darwin-arm64-19.6.5.tgz", + "integrity": "sha512-sFU2k0BaklM17206F2E5C3866y0SICb0xyuPeD6D07a6hB4IstjIUkldUJJN70wEsJ5I3VP4yZ2oJcwnb1TTRQ==", "cpu": [ "arm64" ], @@ -3422,9 +3424,9 @@ } }, "node_modules/@nx/nx-darwin-x64": { - "version": "19.5.7", - "resolved": "https://registry.npmjs.org/@nx/nx-darwin-x64/-/nx-darwin-x64-19.5.7.tgz", - "integrity": "sha512-Ss+rF2+MQxyKrNnSYAeEGhtdE9hUHiTqyjJo4n1lvIWJ++TairOCtk5QRHrYLgAxE1XTf0OabcsDzegxv7yk3Q==", + "version": "19.6.5", + "resolved": "https://registry.npmjs.org/@nx/nx-darwin-x64/-/nx-darwin-x64-19.6.5.tgz", + "integrity": "sha512-EJmTbUPmlksgOap6xkQl89+zXwHpaAnZLsyLHUd7i00eVRa21FRhdKFnVsRxtwPDZp/YCG84IzMUye/IrwDFTQ==", "cpu": [ "x64" ], @@ -3438,9 +3440,9 @@ } }, "node_modules/@nx/nx-freebsd-x64": { - "version": "19.5.7", - "resolved": "https://registry.npmjs.org/@nx/nx-freebsd-x64/-/nx-freebsd-x64-19.5.7.tgz", - "integrity": "sha512-FMLXcUr3mw/v4LvmNqHMAXy2k+T/hp2YpdBUq9ExteMfRywFsnKNlm39n/quniFsgKthEMdvvzxSQppRKaVwIw==", + "version": "19.6.5", + "resolved": "https://registry.npmjs.org/@nx/nx-freebsd-x64/-/nx-freebsd-x64-19.6.5.tgz", + "integrity": "sha512-rR8NJCskoEmIbK96uxaevHm146WDTA0V3jId+X1joITqjj3E2DMm0U4r5v/OgI5+iqbhFV4S83LrMxP6gBLTsQ==", "cpu": [ "x64" ], @@ -3454,9 +3456,9 @@ } }, "node_modules/@nx/nx-linux-arm-gnueabihf": { - "version": "19.5.7", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm-gnueabihf/-/nx-linux-arm-gnueabihf-19.5.7.tgz", - "integrity": "sha512-LhJ342HutpR258lBLVTkXd6x2Uj4ZPJ6xKdfEm+FYQvG1byPr2L0TlNXcfSBkYtd7wRn0qg9eQZoCV/5+w415Q==", + "version": "19.6.5", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm-gnueabihf/-/nx-linux-arm-gnueabihf-19.6.5.tgz", + "integrity": "sha512-OUHFV6iLlJN7b7qFnqLfa0Yj/aoylEiRXcEhV1bhPm0Ryt1bOeGDmLYScVN8n5t+AVmrwwYHk+ajXMzCOLLeZw==", "cpu": [ "arm" ], @@ -3470,9 +3472,9 @@ } }, "node_modules/@nx/nx-linux-arm64-gnu": { - "version": "19.5.7", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-gnu/-/nx-linux-arm64-gnu-19.5.7.tgz", - "integrity": "sha512-Q6gN+VNLisg7mYPTXC5JuGCP/s9tLjJFclKdH6FoP5K1Hgy88KK1uUoivDIfI8xaEgyLqphD1AAqokiFWZNWsg==", + "version": "19.6.5", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-gnu/-/nx-linux-arm64-gnu-19.6.5.tgz", + "integrity": "sha512-CzbJfb24poaJgBHt4aKLaL8a7bO9KXCLls+TX0SZfmzA9AWX6YuiX9lhxwBv6cqsViXTDB4KnXndMDB/H0Gk4g==", "cpu": [ "arm64" ], @@ -3486,9 +3488,9 @@ } }, "node_modules/@nx/nx-linux-arm64-musl": { - "version": "19.5.7", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-musl/-/nx-linux-arm64-musl-19.5.7.tgz", - "integrity": "sha512-BsYNcYujNKb+uE7PrJp4PrX8a3G9oy+THaUr0t5+L435HjuZDBiK+tK9JzYGvM0bR5FOYm5K99I1DVD/Hv0snw==", + "version": "19.6.5", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-musl/-/nx-linux-arm64-musl-19.6.5.tgz", + "integrity": "sha512-MgidKilQ0KWxQbTnaqXGjASu7wtAC9q6zAwFNKFENkwJq3nThaQH6jQVlnINE4lL9NSgyyg0AS/ix31hiqAgvA==", "cpu": [ "arm64" ], @@ -3502,9 +3504,9 @@ } }, "node_modules/@nx/nx-linux-x64-gnu": { - "version": "19.5.7", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-gnu/-/nx-linux-x64-gnu-19.5.7.tgz", - "integrity": "sha512-ILaLU8b5lUokYVF3vxAVj62qFok1hexiNzBdLGJPI1OkPGELtLyb8RymI3939iJoNMk1DS3/6dqK7NHXvHX8Mw==", + "version": "19.6.5", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-gnu/-/nx-linux-x64-gnu-19.6.5.tgz", + "integrity": "sha512-rGDylAoslIlk5TDbEJ6YoQOYxxYP9gCpi6FLke2mFgXVzOmVlLKHfVsegIHYVMYYF26h3NJh0NLGGzGdoBjWgQ==", "cpu": [ "x64" ], @@ -3518,9 +3520,9 @@ } }, "node_modules/@nx/nx-linux-x64-musl": { - "version": "19.5.7", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-musl/-/nx-linux-x64-musl-19.5.7.tgz", - "integrity": "sha512-LfTnO4JZebLugioMk+GTptv3N38Wj2i2Pko0bdRZaKba+INGSlUgFqoRuO0KqZEmVIUGrxfkfqIN3HghVQ4D/Q==", + "version": "19.6.5", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-musl/-/nx-linux-x64-musl-19.6.5.tgz", + "integrity": "sha512-C/pNjDL/bDEcrDypgBo4r1AOiPTk8gWJwBsFE1QHIvg7//5WFSreqRj34rJu/GZ95eLYJH5tje1VW6z+atEGkQ==", "cpu": [ "x64" ], @@ -3534,9 +3536,9 @@ } }, "node_modules/@nx/nx-win32-arm64-msvc": { - "version": "19.5.7", - "resolved": "https://registry.npmjs.org/@nx/nx-win32-arm64-msvc/-/nx-win32-arm64-msvc-19.5.7.tgz", - "integrity": "sha512-cCTttdbf1AKuDU8j108SpIMWs53A/0mOVDPOPpa+oKkvBaI8ruZkxOceMjWZjWULd2gi1nS+5nJePpbrdQ8mkg==", + "version": "19.6.5", + "resolved": "https://registry.npmjs.org/@nx/nx-win32-arm64-msvc/-/nx-win32-arm64-msvc-19.6.5.tgz", + "integrity": "sha512-mMi8i16OFux17xed2iLPWwUdCbS1mYA9Ny/gnoNUCosmihmXX9wrzaGBkNAMsHA28huYQtPhGormsEs+zuiVFg==", "cpu": [ "arm64" ], @@ -3550,9 +3552,9 @@ } }, "node_modules/@nx/nx-win32-x64-msvc": { - "version": "19.5.7", - "resolved": "https://registry.npmjs.org/@nx/nx-win32-x64-msvc/-/nx-win32-x64-msvc-19.5.7.tgz", - "integrity": "sha512-EqSnjpq1PNR/C8/YkL+Gn79dDfQ+HwJM8VJOt4qoCOQ9gQZqNJphjW2hg0H8WxLYezMScx3fbL99mvJO7ab2Cw==", + "version": "19.6.5", + "resolved": "https://registry.npmjs.org/@nx/nx-win32-x64-msvc/-/nx-win32-x64-msvc-19.6.5.tgz", + "integrity": "sha512-jjhbDYNBkyz9Fg1jf0KZTrgdf/yx4v+k0ifukDIHZjva+jko0Ve5WzdkQ2K07M9ZxxYibDtTDqX9uX6+eFZtoA==", "cpu": [ "x64" ], @@ -3752,16 +3754,6 @@ "node": ">=14" } }, - "node_modules/@popperjs/core": { - "version": "2.11.8", - "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", - "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==", - "peer": true, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/popperjs" - } - }, "node_modules/@progress/dss": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@progress/dss/-/dss-1.0.1.tgz", @@ -5087,9 +5079,9 @@ "dev": true }, "node_modules/autoprefixer": { - "version": "10.4.14", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.14.tgz", - "integrity": "sha512-FQzyfOsTlwVzjHxKEqRIAdJx9niO6VCBCoEwax/VLSoQF29ggECcPuBqUMZ+u8jCZOPSy8b8/8KnuFbp0SaFZQ==", + "version": "10.4.20", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.20.tgz", + "integrity": "sha512-XY25y5xSv/wEoqzDyXXME4AFfkZI0P23z6Fs3YgymDnKJkCGOnkL0iTxCa85UTqaSgfcqyf3UA6+c7wUvx/16g==", "dev": true, "funding": [ { @@ -5099,15 +5091,19 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/autoprefixer" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ], "peer": true, "dependencies": { - "browserslist": "^4.21.5", - "caniuse-lite": "^1.0.30001464", - "fraction.js": "^4.2.0", + "browserslist": "^4.23.3", + "caniuse-lite": "^1.0.30001646", + "fraction.js": "^4.3.7", "normalize-range": "^0.1.2", - "picocolors": "^1.0.0", + "picocolors": "^1.0.1", "postcss-value-parser": "^4.2.0" }, "bin": { @@ -5419,9 +5415,9 @@ "dev": true }, "node_modules/browserslist": { - "version": "4.21.9", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.9.tgz", - "integrity": "sha512-M0MFoZzbUrRU4KNfCrDLnvyE7gub+peetoTid3TBIqtunaDJyXlwhakT+/VkvSXcfIzFfK/nkCs4nmyTmxdNSg==", + "version": "4.23.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.3.tgz", + "integrity": "sha512-btwCFJVjI4YWDNfau8RhZ+B1Q/VLoUITrm3RlP6y1tYGWIOa+InuYiRGXUBXo8nA1qKmHMyLB/iVQg5TT4eFoA==", "dev": true, "funding": [ { @@ -5439,10 +5435,10 @@ ], "peer": true, "dependencies": { - "caniuse-lite": "^1.0.30001503", - "electron-to-chromium": "^1.4.431", - "node-releases": "^2.0.12", - "update-browserslist-db": "^1.0.11" + "caniuse-lite": "^1.0.30001646", + "electron-to-chromium": "^1.5.4", + "node-releases": "^2.0.18", + "update-browserslist-db": "^1.1.0" }, "bin": { "browserslist": "cli.js" @@ -5719,9 +5715,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001628", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001628.tgz", - "integrity": "sha512-S3BnR4Kh26TBxbi5t5kpbcUlLJb9lhtDXISDPwOfI+JoC+ik0QksvkZtUVyikw3hjnkgkMPSJ8oIM9yMm9vflA==", + "version": "1.0.30001655", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001655.tgz", + "integrity": "sha512-jRGVy3iSGO5Uutn2owlb5gR6qsGngTw9ZTb4ali9f3glshcNmJ2noam4Mo9zia5P9Dk3jNNydy7vQjuE5dQmfg==", "dev": true, "funding": [ { @@ -7247,9 +7243,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.442", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.442.tgz", - "integrity": "sha512-RkrZF//Ya+0aJq2NM3OdisNh5ZodZq1rdXOS96G8DdDgpDKqKE81yTbbQ3F/4CKm1JBPsGu1Lp/akkna2xO06Q==", + "version": "1.5.13", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.13.tgz", + "integrity": "sha512-lbBcvtIJ4J6sS4tb5TLp1b4LyfCdMkwStzXPyAgVgTRAsep4bvrAGaBOP7ZJtQMNJpSQ9SqG4brWOroNaQtm7Q==", "dev": true, "peer": true }, @@ -7432,9 +7428,9 @@ } }, "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", "dev": true, "engines": { "node": ">=6" @@ -8403,9 +8399,9 @@ } }, "node_modules/fraction.js": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.2.0.tgz", - "integrity": "sha512-MhLuK+2gUcnZe8ZHlaaINnQLl0xRIGRfcGk2yl8xoQAfHrSsL3rYu6FCmBdkdbhc9EPlwyGHewaRsvwRMJtAlA==", + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.7.tgz", + "integrity": "sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==", "dev": true, "peer": true, "engines": { @@ -8413,7 +8409,7 @@ }, "funding": { "type": "patreon", - "url": "https://www.patreon.com/infusion" + "url": "https://github.com/sponsors/rawify" } }, "node_modules/front-matter": { @@ -13564,9 +13560,9 @@ "dev": true }, "node_modules/node-releases": { - "version": "2.0.12", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.12.tgz", - "integrity": "sha512-QzsYKWhXTWx8h1kIvqfnC++o0pEmpRQA/aenALsL2F4pqNVr7YzcdMlDij5WBnwftRbJCNJL/O7zdKaxKPHqgQ==", + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", + "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", "dev": true, "peer": true }, @@ -14393,18 +14389,18 @@ "dev": true }, "node_modules/nx": { - "version": "19.5.7", - "resolved": "https://registry.npmjs.org/nx/-/nx-19.5.7.tgz", - "integrity": "sha512-AUmGgE19NB4m/7oHYQVdzZHtclVevD8w0/nNzzjDJE823T8oeoNhmc9MfCLz+/2l2KOp+Wqm+8LiG9/xWpXk0g==", + "version": "19.6.5", + "resolved": "https://registry.npmjs.org/nx/-/nx-19.6.5.tgz", + "integrity": "sha512-igPYPsBF1BM1YxEiGDvaLOz0CWWoEvxzR7yQg3iULjGG9zKgDFNHHIHJwkyHsCBTtMhhkgeUl16PsTVgDuil3A==", "dev": true, "hasInstallScript": true, "dependencies": { "@napi-rs/wasm-runtime": "0.2.4", - "@nrwl/tao": "19.5.7", + "@nrwl/tao": "19.6.5", "@yarnpkg/lockfile": "^1.1.0", "@yarnpkg/parsers": "3.0.0-rc.46", "@zkochan/js-yaml": "0.0.7", - "axios": "^1.7.2", + "axios": "^1.7.4", "chalk": "^4.1.0", "cli-cursor": "3.1.0", "cli-spinners": "2.6.1", @@ -14440,16 +14436,16 @@ "nx-cloud": "bin/nx-cloud.js" }, "optionalDependencies": { - "@nx/nx-darwin-arm64": "19.5.7", - "@nx/nx-darwin-x64": "19.5.7", - "@nx/nx-freebsd-x64": "19.5.7", - "@nx/nx-linux-arm-gnueabihf": "19.5.7", - "@nx/nx-linux-arm64-gnu": "19.5.7", - "@nx/nx-linux-arm64-musl": "19.5.7", - "@nx/nx-linux-x64-gnu": "19.5.7", - "@nx/nx-linux-x64-musl": "19.5.7", - "@nx/nx-win32-arm64-msvc": "19.5.7", - "@nx/nx-win32-x64-msvc": "19.5.7" + "@nx/nx-darwin-arm64": "19.6.5", + "@nx/nx-darwin-x64": "19.6.5", + "@nx/nx-freebsd-x64": "19.6.5", + "@nx/nx-linux-arm-gnueabihf": "19.6.5", + "@nx/nx-linux-arm64-gnu": "19.6.5", + "@nx/nx-linux-arm64-musl": "19.6.5", + "@nx/nx-linux-x64-gnu": "19.6.5", + "@nx/nx-linux-x64-musl": "19.6.5", + "@nx/nx-win32-arm64-msvc": "19.6.5", + "@nx/nx-win32-x64-msvc": "19.6.5" }, "peerDependencies": { "@swc-node/register": "^1.8.0", @@ -15550,7 +15546,6 @@ "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-9.0.1.tgz", "integrity": "sha512-TipgjGyzP5QzEhsOZUaIkeO5mKeMFpebWzRogWG/ysonUlnHcq5aJe0jOjpfzUU8PeSaBQnrE8ehR0QA5vs8PQ==", "dev": true, - "peer": true, "dependencies": { "postcss-selector-parser": "^6.0.11", "postcss-value-parser": "^4.2.0" @@ -19559,9 +19554,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", - "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.0.tgz", + "integrity": "sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ==", "dev": true, "funding": [ { @@ -19579,8 +19574,8 @@ ], "peer": true, "dependencies": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" + "escalade": "^3.1.2", + "picocolors": "^1.0.1" }, "bin": { "update-browserslist-db": "cli.js" diff --git a/package.json b/package.json index e8a5c1d6f40..3d778c07ac9 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,9 @@ "stylelint-config-standard-scss": "^13.1.0", "stylelint-scss": "^6.5.0", "typescript": "^5.0.3", - "typescript-eslint": "^8.0.0" + "typescript-eslint": "^8.0.0", + "nx": "^19.6.5", + "postcss-calc": "^9.0.0" }, "peerDependencies": { "node-sass": "^9.0.0", @@ -53,31 +55,26 @@ "scripts": { "prepare": "husky", "start": "node ./scripts/start-dev-server.js", - "clean": "find . -name \"node_modules\" -type d -prune | xargs rm -rf", + "lint": "npm run lint:scripts && npm run lint:styles", + "lint:scripts": "eslint \"**/*.{js,jsx,ts,tsx,mjs}\"", + "lint:styles": "stylelint \"**/*.scss\"", + "lint:staged": "lint-staged --verbose", + "build": "nx run @progress/kendo-themes-html:build", + "build:tests": "nx run @progress/kendo-themes-html:build:tests", + "sass": "nx run-many -t sass", + "sass:flat": "nx run-many -t sass:flat", + "sass:swatches": "nx run-many -t sass:swatches", + "sass:swatches:dist": "nx run-many -t sass:swatches:dist", + "sass:standalone": "nx run-many -t sass:standalone", + "docs": "nx run-many -t docs", + "docs:check": "npm run docs -- git diff --exit-code -- docs/", + "test:render-test-pages": "node ./scripts/render-test-pages.mjs", + "test:contrast": "node ./scripts/test-contrast.mjs", + "test:create-screenshots": "./build/create-screenshots.sh", + "test:integrations": "npm run build --prefix integrations", + "clean": "nx reset && find . -name \"node_modules\" -type d -prune | xargs rm -rf", "clean:dist": "find ./packages -name \"dist\" -type d -prune -maxdepth 2 | xargs rm -rf", - "clean:tests": "node ./scripts/cleanup-test-results.js", - "dist:flat": "gulp dist:flat", - "dist:swatches": "gulp dist:swatches", - "sass": "npm run sass -ws --if-present", - "sass:flat": "npm run sass:flat -ws --if-present", - "sass:swatches": "npm run sass:swatches -ws --if-present", - "sass:standalone": "npm run sass:standalone -ws --if-present", - "build": "npm run sass && npm run build:scripts", - "build:scripts": "npm run build --prefix packages/html", - "build:tests": "npm run build:tests --prefix packages/html", - "eslint": "eslint", - "check-types": "npm run check-types --prefix packages/html", - "stylelint": "stylelint \"**/*.scss\"", - "lint": "npm run eslint && npm run stylelint", - "lint-staged": "lint-staged --verbose", - "docs": "npm run docs -ws --if-present", - "docs:check": "npm run docs -ws --if-present -- git diff --exit-code --quiet -- docs/", - "render-test-pages": "node ./scripts/render-test-pages.mjs", - "create-screenshots": "./build/create-screenshots.sh", - "embed-assets": "gulp assets", - "create-component": "gulp create-component", - "test-contrast": "node ./scripts/test-contrast.mjs", - "test:integrations": "npm run build --prefix integrations" + "clean:tests": "node ./scripts/cleanup-test-results.js" }, "engines": { "node": "^20" diff --git a/packages/bootstrap/package.json b/packages/bootstrap/package.json index a8e029a3f01..eca560bdde5 100644 --- a/packages/bootstrap/package.json +++ b/packages/bootstrap/package.json @@ -43,6 +43,7 @@ "sass:flat": "gulp dist:flat && sass-build -c sass-flat.config.js", "sass:standalone": "sass-build -c sass-standalone.config.js", "sass:swatches": "gulp dist:swatches && sass-build -c sass-swatches.config.js", + "sass:swatches:dist": "gulp dist:swatches", "docs": "node ../../scripts/sassdoc.js", "predocs": "npm run resolve-variables", "resolve-variables": "node ../../scripts/resolve-variables.js", diff --git a/packages/default/package.json b/packages/default/package.json index 32e07025e30..ddb4fd49b6b 100644 --- a/packages/default/package.json +++ b/packages/default/package.json @@ -42,6 +42,7 @@ "sass:flat": "gulp dist:flat && sass-build -c sass-flat.config.js", "sass:standalone": "sass-build -c sass-standalone.config.js", "sass:swatches": "gulp dist:swatches && sass-build -c sass-swatches.config.js", + "sass:swatches:dist": "gulp dist:swatches", "docs": "node ../../scripts/sassdoc.js", "predocs": "npm run resolve-variables", "resolve-variables": "node ../../scripts/resolve-variables.js", diff --git a/packages/fluent/package.json b/packages/fluent/package.json index ec861ce37a0..90dcb573631 100644 --- a/packages/fluent/package.json +++ b/packages/fluent/package.json @@ -43,6 +43,7 @@ "sass": "sass-build", "sass:standalone": "sass-build -c sass-standalone.config.js", "sass:swatches": "gulp dist:swatches && sass-build -c sass-swatches.config.js", + "sass:swatches:dist": "gulp dist:swatches", "docs": "node ../../scripts/sassdoc.js", "predocs": "npm run resolve-variables", "resolve-variables": "node ../../scripts/resolve-variables.js", diff --git a/packages/html/package.json b/packages/html/package.json index 0c4cb2e4ecc..be8e5227898 100644 --- a/packages/html/package.json +++ b/packages/html/package.json @@ -40,9 +40,9 @@ "scripts": { "start": "node ./scripts/start", "build": "node ./scripts/build.js && npm run typegen", - "typegen": "tsc --emitDeclarationOnly --declaration --declarationDir dist/types/", "build:tests": "node ./scripts/build-tests.js", - "check-types": "npx tsc --noEmit --emitDeclarationOnly false --project tsconfig.json ", + "typegen": "tsc --emitDeclarationOnly --declaration --declarationDir dist/types/", + "typecheck": "npx tsc --noEmit --emitDeclarationOnly false --project tsconfig.json ", "prepublishOnly": "npm run build" }, "dependencies": { diff --git a/packages/material/package.json b/packages/material/package.json index 5003267cebb..2ab0cbd3fe8 100644 --- a/packages/material/package.json +++ b/packages/material/package.json @@ -44,6 +44,7 @@ "sass:flat": "gulp dist:flat && sass-build -c sass-flat.config.js", "sass:standalone": "sass-build -c sass-standalone.config.js", "sass:swatches": "gulp dist:swatches && sass-build -c sass-swatches.config.js", + "sass:swatches:dist": "gulp dist:swatches", "docs": "node ../../scripts/sassdoc.js", "predocs": "npm run resolve-variables", "resolve-variables": "node ../../scripts/resolve-variables.js", diff --git a/packages/nouvelle/package.json b/packages/nouvelle/package.json index ea57c10c1b2..fa8403fb836 100644 --- a/packages/nouvelle/package.json +++ b/packages/nouvelle/package.json @@ -44,6 +44,7 @@ "sass:flat": "gulp dist:flat && sass-build -c sass-flat.config.js", "sass:standalone": "sass-build -c sass-standalone.config.js", "sass:swatches": "gulp dist:swatches && sass-build -c sass-swatches.config.js", + "sass:swatches:dist": "gulp dist:swatches", "docs": "node ../../scripts/sassdoc.js", "predocs": "npm run resolve-variables", "resolve-variables": "node ../../scripts/resolve-variables.js", diff --git a/scripts/watch-theme.js b/scripts/watch-theme.js index 4a6e3115de0..2244f2b9b79 100644 --- a/scripts/watch-theme.js +++ b/scripts/watch-theme.js @@ -15,7 +15,7 @@ const { exec } = require("child_process"); console.clear(); console.log("Compiling theme..."); exec( - "npm run build", + "npm run sass && npm run build", { cwd: root, }, diff --git a/tests/README.md b/tests/README.md index 6696f8c6b13..9c6397b2ebc 100644 --- a/tests/README.md +++ b/tests/README.md @@ -18,7 +18,7 @@ The output pages contain static HTML that represents: To generate screenshots for a specific theme: 1. Build the theme with `npm run sass:flat` or `npm run dart:flat` -1. Run `npm run create-screenshots `, substituting `` with a theme name. +1. Run `npm run test:create-screenshots `, substituting `` with a theme name. These steps will create new screenshots in `tests/_output`. Note that due to platform differences, all of the files will be marked as changed.