diff --git a/package-lock.json b/package-lock.json index a6f2875..d835363 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "npmize", - "version": "1.0.0", + "version": "1.0.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "npmize", - "version": "1.0.0", + "version": "1.0.4", "license": "ISC", "dependencies": { "@babel/parser": "^7.20.7", diff --git a/package.json b/package.json index dc6a71a..1312968 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "npmize", "description": "Let's create an npm package without worrying about anything.", - "version": "1.0.3", + "version": "1.0.4", "bin": "./dist/index.js", "scripts": { "lab": "nodemon ./src/__lab.ts", diff --git a/src/__lab.ts b/src/__lab.ts index a25968e..dcf587c 100644 --- a/src/__lab.ts +++ b/src/__lab.ts @@ -2,6 +2,6 @@ console.clear() import app from './main' -// app.start(['init', '--name', '../npmize-test']) +// app.start(['init', '../npmize-test']) // app.start(['dev', '../npmize-test', '--node']) -// app.start(['build', '../npmize-test']) +app.start(['build', '../npmize-test']) diff --git a/src/program/build.ts b/src/program/build.ts index 0b727cf..654bab7 100644 --- a/src/program/build.ts +++ b/src/program/build.ts @@ -11,6 +11,8 @@ export default function (basePath: string, options: Options) { console.log(`Build started at ${basePath}`) console.log('') + cleanDir(options.outDir) + if (options.module) { runBuild(options.module, basePath, options) } else { @@ -28,7 +30,6 @@ function runBuild( const tempDir = path.join(basePath, config.tempBuildDir) cleanDir(tempDir) - cleanDir(options.outDir) tsc(basePath, [ ...options.tsc.map((tsc) => `--${tsc}`),