Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ dist
/cli
/index.js
/index.d.ts
/bundle.js
/bundle.js.map
/bundle.cjs
/bundle.cjs.map
/bundle.css
/bundle.css.map
/bundle.d.ts
/bundle.d.cts
*.log
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
"size-limit": [
{
"name": "Library / JS",
"path": "packages/reshaped/dist/bundle.js",
"path": "packages/reshaped/dist/bundle.cjs",
"webpack": false
},
{
Expand Down
2 changes: 1 addition & 1 deletion packages/reshaped/bin/clean.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

find ./src -type d -mindepth 1 -maxdepth 1 | xargs -L1 basename | xargs -L1 rm -rf
rm -rf dist
rm -f index.js index.d.ts bundle.js bundle.js.map bundle.css bundle.css.map bundle.d.ts
rm -f index.js index.d.ts bundle.cjs bundle.cjs.map bundle.css bundle.css.map bundle.d.cts
2 changes: 1 addition & 1 deletion packages/reshaped/bin/cli.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/usr/bin/env node
require("@reshaped/theming/cli/run");
import "@reshaped/theming/cli/run";
9 changes: 5 additions & 4 deletions packages/reshaped/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"sideEffects": [
"*.css"
],
"type": "module",
"types": "./dist/index.d.ts",
"exports": {
".": {
Expand All @@ -63,9 +64,9 @@
"default": "./dist/config/postcss.cjs"
},
"./bundle": {
"types": "./dist/bundle.d.ts",
"import": "./dist/bundle.js",
"default": "./dist/bundle.js"
"types": "./dist/bundle.d.cts",
"import": "./dist/bundle.cjs",
"default": "./dist/bundle.cjs"
},
"./themes/slate/*": "./dist/themes/slate/*",
"./themes/figma/*": "./dist/themes/figma/*",
Expand All @@ -81,7 +82,7 @@
"build:esm": "tsc -p tsconfig.esm.json && tsc-alias -p tsconfig.esm.json",
"build:css": "postcss \"src/**/*.css\" --dir dist --base src --config tools/build",
"build:stories": "tsc -p tsconfig.stories.json && tsc-alias -p tsconfig.stories.json",
"build:bundle": "vite build && shx cp dist/index.d.ts dist/bundle.d.ts",
"build:bundle": "vite build && shx cp dist/index.d.ts dist/bundle.d.cts",
"build:size": "pnpm clean && pnpm build:esm && pnpm build:bundle",
"test:browser": "vitest run --project=storybook",
"test:unit": "vitest run --project=unit",
Expand Down
5 changes: 4 additions & 1 deletion packages/reshaped/tsconfig.esm.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,8 @@
"./src/**/*.test.tsx",
"./src/**/*.test.ts",
"./src/**/*.stories.tsx"
]
],
"tsc-alias": {
"resolveFullPaths": true
}
}
4 changes: 2 additions & 2 deletions packages/reshaped/tsconfig.stories.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"outDir": "./dist",
"rootDir": "./src",
"paths": { "@/*": ["./src/*"] },
"module": "NodeNext",
"moduleResolution": "NodeNext"
"module": "esnext",
"moduleResolution": "bundler"
},
"include": ["./src/**/tests/*.stories.tsx", "./src/**/*.d.ts", "./storybook/**.*.tsx"],
"exclude": ["node_modules", "dist", "tools"]
Expand Down
4 changes: 2 additions & 2 deletions packages/reshaped/vite.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ export default defineConfig({
logLevel: "silent",
external: ["react", "react/jsx-runtime", "react-dom"],
output: {
entryFileNames: "bundle.js",
chunkFileNames: "[name].js",
entryFileNames: "bundle.cjs",
chunkFileNames: "[name].cjs",
globals: {
react: "React",
"react-dom": "ReactDOM",
Expand Down
5 changes: 3 additions & 2 deletions packages/theming/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"sideEffects": [
"*.css"
],
"type": "module",
"types": "./dist/index.d.ts",
"exports": {
".": {
Expand All @@ -50,8 +51,8 @@
},
"scripts": {
"clean": "rm -rf dist",
"dev": "tsc-watch --onSuccess \"tsc-alias --resolve-full-paths\"",
"build": "tsc && tsc-alias --resolve-full-paths"
"dev": "tsc-watch --onSuccess \"tsc-alias\"",
"build": "tsc && tsc-alias"
},
"dependencies": {
"@types/culori": "4.0.1",
Expand Down
5 changes: 4 additions & 1 deletion packages/theming/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@
}
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist", "./src/**/*.test.tsx", "./src/**/*.test.ts"]
"exclude": ["node_modules", "dist", "./src/**/*.test.tsx", "./src/**/*.test.ts"],
"tsc-alias": {
"resolveFullPaths": true
}
}
1 change: 1 addition & 0 deletions packages/utilities/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"files": [
"dist/**/*"
],
"type": "module",
"types": "./dist/index.d.ts",
"exports": {
".": {
Expand Down
5 changes: 4 additions & 1 deletion packages/utilities/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,8 @@
"paths": { "@/*": ["./src/*"] }
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist"]
"exclude": ["node_modules", "dist"],
"tsc-alias": {
"resolveFullPaths": true
}
}
Loading