Skip to content

Commit

Permalink
refactor: remove esbuild
Browse files Browse the repository at this point in the history
  • Loading branch information
himself65 committed Oct 25, 2023
1 parent c2b3df2 commit 01ed176
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 239 deletions.
7 changes: 3 additions & 4 deletions packages/create-waku/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "create-waku",
"version": "0.5.3",
"author": "Daishi Kato",
"type": "module",
"contributors": [
"Vasu Singh"
],
Expand All @@ -15,12 +16,11 @@
"dist",
"template"
],
"type": "commonjs",
"scripts": {
"start": "node dist/cli.js",
"compile": "rm -rf template dist && pnpm run template && pnpm run build",
"template": "cp -r ../../examples template/",
"build": "esbuild src/* --bundle --platform=node --outdir=dist"
"build": "tsc -b"
},
"dependencies": {
"fs-extra": "^11.1.1",
Expand All @@ -29,7 +29,6 @@
},
"devDependencies": {
"@types/fs-extra": "^11.0.2",
"@types/prompts": "^2.4.5",
"esbuild": "0.19.4"
"@types/prompts": "^2.4.5"
}
}
5 changes: 3 additions & 2 deletions packages/create-waku/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import fs from "node:fs";
import path from "node:path";
import { default as prompts } from "prompts";
import { red, green, bold } from "kolorist";
import fse from "fs-extra";
import fse from "fs-extra/esm";
import { fileURLToPath } from "node:url";

function isValidPackageName(projectName: string) {
return /^(?:@[a-z0-9-*~][a-z0-9-*._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/.test(
Expand All @@ -30,7 +31,7 @@ async function init() {
let targetDir = "";
const defaultProjectName = "waku-project";

const templateRoot = path.join(__dirname, "../template");
const templateRoot = fileURLToPath(new URL("../template", import.meta.url));
const CHOICES = fs.readdirSync(templateRoot);
let result: {
packageName: string;
Expand Down
6 changes: 4 additions & 2 deletions packages/create-waku/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
"outDir": "./dist",
"module": "NodeNext",
"moduleResolution": "nodenext",
"lib": ["ESNext", "DOM", "DOM.Iterable"],
"tsBuildInfoFile": "./dist/.tsbuildinfo"
"types": [],
"lib": ["ESNext"],
"tsBuildInfoFile": "./dist/.tsbuildinfo",
"emitDeclarationOnly": false
},
"include": ["./src"],
"exclude": ["./template"],
Expand Down
Loading

0 comments on commit 01ed176

Please sign in to comment.