diff --git a/README.md b/README.md new file mode 100644 index 0000000..fde94d1 --- /dev/null +++ b/README.md @@ -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 \ No newline at end of file diff --git a/ts/index.js b/ts/index.js index 297f458..3e7579b 100644 --- a/ts/index.js +++ b/ts/index.js @@ -10,6 +10,8 @@ var paths = {}; paths.cwd = plugins.smartcli.get.cwd().path; paths.indexTS = plugins.path.join(paths.cwd, "ts/index.ts"); paths.testTS = plugins.path.join(paths.cwd, "ts/test.ts"); + + plugins.gulp.task("indexTS", function () { plugins.gulp.src(paths.indexTS) .pipe(plugins.gulpTypeScript({ diff --git a/ts/npmts.default.ts b/ts/npmts.default.ts new file mode 100644 index 0000000..e69de29