-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e76e5b9
commit 4b1bf85
Showing
26 changed files
with
1,370 additions
and
9,928 deletions.
There are no files selected for viewing
100 changes: 0 additions & 100 deletions
100
.yarn/patches/modular-scripts-npm-3.6.0-d967962075.patch
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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,21 +11,9 @@ | |
"docs", | ||
"site" | ||
], | ||
"modular": { | ||
"type": "root" | ||
}, | ||
"scripts": { | ||
"start": "yarn storybook", | ||
"build": "yarn build:core && yarn build:lab && yarn build:icons && yarn build:countries && yarn build:theme && yarn build:data-grid && yarn build:ag-grid-theme && yarn build:window && yarn build:styles && yarn bundle:css", | ||
"build:core": "modular build @salt-ds/core", | ||
"build:icons": "modular build @salt-ds/icons", | ||
"build:countries": "modular build @salt-ds/countries", | ||
"build:lab": "modular build @salt-ds/lab", | ||
"build:theme": "yarn workspace @salt-ds/theme build", | ||
"build:data-grid": "modular build @salt-ds/data-grid", | ||
"build:window": "modular build @salt-ds/window", | ||
"build:styles": "modular build @salt-ds/styles", | ||
"build:ag-grid-theme": "yarn workspace @salt-ds/ag-grid-theme build", | ||
"build": "yarn workspaces foreach --exclude @salt-ds/site -Apt run build && yarn bundle:css", | ||
"bundle:css": "yarn bundle:core:css && yarn bundle:lab:css && yarn copy:icon:css && yarn copy:countries:css", | ||
"bundle:core:css": "yarn workspace @salt-ds/core bundle:css", | ||
"bundle:lab:css": "yarn workspace @salt-ds/lab bundle:css", | ||
|
@@ -44,12 +32,37 @@ | |
"lint:style:icon": "yarn stylelint -f verbose \"packages/icons/src/**/*.css\"", | ||
"lint:style:lab": "yarn stylelint -f verbose \"packages/lab/src/**/*.css\"", | ||
"lint:style:ag-theme": "yarn stylelint -f verbose \"packages/ag-grid-theme/css/**/*.css\"", | ||
"storybook": "storybook dev -p 6006", | ||
"build-storybook": "yarn build:ag-grid-theme && yarn bundle:css && storybook build", | ||
"storybook": "yarn storybook dev -p 6006", | ||
"build-storybook": "yarn workspace @salt-ds/ag-grid-theme build && yarn bundle:css && storybook build", | ||
"typecheck": "tsc --noEmit", | ||
"chromatic": "chromatic" | ||
}, | ||
"dependencies": { | ||
"resolutions": { | ||
"@changesets/assemble-release-plan@npm:^6.0.3": "patch:@changesets/assemble-release-plan@npm%3A6.0.3#~/.yarn/patches/@changesets-assemble-release-plan-npm-6.0.3-29726de363.patch", | ||
"@salt-ds/lab": "workspace:*", | ||
"next": "^14.0.0", | ||
"whatwg-url": "^14.0.0", | ||
"@storybook/test@npm:8.2.4": "patch:@storybook/test@npm%3A8.2.4#~/.yarn/patches/@storybook-test-npm-8.2.4-0a53c854b7.patch" | ||
}, | ||
"browserslist": { | ||
"production": [ | ||
"chrome >= 86", | ||
"firefox >= 86", | ||
"edge >= 85", | ||
"iOS >= 15.4", | ||
"safari >= 15.4" | ||
], | ||
"development": [ | ||
"last 1 chrome version", | ||
"last 1 firefox version", | ||
"last 1 safari version" | ||
] | ||
}, | ||
"packageManager": "[email protected]", | ||
"msw": { | ||
"workerDirectory": "docs/public" | ||
}, | ||
"devDependencies": { | ||
"@biomejs/biome": "1.8.3", | ||
"@biomejs/js-api": "^0.6.2", | ||
"@biomejs/wasm-nodejs": "^1.8.3", | ||
|
@@ -59,6 +72,9 @@ | |
"@fontsource/open-sans": "^4.5.13", | ||
"@fontsource/pt-mono": "^5.0.12", | ||
"@mswjs/data": "^0.14.0", | ||
"@rollup/plugin-commonjs": "^26.0.1", | ||
"@rollup/plugin-json": "^6.1.0", | ||
"@rollup/plugin-node-resolve": "^15.2.3", | ||
"@storybook/addon-a11y": "^8.2.4", | ||
"@storybook/addon-actions": "^8.2.4", | ||
"@storybook/addon-docs": "^8.2.4", | ||
|
@@ -79,7 +95,6 @@ | |
"@tanstack/react-query": "^4.28.0", | ||
"@testing-library/cypress": "^10.0.0", | ||
"@testing-library/dom": "^10.0.0", | ||
"@testing-library/react": "^15.0.0", | ||
"@types/no-scroll": "^2.1.0", | ||
"@types/node": "^20.0.0", | ||
"@types/react": "^18.3.3", | ||
|
@@ -91,60 +106,35 @@ | |
"ag-grid-enterprise": "^31.3.0", | ||
"ag-grid-react": "^31.3.0", | ||
"axe-core": "^4.9.0", | ||
"browserslist-to-esbuild": "^2.1.1", | ||
"chromatic": "^11.3.2", | ||
"ci-info": "^3.3.1", | ||
"ci-info": "^4.0.0", | ||
"clsx": "^2.0.0", | ||
"cypress": "^13.8.0", | ||
"cypress-axe": "^1.5.0", | ||
"cypress-real-events": "^1.12.0", | ||
"deepmerge": "^4.2.2", | ||
"dom-accessibility-api": "^0.7.0", | ||
"find-up": "^5.0.0", | ||
"get-tsconfig": "^4.7.5", | ||
"mockdate": "^3.0.5", | ||
"modular-scripts": "patch:modular-scripts@npm:3.6.0#.yarn/patches/modular-scripts-npm-3.6.0-d967962075.patch", | ||
"msw": "^1.2.1", | ||
"msw-storybook-addon": "^1.8.0", | ||
"prettier": "^3.3.3", | ||
"react": "^18.3.1", | ||
"react-docgen-typescript": "2.2.2", | ||
"react-dom": "^18.3.1", | ||
"rifm": "^0.12.0", | ||
"sass": "^1.52.3", | ||
"rollup": "^4.18.1", | ||
"rollup-plugin-esbuild": "^6.1.1", | ||
"rollup-plugin-postcss": "^4.0.2", | ||
"storybook": "^8.2.4", | ||
"stylelint": "^16.0.0", | ||
"typescript": "4.6.4", | ||
"vite": "^4.4.9", | ||
"vite": "^5.0.0", | ||
"vite-plugin-istanbul": "^6.0.0", | ||
"vite-tsconfig-paths": "^4.2.0", | ||
"vitest": "^1.0.0", | ||
"webpack": "5.92.0", | ||
"vitest": "^2.0.0", | ||
"yup": "^1.0.2" | ||
}, | ||
"resolutions": { | ||
"@changesets/assemble-release-plan@npm:^6.0.3": "patch:@changesets/assemble-release-plan@npm%3A6.0.3#~/.yarn/patches/@changesets-assemble-release-plan-npm-6.0.3-29726de363.patch", | ||
"@salt-ds/lab": "workspace:*", | ||
"modular-scripts/rollup": "2.79.1", | ||
"next": "^14.0.0", | ||
"webpack-dev-server": "4.9.3", | ||
"webpack": "5.92.0", | ||
"recursive-readdir": "2.2.3", | ||
"@storybook/test@npm:8.2.4": "patch:@storybook/test@npm%3A8.2.4#~/.yarn/patches/@storybook-test-npm-8.2.4-0a53c854b7.patch" | ||
}, | ||
"browserslist": { | ||
"production": [ | ||
"chrome 79", | ||
">0.2%", | ||
"not dead", | ||
"not op_mini all" | ||
], | ||
"development": [ | ||
"chrome 79", | ||
"last 1 chrome version", | ||
"last 1 firefox version", | ||
"last 1 safari version" | ||
] | ||
}, | ||
"packageManager": "[email protected]", | ||
"msw": { | ||
"workerDirectory": "docs/public" | ||
} | ||
} |
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,45 +1,64 @@ | ||
import fs from "node:fs"; | ||
import path from "node:path"; | ||
import { argv } from "node:process"; | ||
import { fileURLToPath } from "node:url"; | ||
import { deleteSync } from "del"; | ||
import esbuild from "esbuild"; | ||
import findUp from "find-up"; | ||
import fs from "fs-extra"; | ||
|
||
const __dirname = path.dirname(fileURLToPath(import.meta.url)); | ||
const buildFolder = path.join(__dirname, "../../../dist/salt-ds-ag-grid-theme"); | ||
const FILES_TO_COPY = ["README.md", "CHANGELOG.md", "package.json"]; | ||
|
||
const cwd = process.cwd(); | ||
const packageJson = await fs.readJSON(path.join(cwd, "package.json")); | ||
const buildFolder = packageJson.publishConfig.directory; | ||
const packageName = packageJson.name; | ||
|
||
console.log(`Building ${packageName}`); | ||
|
||
deleteSync([buildFolder], { force: true }); | ||
|
||
esbuild | ||
.build({ | ||
absWorkingDir: path.resolve(__dirname, ".."), | ||
entryPoints: ["salt-ag-theme.css"], | ||
assetNames: "[dir]/[name]", | ||
outdir: buildFolder, | ||
loader: { | ||
".woff": "file", | ||
}, | ||
write: true, | ||
bundle: true, | ||
logLevel: "info", | ||
watch: argv.includes("--watch"), | ||
}) | ||
.then(() => { | ||
// File destination.txt will be created or overwritten by default. | ||
fs.copyFile( | ||
path.resolve(__dirname, "../package.json"), | ||
path.join(buildFolder, "package.json"), | ||
(err) => { | ||
if (err) throw err; | ||
console.log( | ||
`${path.relative( | ||
process.cwd(), | ||
path.resolve(__dirname, "../package.json"), | ||
)} copied to ${path.relative( | ||
process.cwd(), | ||
path.join(buildFolder, "package.json"), | ||
)}`, | ||
); | ||
}, | ||
const context = await esbuild.context({ | ||
absWorkingDir: cwd, | ||
entryPoints: ["salt-ag-theme.css"], | ||
assetNames: "[dir]/[name]", | ||
outdir: buildFolder, | ||
loader: { | ||
".woff": "file", | ||
}, | ||
write: true, | ||
bundle: true, | ||
logLevel: "info", | ||
}); | ||
|
||
if (argv.includes("--watch")) { | ||
await context.watch(); | ||
} else { | ||
await context.rebuild(); | ||
await context.dispose(); | ||
} | ||
|
||
for (const file of FILES_TO_COPY) { | ||
const from = path.join(cwd, file); | ||
const to = path.join(buildFolder, file); | ||
try { | ||
await fs.copyFile(from, to); | ||
console.log( | ||
`${path.relative(process.cwd(), from)} copied to ${path.relative( | ||
process.cwd(), | ||
to, | ||
)}`, | ||
); | ||
}); | ||
} catch (error) { | ||
if (error.code !== "ENOENT") { | ||
throw error; | ||
} | ||
} | ||
} | ||
|
||
// Copy license file if it exists in the current or parent directories | ||
const licensePath = await findUp("LICENSE", { cwd }); | ||
|
||
if (licensePath) { | ||
await fs.copy(licensePath, path.join(buildFolder, "LICENSE")); | ||
} | ||
|
||
console.log(`Built ${packageName} into ${buildFolder}`); |
Oops, something went wrong.