Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ts-node for dev #704

Closed
wants to merge 5 commits into from
Closed

Conversation

Akimyou
Copy link
Contributor

@Akimyou Akimyou commented Aug 1, 2020

Changes

Add ts-node for run snowpack ts source directly, may be it can speed up our dev flow.

cd snowpack/packages/snowpack
npm link

New bin snowpack-ts will be add to global.

We can use it as normal pre builded bin snowpack, such as:

snowpack-ts --help
snowpack-ts build

We can config ts-node by edit snowpack/packages/snowpack/tsconfig.ts-node.json or by pass args to ts-node:

snowpack-ts -T -- --help

The args before -- will be pass to ts-node, agrs after -- will be pass to snowpack.

In default we enable ts-node transpileOnly option for speed up compile time( without type check ).

It will cost 2s in my mac to compile.

time snowpack-ts --help
# MacBook Pro (15-inch, 2018), 2.2 GHz Intel Core i7, 16 GB 2400 MHz DDR4
# snowpack-ts --help  2.07s user 0.10s system 152% cpu 1.429 total

Hope this tool can help we have a better dev experience.

Thanks for hard work on snowpack.

@Akimyou Akimyou requested a review from a team as a code owner August 1, 2020 10:08
@vercel
Copy link

vercel bot commented Aug 1, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/pikapkg/snowpack/5g1h3m75t
✅ Preview: https://snowpack-git-fork-akimyou-feature-use-ts-node.pikapkg.vercel.app

@Akimyou Akimyou changed the title add ts-node for dev Add ts-node for dev Aug 1, 2020
@FredKSchott
Copy link
Owner

At this time, we're only interested in maintaining a single node.js executable. Sorry we can't merge, but thanks for taking the time to look into this!

@FredKSchott FredKSchott closed this Aug 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants