diff --git a/e2e/fixtures/modern-js/package.json b/e2e/fixtures/modern-js/package.json index 0a4b73dbb..c14f9961b 100644 --- a/e2e/fixtures/modern-js/package.json +++ b/e2e/fixtures/modern-js/package.json @@ -2,7 +2,6 @@ "name": "@rspress-fixture/modern-js", "version": "0.1.0", "private": true, - "sideEffects": [], "exports": { ".": { "node": { diff --git a/packages/cli/.gitignore b/packages/cli/.gitignore deleted file mode 100644 index 5d3a1a133..000000000 --- a/packages/cli/.gitignore +++ /dev/null @@ -1,47 +0,0 @@ -.DS_Store - -.pnp -.pnp.js -.env.local -.env.*.local -.history -.rts* -*.log* -*.pid -*.pid.* -*.report -*.lcov -lib-cov - -node_modules/ -.npm -.lock-wscript -.yarn-integrity -.node_repl_history -.nyc_output -*.tsbuildinfo -.sonarlint - -dist/ -coverage/ -release/ -output/ -output_resource/ -log/ - -.vscode/**/* -!.vscode/settings.json -!.vscode/extensions.json -.idea/ - -**/*/typings/auto-generated - -.changeset/pre.json - -.pnpm-store/ - -modern.config.local.ts -modern.config.local.js -modern.config.local.mjs - -doc_build/ diff --git a/packages/cli/.npmignore b/packages/cli/.npmignore deleted file mode 100644 index 60ce2efa1..000000000 --- a/packages/cli/.npmignore +++ /dev/null @@ -1,36 +0,0 @@ -.DS_Store - -.pnp -.pnp.js -.env.local -.env.*.local -.history -.rts* -*.log* -*.pid -*.pid.* -*.report -*.lcov -lib-cov - -node_modules/ -.npm -.lock-wscript -.yarn-integrity -.node_repl_history -.nyc_output -*.tsbuildinfo -.sonarlint - -coverage/ -release/ -output/ -output_resource/ -tests/ - -.vscode/**/* -!.vscode/settings.json -!.vscode/extensions.json -.idea/ - -**/*/api/typings/auto-generated diff --git a/packages/cli/.npmrc b/packages/cli/.npmrc deleted file mode 100644 index 319e41e69..000000000 --- a/packages/cli/.npmrc +++ /dev/null @@ -1 +0,0 @@ -strict-peer-dependencies=false diff --git a/packages/cli/.prettierrc b/packages/cli/.prettierrc deleted file mode 100644 index 5393aaf2d..000000000 --- a/packages/cli/.prettierrc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "singleQuote": true, - "trailingComma": "all", - "arrowParens": "avoid" -} diff --git a/packages/cli/package.json b/packages/cli/package.json index 67484da8c..b84376040 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,18 +1,13 @@ { "name": "rspress", "version": "1.39.3", - "type": "module", - "types": "./dist/index.d.ts", - "main": "./dist/index.js", - "module": "./dist/index.js", - "bin": { - "rspress": "./bin/rspress.js" - }, "repository": { "type": "git", "url": "https://github.com/web-infra-dev/rspress", "directory": "packages/cli" }, + "license": "MIT", + "type": "module", "exports": { ".": { "default": "./dist/index.js" @@ -27,11 +22,24 @@ "default": "./config.ts" } }, + "main": "./dist/index.js", + "module": "./dist/index.js", + "types": "./dist/index.d.ts", + "bin": { + "rspress": "./bin/rspress.js" + }, + "files": [ + "bin", + "dist", + "runtime.ts", + "theme.ts", + "config.ts" + ], "scripts": { - "dev": "rslib build -w", "build": "rslib build", - "test": "vitest run", - "reset": "rimraf ./**/node_modules" + "dev": "rslib build -w", + "reset": "rimraf ./**/node_modules", + "test": "vitest run" }, "dependencies": { "@rsbuild/core": "~1.1.13", @@ -50,18 +58,9 @@ "rimraf": "^3.0.2", "typescript": "^5.5.3" }, - "sideEffects": [], "publishConfig": { "access": "public", "provenance": true, "registry": "https://registry.npmjs.org/" - }, - "license": "MIT", - "files": [ - "bin", - "dist", - "runtime.ts", - "theme.ts", - "config.ts" - ] + } } diff --git a/packages/core/.gitignore b/packages/core/.gitignore deleted file mode 100644 index 7aeddc749..000000000 --- a/packages/core/.gitignore +++ /dev/null @@ -1,40 +0,0 @@ -.DS_Store - -.pnp -.pnp.js -.env.local -.env.*.local -.history -.rts* -*.log* -*.pid -*.pid.* -*.report -*.lcov -lib-cov - -node_modules/ -.npm -.lock-wscript -.yarn-integrity -.node_repl_history -.nyc_output -*.tsbuildinfo -.sonarlint - -dist/ -coverage/ -release/ -output/ -output_resource/ - -.vscode/**/* -!.vscode/settings.json -!.vscode/extensions.json -.idea/ - -**/*/typings/auto-generated - -.changeset/pre.json - -.pnpm-store/ diff --git a/packages/core/.npmignore b/packages/core/.npmignore deleted file mode 100644 index 60ce2efa1..000000000 --- a/packages/core/.npmignore +++ /dev/null @@ -1,36 +0,0 @@ -.DS_Store - -.pnp -.pnp.js -.env.local -.env.*.local -.history -.rts* -*.log* -*.pid -*.pid.* -*.report -*.lcov -lib-cov - -node_modules/ -.npm -.lock-wscript -.yarn-integrity -.node_repl_history -.nyc_output -*.tsbuildinfo -.sonarlint - -coverage/ -release/ -output/ -output_resource/ -tests/ - -.vscode/**/* -!.vscode/settings.json -!.vscode/extensions.json -.idea/ - -**/*/api/typings/auto-generated diff --git a/packages/core/.npmrc b/packages/core/.npmrc deleted file mode 100644 index 319e41e69..000000000 --- a/packages/core/.npmrc +++ /dev/null @@ -1 +0,0 @@ -strict-peer-dependencies=false diff --git a/packages/core/.prettierrc b/packages/core/.prettierrc deleted file mode 100644 index 5393aaf2d..000000000 --- a/packages/core/.prettierrc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "singleQuote": true, - "trailingComma": "all", - "arrowParens": "avoid" -} diff --git a/packages/core/package.json b/packages/core/package.json index 457232e61..f59f113f6 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -9,11 +9,16 @@ "directory": "packages/cli/core" }, "license": "MIT", + "sideEffects": [ + "*.css", + "*.less", + "*.sass", + "*.scss", + "**/virtual-global-styles.js", + "virtual-global-styles", + "./src/theme-default/styles/index.ts" + ], "type": "module", - "jsnext:source": "./src/index.ts", - "types": "./dist/index.d.ts", - "main": "./dist/index.js", - "module": "./dist/node/index.js", "exports": { ".": { "types": "./dist/index.d.ts", @@ -29,15 +34,26 @@ "default": "./runtime.ts" } }, + "main": "./dist/index.js", + "module": "./dist/node/index.js", + "types": "./dist/index.d.ts", + "files": [ + "dist", + "src/runtime", + "src/theme-default", + "src/shared", + "index.html", + "runtime.ts", + "theme.ts", + "loader.cjs", + "compiled" + ], "scripts": { - "dev": "modern build -w", "build": "modern build", + "dev": "modern build -w", "reset": "rimraf ./**/node_modules", "test": "vitest run --passWithNoTests" }, - "engines": { - "node": ">=14.17.6" - }, "dependencies": { "@mdx-js/loader": "2.3.0", "@mdx-js/mdx": "2.3.0", @@ -95,29 +111,13 @@ "typescript": "^5.5.3", "vitest": "2.1.8" }, - "sideEffects": [ - "*.css", - "*.less", - "*.sass", - "*.scss", - "**/virtual-global-styles.js", - "virtual-global-styles", - "./src/theme-default/styles/index.ts" - ], - "files": [ - "dist", - "src/runtime", - "src/theme-default", - "src/shared", - "index.html", - "runtime.ts", - "theme.ts", - "loader.cjs", - "compiled" - ], + "engines": { + "node": ">=14.17.6" + }, "publishConfig": { "access": "public", "provenance": true, "registry": "https://registry.npmjs.org/" - } + }, + "jsnext:source": "./src/index.ts" } diff --git a/packages/shared/.gitignore b/packages/shared/.gitignore deleted file mode 100644 index 5d3a1a133..000000000 --- a/packages/shared/.gitignore +++ /dev/null @@ -1,47 +0,0 @@ -.DS_Store - -.pnp -.pnp.js -.env.local -.env.*.local -.history -.rts* -*.log* -*.pid -*.pid.* -*.report -*.lcov -lib-cov - -node_modules/ -.npm -.lock-wscript -.yarn-integrity -.node_repl_history -.nyc_output -*.tsbuildinfo -.sonarlint - -dist/ -coverage/ -release/ -output/ -output_resource/ -log/ - -.vscode/**/* -!.vscode/settings.json -!.vscode/extensions.json -.idea/ - -**/*/typings/auto-generated - -.changeset/pre.json - -.pnpm-store/ - -modern.config.local.ts -modern.config.local.js -modern.config.local.mjs - -doc_build/ diff --git a/packages/shared/.npmignore b/packages/shared/.npmignore deleted file mode 100644 index 60ce2efa1..000000000 --- a/packages/shared/.npmignore +++ /dev/null @@ -1,36 +0,0 @@ -.DS_Store - -.pnp -.pnp.js -.env.local -.env.*.local -.history -.rts* -*.log* -*.pid -*.pid.* -*.report -*.lcov -lib-cov - -node_modules/ -.npm -.lock-wscript -.yarn-integrity -.node_repl_history -.nyc_output -*.tsbuildinfo -.sonarlint - -coverage/ -release/ -output/ -output_resource/ -tests/ - -.vscode/**/* -!.vscode/settings.json -!.vscode/extensions.json -.idea/ - -**/*/api/typings/auto-generated diff --git a/packages/shared/.npmrc b/packages/shared/.npmrc deleted file mode 100644 index 319e41e69..000000000 --- a/packages/shared/.npmrc +++ /dev/null @@ -1 +0,0 @@ -strict-peer-dependencies=false diff --git a/packages/shared/.nvmrc b/packages/shared/.nvmrc deleted file mode 100644 index 53d838af2..000000000 --- a/packages/shared/.nvmrc +++ /dev/null @@ -1 +0,0 @@ -lts/gallium diff --git a/packages/shared/.prettierrc b/packages/shared/.prettierrc deleted file mode 100644 index 5393aaf2d..000000000 --- a/packages/shared/.prettierrc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "singleQuote": true, - "trailingComma": "all", - "arrowParens": "avoid" -} diff --git a/packages/shared/package.json b/packages/shared/package.json index 2c0d71390..a9f81b46c 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -1,14 +1,12 @@ { "name": "@rspress/shared", "version": "1.39.3", - "types": "./dist/index.d.ts", - "main": "./dist/index.js", - "module": "./dist/index.mjs", "repository": { "type": "git", "url": "https://github.com/web-infra-dev/rspress", "directory": "packages/shared" }, + "license": "MIT", "exports": { ".": { "types": "./dist/index.d.ts", @@ -41,13 +39,19 @@ "require": "./dist/node-utils.js" } }, + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "types": "./dist/index.d.ts", + "files": [ + "dist" + ], "scripts": { - "dev": "modern build -w", "build": "modern build", "build:watch": "modern build -w", - "test": "vitest run", - "reset": "rimraf ./**/node_modules", + "dev": "modern build -w", "new": "modern new", + "reset": "rimraf ./**/node_modules", + "test": "vitest run", "upgrade": "modern upgrade" }, "dependencies": { @@ -69,14 +73,9 @@ "rimraf": "^3.0.2", "typescript": "^5.5.3" }, - "sideEffects": [], "publishConfig": { "access": "public", "provenance": true, "registry": "https://registry.npmjs.org/" - }, - "license": "MIT", - "files": [ - "dist" - ] + } }