Skip to content

Commit

Permalink
refactor: remove esbuild (#144)
Browse files Browse the repository at this point in the history
* refactor: remove esbuild

* Update packages/create-waku/tsconfig.json

Co-authored-by: Daishi Kato <dai-shi@users.noreply.github.com>

---------

Co-authored-by: Daishi Kato <dai-shi@users.noreply.github.com>
  • Loading branch information
himself65 and dai-shi authored Oct 25, 2023
1 parent c2b3df2 commit 188ea3e
Show file tree
Hide file tree
Showing 4 changed files with 9 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
5 changes: 3 additions & 2 deletions packages/create-waku/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
"outDir": "./dist",
"module": "NodeNext",
"moduleResolution": "nodenext",
"lib": ["ESNext", "DOM", "DOM.Iterable"],
"tsBuildInfoFile": "./dist/.tsbuildinfo"
"lib": ["ESNext"],
"tsBuildInfoFile": "./dist/.tsbuildinfo",
"emitDeclarationOnly": false
},
"include": ["./src"],
"exclude": ["./template"],
Expand Down
Loading

1 comment on commit 188ea3e

@vercel
Copy link

@vercel vercel bot commented on 188ea3e Oct 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

waku – ./

waku-daishi.vercel.app
waku-git-main-daishi.vercel.app
waku.vercel.app
www.waku.gg
waku.gg

Please sign in to comment.