|
5 | 5 | "type": "module", |
6 | 6 | "main": "./dist/index.js", |
7 | 7 | "types": "./dist/types/index.d.ts", |
| 8 | + "exports": { |
| 9 | + ".": { |
| 10 | + "types": "./dist/types/index.d.ts", |
| 11 | + "import": "./dist/index.js", |
| 12 | + "default": "./dist/index.js" |
| 13 | + }, |
| 14 | + "./edge": { |
| 15 | + "types": "./dist/types/edge.d.ts", |
| 16 | + "import": "./dist/edge.js", |
| 17 | + "default": "./dist/edge.js" |
| 18 | + }, |
| 19 | + "./manifest": { |
| 20 | + "types": "./dist/types/manifest.d.ts", |
| 21 | + "import": "./dist/manifest.js", |
| 22 | + "default": "./dist/manifest.js" |
| 23 | + }, |
| 24 | + "./dist/*": "./dist/*", |
| 25 | + "./package.json": "./package.json" |
| 26 | + }, |
8 | 27 | "scripts": { |
9 | | - "build": "tsc && npm run copy-assets", |
| 28 | + "build": "npm run generate-manifest && tsc && npm run copy-assets", |
| 29 | + "generate-manifest": "node ./scripts/generate-manifest.mjs", |
10 | 30 | "copy-assets": "node -e \"const fs=require('fs');const path=require('path');function copyDir(src,dest){if(!fs.existsSync(dest))fs.mkdirSync(dest,{recursive:true});for(const entry of fs.readdirSync(src,{withFileTypes:true})){const srcPath=path.join(src,entry.name);const destPath=path.join(dest,entry.name);if(entry.isDirectory())copyDir(srcPath,destPath);else fs.copyFileSync(srcPath,destPath)}}['react','solid'].forEach(fw=>{['add-ons','toolchains','hosts','examples','project'].forEach(dir=>{const src='src/frameworks/'+fw+'/'+dir;const dest='dist/frameworks/'+fw+'/'+dir;if(fs.existsSync(src))copyDir(src,dest)})})\"", |
11 | | - "dev": "tsc --watch", |
12 | | - "test": "eslint ./src && vitest run", |
13 | | - "test:watch": "vitest", |
| 31 | + "dev": "npm run generate-manifest && tsc --watch", |
| 32 | + "test": "npm run generate-manifest && eslint ./src && vitest run", |
| 33 | + "test:watch": "npm run generate-manifest && vitest", |
14 | 34 | "test:coverage": "vitest run --coverage" |
15 | 35 | }, |
16 | 36 | "repository": { |
|
0 commit comments