From a3077f7800032d3b8c916095b0ec9cb4e47882eb Mon Sep 17 00:00:00 2001 From: PhilKunz Date: Sat, 16 Jul 2016 23:33:10 +0200 Subject: [PATCH] improve README --- README.md | 37 ++++++++++++++++++------------------- dist/npmts.tests.js | 2 +- ts/npmts.tests.ts | 2 +- 3 files changed, 20 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 99c09c5..6b6cc9a 100644 --- a/README.md +++ b/README.md @@ -36,29 +36,28 @@ Then add it to your package.json's script section to trigger a build: ### Default task execution order -1. Check config in ./npmts.json +1. Check config in ./npmextra.json (Check out [npmextra](https://www.npmjs.com/package/npmextra)) 1. Clean up from any previous builds (old js files) -1. Install typings -1. Transpile TypeScript with **inline sourcemaps** and **declaration files** -1. Create EsDoc Documentation -1. Instrumentalize created JavaScript files with istanbul -1. Run Tests -1. Create Coverage report +1. Transpile TypeScript with **inline sourcemaps** and **declaration files** to ES6 +1. Create TypeDoc Documentation from TypeScript files +1. Instrumentalize transpiled ES6 JavaScript with istanbul and run tests with Mocha -#### npmts.json -the npmts.json is the main config file. You can use it to customize the behaviour of NPMTS. +#### npmtsextra.json +the npmts section in npmtsextra.json can be used to configure npmts. ```json { - "mode":"default", - "ts":{ - "./customdir/*.ts":"./" - }, - "tsOptions":{ - "declaration":false, - "target":"ES6" - }, - "cli":true + "npmts":{ + "mode":"default", + "ts":{ + "./customdir/*.ts":"./" + }, + "tsOptions":{ + "declaration":false, + "target":"ES6" + }, + "cli":true + } } ``` @@ -111,7 +110,7 @@ thanks to autogenerated source maps. ## Tips and tricks: * Use [npmts-g](https://www.npmjs.com/package/npmts-g) to use globally installed npmts and install npmts locally if no global npmts is available. -* Use [npmpage](https://www.npmjs.com/package/npmtspage) to create a webpage from coverage reports and EsDocs for the module +* Use [npmpage](https://www.npmjs.com/package/npmtspage) to create a webpage from coverage reports and TypeDoc for the module * Use [hosttoday/ht-docker-node:npmts](https://hub.docker.com/r/hosttoday/ht-docker-node/) for speedy CI builds ## About the authors: diff --git a/dist/npmts.tests.js b/dist/npmts.tests.js index bcfb559..adaa669 100644 --- a/dist/npmts.tests.js +++ b/dist/npmts.tests.js @@ -15,7 +15,7 @@ var mocha = function (configArg) { .pipe(plugins.g.sourcemaps.init()) .pipe(plugins.g.babel({ presets: [ - plugins.path.join(paths.npmtsPackageRoot, "node_modules/babel-preset-es2015/index.js") + require.resolve("babel-preset-es2015") ] })) .pipe(plugins.g.istanbul({})) diff --git a/ts/npmts.tests.ts b/ts/npmts.tests.ts index 4b9be3a..e72f219 100644 --- a/ts/npmts.tests.ts +++ b/ts/npmts.tests.ts @@ -15,7 +15,7 @@ let mocha = function (configArg) { .pipe(plugins.g.sourcemaps.init()) .pipe(plugins.g.babel({ presets: [ - plugins.path.join(paths.npmtsPackageRoot,"node_modules/babel-preset-es2015/index.js") + require.resolve("babel-preset-es2015") ] })) .pipe(plugins.g.istanbul({