Skip to content

gludington/create-ts-library

 
 

Repository files navigation

create-ts-library

Build Status

This is a repo that setup the basic structure for my (and your) next typescript library. Simply fork it and start coding!

What it does

  • Use typescript compiler to compile your library into:
    • lib directory for commonjs code to consume
    • lib-esm directory for es2015 code to consume
  • Use webpack version 4 to bundle the code into:
    • bundle directory as an UMD module for others
  • Setup npm scripts for easy build
    • npm run dev to compile to above directories
    • npm run dev:watch to watch the file changes (by nodemon) and run the build script
    • npm run build to generate minimized code for publish

Useful links

Special thanks

Inspired by the awesome blog post Compiling and bundling TypeScript libraries with Webpack by Marco Botto

About

Create your next typescript library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 97.0%
  • TypeScript 3.0%