it just a template for ts dev in browser and publish it to npm.
run ts in browser!
publish your ts module to npm!
git clone https://github.com/Saber2pr/saber-ts-launch-browser-npm.git
# install the typescript and webpack
npm install
# init package
npm run init
# create new module file
npm run new-mod
# auto compile to commonjs
npm start
# auto compile to es5
npm run dev
you should write ts in /src
ts -(tsc)-> commonjs -(webpack)-> es5
you should make test in /src/test
export your core in /src/index.ts!
Before publish, there are some items in package.json should to be updated below:
- name
- version
- description
- repository(url)
- author
# if all is well, try:
npm publish