1.0.7 • Published 5 years ago

saber-commonjs v1.0.7

Weekly downloads
3
License
ISC
Repository
github
Last release
5 years ago

saber-commonjs

version

create a bundle for commonjs, then run it in browser.

# from npm
npm install saber-commonjs -g

Usage:

  1. outFile: string, ...Files: string[]

    Files0 is main.

  2. compile with a configFile 'commonjs.json',

    for example:

{
  "outFile": "./example/dist/bundle.js",
  "main": "./example/js/main.js",
  "include": ["./example"]
}

start

# install the typescript and webpack
npm install
# auto compile to commonjs
npm start

# auto compile to es5
npm run dev

Author: saber2pr


develope and test

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!


publish

Before publish, there are some items in package.json should to be updated below:

  1. name
  2. version
  3. description
  4. repository(url)
  5. author
# if all is well, try:
npm publish
1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago