Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
1dc8b1aeec | |||
a0c83c8f48 |
25
README.md
25
README.md
@ -120,30 +120,13 @@ npmts looks for `.test/test.ts` which will be transpiled to test.js and run with
|
|||||||
Any errors will be shown with reference to their originating source in TypeScript
|
Any errors will be shown with reference to their originating source in TypeScript
|
||||||
thanks to autogenerated source maps.
|
thanks to autogenerated source maps.
|
||||||
|
|
||||||
|
## Example Usage in modules:
|
||||||
### Custom behaviour
|
[gulp-typings](https://www.npmjs.com/package/gulp-typings)
|
||||||
Custom behaviour can be achieved through the npmts.json config file at the root of your package.
|
[gulp-browser](https://www.npmjs.com/package/gulp-typings)
|
||||||
The file must be named **npmts.json**
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"mode":"custom",
|
|
||||||
"ts":{
|
|
||||||
"./customdir/custom.ts":"./customcompiled.js"
|
|
||||||
},
|
|
||||||
"typings":[
|
|
||||||
"./customdir"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
* **mode** can be "default" or "custom"
|
|
||||||
* **ts** You can list as many TypeScript files as you like. The key represents the source TypeScript file, the value the output file.
|
|
||||||
* **typings** is an array of all direcories that have a typings.json present. Uses the new typings tool from npm.
|
|
||||||
|
|
||||||
> We will add more options over time.
|
> We will add more options over time.
|
||||||
|
|
||||||
### About the authors:
|
## About the authors:
|
||||||
[](https://lossless.com/)
|
[](https://lossless.com/)
|
||||||
|
|
||||||
[](https://paypal.me/lossless)
|
[](https://paypal.me/lossless)
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "npmts",
|
"name": "npmts",
|
||||||
"version": "5.1.2",
|
"version": "5.1.3",
|
||||||
"description": "write npm modules with TypeScript",
|
"description": "write npm modules with TypeScript",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
|
Reference in New Issue
Block a user