Skip to content
Merged
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
10 changes: 9 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
.turbo
.next
pnpm-lock.yaml
node_modules
.turbo
dist
esm
**/*.d.ts
**/*.d.cts
**/*.tgz

# Todo: codegen from packages
5 changes: 3 additions & 2 deletions apps/demo/.prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.turbo
.next
next-env.d.ts
node_modules
pnpm-lock.yaml
node_modules
**/*.d.ts
2 changes: 1 addition & 1 deletion packages/eslint-config/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { defineConfig, globalIgnores } from 'eslint/config';
import globals from 'globals';

const eslintConfig = defineConfig([
globalIgnores(['dist', 'build', 'node_modules']),
globalIgnores(['.turbo', 'esm', 'dist', 'build', 'node_modules', '*.d.{ts,cts}', '*.tgz']),
{
files: ['**/*.{ts,tsx}'],
extends: [
Expand Down
5 changes: 5 additions & 0 deletions packages/react-rolling-number/.prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
.turbo
pnpm-lock.yaml
node_modules
dist
esm
**/*.d.ts
**/*.d.cts
**/*.tgz

8 changes: 4 additions & 4 deletions packages/react-rolling-number/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
"esm/**/*"
],
"scripts": {
"dev": "tsup --watch",
"build": "tsc -b && tsup",
"dev": "tsdown --watch",
"build": "tsc -b && tsdown",
"fix": "pnpm fix:lint && pnpm fix:format",
"fix:lint": "eslint . --fix",
"fix:format": "prettier --write .",
Expand All @@ -57,12 +57,12 @@
"@types/react": "^19.2.7",
"@types/react-dom": "^19.2.3",
"@vanilla-extract/css": "^1.17.5",
"@vanilla-extract/esbuild-plugin": "^2.3.20",
"@vanilla-extract/rollup-plugin": "^1.5.0",
"eslint": "catalog:",
"eslint-plugin-react-refresh": "^0.4.24",
"react": "^19.2.1",
"react-dom": "^19.2.1",
"tsup": "^8.5.1",
"tsdown": "^0.17.2",
"typescript": "^5.9.3"
},
"peerDependencies": {
Expand Down
52 changes: 52 additions & 0 deletions packages/react-rolling-number/tsdown.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import type { UserConfig } from 'tsdown';

import { vanillaExtractPlugin } from '@vanilla-extract/rollup-plugin';
import { defineConfig } from 'tsdown';

const CSS_FILENAME = 'index.css';

// Plugin to remove vanilla-extract CSS imports from bundled output
const removeVanillaCssImportsPlugin = () => ({
name: 'remove-vanilla-css-imports',
renderChunk(code: string) {
return code
.replace(/import\s*["'][^"']*\.vanilla\.css["'];?\n?/g, '')
.replace(/require\s*\(\s*["'`][^"'`]*\.vanilla\.css["'`]\s*\)\s*;?\n?/g, '');
},
});

const defaultConfig: UserConfig = {
entry: ['src/index.ts'],
dts: true,
minify: true,
sourcemap: false,
outputOptions: {
assetFileNames: CSS_FILENAME,
},
plugins: [
vanillaExtractPlugin({
identifiers: 'short',
extract: {
name: CSS_FILENAME,
sourcemap: false,
},
}),
removeVanillaCssImportsPlugin(),
],
};

export default defineConfig([
{
...defaultConfig,
format: 'cjs',
outDir: 'dist',
banner: `require("./${CSS_FILENAME}");`,
},
{
...defaultConfig,
format: 'esm',
outDir: 'esm',
fixedExtension: false,
banner: `import "./${CSS_FILENAME}";`,
},
]);
37 changes: 0 additions & 37 deletions packages/react-rolling-number/tsup.config.ts

This file was deleted.

Loading