mirror of
				https://gitee.com/vant-contrib/vant.git
				synced 2025-11-04 12:52:08 +08:00 
			
		
		
		
	build(@vant/area-data): generate both cjs/esm output (#10107)
This commit is contained in:
		
							parent
							
								
									90e64101a7
								
							
						
					
					
						commit
						ffd7f4437d
					
				
							
								
								
									
										1
									
								
								packages/vant-area-data/build.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								packages/vant-area-data/build.js
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1 @@
 | 
				
			|||||||
 | 
					require('../vant-use/build');
 | 
				
			||||||
@ -2,11 +2,16 @@
 | 
				
			|||||||
  "name": "@vant/area-data",
 | 
					  "name": "@vant/area-data",
 | 
				
			||||||
  "version": "1.1.5",
 | 
					  "version": "1.1.5",
 | 
				
			||||||
  "description": "Vant 省市区数据",
 | 
					  "description": "Vant 省市区数据",
 | 
				
			||||||
  "main": "./lib/index.js",
 | 
					  "main": "dist/index.cjs.js",
 | 
				
			||||||
  "typings": "./lib/index.d.ts",
 | 
					  "module": "dist/index.esm.js",
 | 
				
			||||||
 | 
					  "types": "dist/index.d.ts",
 | 
				
			||||||
  "scripts": {
 | 
					  "scripts": {
 | 
				
			||||||
    "build": "rimraf ./lib && tsc",
 | 
					    "clean": "rimraf ./dist",
 | 
				
			||||||
    "release": "pnpm build && npm publish",
 | 
					    "dev": "node ./build.js -w",
 | 
				
			||||||
 | 
					    "build:types": "tsc -p ./tsconfig.json --emitDeclarationOnly",
 | 
				
			||||||
 | 
					    "build:bundle": "node ./build.js",
 | 
				
			||||||
 | 
					    "build": "pnpm clean && pnpm build:bundle && pnpm build:types",
 | 
				
			||||||
 | 
					    "release": "pnpm build && release-it",
 | 
				
			||||||
    "prepare": "pnpm build"
 | 
					    "prepare": "pnpm build"
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  "publishConfig": {
 | 
					  "publishConfig": {
 | 
				
			||||||
@ -20,5 +25,16 @@
 | 
				
			|||||||
  },
 | 
					  },
 | 
				
			||||||
  "bugs": "https://github.com/youzan/vant/issues",
 | 
					  "bugs": "https://github.com/youzan/vant/issues",
 | 
				
			||||||
  "author": "chenjiahan",
 | 
					  "author": "chenjiahan",
 | 
				
			||||||
  "license": "MIT"
 | 
					  "license": "MIT",
 | 
				
			||||||
 | 
					  "devDependencies": {
 | 
				
			||||||
 | 
					    "esbuild": "^0.13.15",
 | 
				
			||||||
 | 
					    "release-it": "^14.2.2",
 | 
				
			||||||
 | 
					    "typescript": "~4.5.2"
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  "release-it": {
 | 
				
			||||||
 | 
					    "git": {
 | 
				
			||||||
 | 
					      "tag": false,
 | 
				
			||||||
 | 
					      "commitMessage": "release: @vant/area-data ${version}"
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -1,8 +1,7 @@
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
  "extends": "../../tsconfig",
 | 
					  "extends": "../../tsconfig",
 | 
				
			||||||
  "compilerOptions": {
 | 
					  "compilerOptions": {
 | 
				
			||||||
    "target": "ES2019",
 | 
					    "outDir": "./dist",
 | 
				
			||||||
    "outDir": "./lib",
 | 
					 | 
				
			||||||
    "declaration": true
 | 
					    "declaration": true
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  "include": ["src/**/*"]
 | 
					  "include": ["src/**/*"]
 | 
				
			||||||
 | 
				
			|||||||
@ -11,6 +11,8 @@ function bundleBundle(format) {
 | 
				
			|||||||
    bundle: true,
 | 
					    bundle: true,
 | 
				
			||||||
    target: ['chrome53'],
 | 
					    target: ['chrome53'],
 | 
				
			||||||
    outfile,
 | 
					    outfile,
 | 
				
			||||||
 | 
					    // preserve Chinese character
 | 
				
			||||||
 | 
					    charset: 'utf8',
 | 
				
			||||||
    external: ['vue'],
 | 
					    external: ['vue'],
 | 
				
			||||||
    entryPoints: ['./src/index.ts'],
 | 
					    entryPoints: ['./src/index.ts'],
 | 
				
			||||||
  }).then(finish);
 | 
					  }).then(finish);
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										9
									
								
								pnpm-lock.yaml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										9
									
								
								pnpm-lock.yaml
									
									
									
										generated
									
									
									
								
							@ -77,7 +77,14 @@ importers:
 | 
				
			|||||||
      vue-router: 4.0.12_vue@3.2.21
 | 
					      vue-router: 4.0.12_vue@3.2.21
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  packages/vant-area-data:
 | 
					  packages/vant-area-data:
 | 
				
			||||||
    specifiers: {}
 | 
					    specifiers:
 | 
				
			||||||
 | 
					      esbuild: ^0.13.15
 | 
				
			||||||
 | 
					      release-it: ^14.2.2
 | 
				
			||||||
 | 
					      typescript: ~4.5.2
 | 
				
			||||||
 | 
					    devDependencies:
 | 
				
			||||||
 | 
					      esbuild: 0.13.15
 | 
				
			||||||
 | 
					      release-it: 14.11.6
 | 
				
			||||||
 | 
					      typescript: 4.5.2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  packages/vant-cli:
 | 
					  packages/vant-cli:
 | 
				
			||||||
    specifiers:
 | 
					    specifiers:
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user