omproved readme
This commit is contained in:
parent
24f9e5e982
commit
ef314f5b2d
23
README.md
Normal file
23
README.md
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
# npmts
|
||||||
|
Write npm modules with TypeScript withour hassle.
|
||||||
|
|
||||||
|
## How to use npmts
|
||||||
|
|
||||||
|
### Install
|
||||||
|
First install npmts as dev dependency:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm install npmts --save-dev
|
||||||
|
```
|
||||||
|
|
||||||
|
Then use it in package.json's script section to trigger a build:
|
||||||
|
|
||||||
|
```json
|
||||||
|
"scripts": {
|
||||||
|
"test": "npmts"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Default behaviour
|
||||||
|
by default npmts looks in your `./ts/` directory for an `index.ts` and a `test.ts` that will compile to
|
||||||
|
./index.js and ./test.js
|
@ -10,6 +10,8 @@ var paths = {};
|
|||||||
paths.cwd = plugins.smartcli.get.cwd().path;
|
paths.cwd = plugins.smartcli.get.cwd().path;
|
||||||
paths.indexTS = plugins.path.join(paths.cwd, "ts/index.ts");
|
paths.indexTS = plugins.path.join(paths.cwd, "ts/index.ts");
|
||||||
paths.testTS = plugins.path.join(paths.cwd, "ts/test.ts");
|
paths.testTS = plugins.path.join(paths.cwd, "ts/test.ts");
|
||||||
|
|
||||||
|
|
||||||
plugins.gulp.task("indexTS", function () {
|
plugins.gulp.task("indexTS", function () {
|
||||||
plugins.gulp.src(paths.indexTS)
|
plugins.gulp.src(paths.indexTS)
|
||||||
.pipe(plugins.gulpTypeScript({
|
.pipe(plugins.gulpTypeScript({
|
||||||
|
0
ts/npmts.default.ts
Normal file
0
ts/npmts.default.ts
Normal file
Loading…
Reference in New Issue
Block a user