Skip to content

Commit

Permalink
脚本
Browse files Browse the repository at this point in the history
  • Loading branch information
coder-hxl committed Nov 26, 2022
1 parent 554b550 commit 50d4b2d
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 19 deletions.
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"name": "xl-store",
"version": "0.1.8",
"type": "module",
"version": "0.1.9",
"description": "状态管理仓库",
"scripts": {
"build-esm": "node ./script/build.js esm",
"build-cjs": "node ./script/build.js cjs",
"prettier": "prettier --write .",
"test": "node script/test.js && node test/index.js"
"test": "node script/test.js",
"build-test": "node test/build-test.js",
"prettier": "prettier --write ."
},
"author": "coderhxl",
"license": "ISC",
"license": "MIT",
"devDependencies": {
"@types/node": "^18.7.18",
"esbuild": "^0.15.8",
Expand Down
6 changes: 2 additions & 4 deletions script/build.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import process from 'process'
import esbuild from 'esbuild'
// const process = require('process')
// const esbuild = require('esbuild')
const process = require('process')
const esbuild = require('esbuild')

const args = process.argv.slice(2)
let platform = 'neutral'
Expand Down
23 changes: 13 additions & 10 deletions script/test.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import esbuild from 'esbuild'

esbuild.buildSync({
entryPoints: ['./test/index.ts'],
target: 'ESNext',
bundle: true,
platform: 'neutral',
minify: true,
outdir: './test'
})
require('esbuild')
.build({
entryPoints: ['./test/index.ts'],
target: 'ESNext',
bundle: true,
platform: 'neutral',
minify: true,
outdir: './test',
watch: true
})
.then((res) => {
console.log('watching...')
})

0 comments on commit 50d4b2d

Please sign in to comment.