1.6.5 • Published 5 years ago

saber-tsmod v1.6.5

Weekly downloads
68
License
MIT
Repository
github
Last release
5 years ago

saber-tsmod

types version license github

a cli for ts dev.

publish your ts module to npm!

npm install saber-tsmod -g

Usage:

  1. init: init the project files.

  2. create <module>: create a new ts module file and its test file.

  3. create ~c <tsmod.json>: create src by a tsmod.json file.

  4. config <option>: create config file of typescript or webpack.


# create workspace
mkdir <projectFolder>

cd <projectFolder>

# init project.
saber-tsmod init

# create module and test file.
saber-tsmod create <module>
saber-tsmod create ~c

# for example:
saber-tsmod create hello

saber-tsmod create shop/shop.service
saber-tsmod create shop/shop.controller
saber-tsmod create shop/shop.module

saber-tsmod create shop/shop.service shop/shop.controller shop/shop.module

saber-tsmod create ~c tsmod.json

# create config file
# tsconfig.json
saber-tsmod config ts
# webpack.config.json
saber-tsmod config webpack

for example(tsmod.json)

[
  "users/controller.ts",
  "users/service.ts",
  "users/module.ts",
  "shop/controller.ts",
  "shop/service.ts",
  "shop/module.ts"
]

start

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

# auto compile to es5.
npm run dev

Author: saber2pr(AK-12)


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.6.5

5 years ago

1.6.4

5 years ago

1.6.3

5 years ago

1.6.2

5 years ago

1.6.1

5 years ago

1.6.0

5 years ago

1.5.9

5 years ago

1.5.8

5 years ago

1.5.7

5 years ago

1.5.6

5 years ago

1.5.5

5 years ago

1.5.4

5 years ago

1.5.3

5 years ago

1.5.2

5 years ago

1.5.1

5 years ago

1.5.0

5 years ago

1.4.9

5 years ago

1.4.8

5 years ago

1.4.7

5 years ago

1.4.6

5 years ago

1.4.5

5 years ago

1.4.4

5 years ago

1.4.3

5 years ago

1.4.2

5 years ago

1.4.1

5 years ago

1.4.0

5 years ago

1.3.9

5 years ago

1.3.8

5 years ago

1.3.7

5 years ago

1.3.6

5 years ago

1.3.5

5 years ago

1.3.4

5 years ago

1.3.3

5 years ago

1.3.2

5 years ago

1.3.1

5 years ago

1.3.0

5 years ago

1.2.9

5 years ago

1.2.8

5 years ago

1.2.7

5 years ago

1.2.6

5 years ago

1.2.5

5 years ago

1.2.4

5 years ago

1.2.3

5 years ago

1.2.2

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.9

5 years ago

1.1.8

5 years ago

1.1.7

5 years ago

1.1.6

5 years ago

1.1.5

5 years ago

1.1.4

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

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