Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
12199a668e | |||
82df431adf | |||
71f0a9d37f | |||
5f16cdd830 |
15
README.md
15
README.md
@ -17,13 +17,14 @@ There is a docker image available that includes npmts to make CI a breeze:
|
|||||||
[hosttoday/ht-docker-npmg on Dockerhub](https://hub.docker.com/r/hosttoday/ht-docker-npmg/)
|
[hosttoday/ht-docker-npmg on Dockerhub](https://hub.docker.com/r/hosttoday/ht-docker-npmg/)
|
||||||
|
|
||||||
### Install
|
### Install
|
||||||
First install npmts as dev dependency:
|
First install npmts globally, then install the npmts checker:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
npm install npmts --save-dev
|
npm install npmts -g # installs npmts globally
|
||||||
|
npm install npmts-g --save-dev # installs npmts-g checking tool as devDependency
|
||||||
```
|
```
|
||||||
|
|
||||||
Then use it in package.json's script section to trigger a build:
|
Then add it to your package.json's script section to trigger a build:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@ -42,8 +43,6 @@ Then use it in package.json's script section to trigger a build:
|
|||||||
1. Instrumentalize created JavaScript files with istanbul
|
1. Instrumentalize created JavaScript files with istanbul
|
||||||
1. Run Tests
|
1. Run Tests
|
||||||
1. Create Coverage report
|
1. Create Coverage report
|
||||||
1. Upload Coverage reports to codecov.io (Tests must pass, codecov.io must be activated, by default only triggers on travis)
|
|
||||||
1. Upload JsDoc Documentation to gh-pages branch on GitHub. (Tests must pass, requires GitHub Token)
|
|
||||||
|
|
||||||
#### npmts.json
|
#### npmts.json
|
||||||
the npmts.json is the main config file. You can use it to customize the behaviour of NPMTS.
|
the npmts.json is the main config file. You can use it to customize the behaviour of NPMTS.
|
||||||
@ -131,6 +130,12 @@ thanks to autogenerated source maps.
|
|||||||
|
|
||||||
> We will add more options over time.
|
> We will add more options over time.
|
||||||
|
|
||||||
|
## 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 JsDocs 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:
|
## About the authors:
|
||||||
[](https://lossless.com/)
|
[](https://lossless.com/)
|
||||||
|
|
||||||
|
14
dist/index.js
vendored
14
dist/index.js
vendored
@ -8,10 +8,11 @@ early.start("NPMTS");
|
|||||||
var plugins = require("./npmts.plugins");
|
var plugins = require("./npmts.plugins");
|
||||||
var paths = require("./npmts.paths");
|
var paths = require("./npmts.paths");
|
||||||
var npmts_promisechain_1 = require("./npmts.promisechain");
|
var npmts_promisechain_1 = require("./npmts.promisechain");
|
||||||
early.stop();
|
early.stop()
|
||||||
var npmtsProjectInfo = new plugins.projectinfo.ProjectinfoNpm(paths.npmtsPackageRoot);
|
.done(function () {
|
||||||
var npmtsCli = new plugins.smartcli.Smartcli();
|
var npmtsProjectInfo = new plugins.projectinfo.ProjectinfoNpm(paths.npmtsPackageRoot);
|
||||||
npmtsCli.standardTask()
|
var npmtsCli = new plugins.smartcli.Smartcli();
|
||||||
|
npmtsCli.standardTask()
|
||||||
.then(function () {
|
.then(function () {
|
||||||
plugins.beautylog.figletSync("NPMTS");
|
plugins.beautylog.figletSync("NPMTS");
|
||||||
plugins.beautylog.info("npmts version: " + npmtsProjectInfo.version);
|
plugins.beautylog.info("npmts version: " + npmtsProjectInfo.version);
|
||||||
@ -21,6 +22,7 @@ npmtsCli.standardTask()
|
|||||||
catch (err) {
|
catch (err) {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
npmtsCli.addVersion(npmtsProjectInfo.version);
|
||||||
|
npmtsCli.startParse();
|
||||||
});
|
});
|
||||||
npmtsCli.addVersion(npmtsProjectInfo.version);
|
|
||||||
npmtsCli.startParse();
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "npmts",
|
"name": "npmts",
|
||||||
"version": "5.3.0",
|
"version": "5.3.2",
|
||||||
"description": "write npm modules with TypeScript",
|
"description": "write npm modules with TypeScript",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
@ -28,13 +28,13 @@
|
|||||||
"homepage": "https://gitlab.com/pushrocks/npmts#readme",
|
"homepage": "https://gitlab.com/pushrocks/npmts#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"beautylog": "5.0.8",
|
"beautylog": "5.0.8",
|
||||||
"early": "^2.0.7",
|
"early": "^2.0.13",
|
||||||
"fs-extra": "^0.30.0",
|
"fs-extra": "^0.30.0",
|
||||||
"gulp": "3.9.1",
|
"gulp": "3.9.1",
|
||||||
"gulp-concat": "^2.6.0",
|
"gulp-concat": "^2.6.0",
|
||||||
"gulp-function": "^1.3.5",
|
"gulp-function": "^1.3.6",
|
||||||
"gulp-if": "^2.0.1",
|
"gulp-if": "^2.0.1",
|
||||||
"gulp-istanbul": "^0.10.4",
|
"gulp-istanbul": "^1.0.0",
|
||||||
"gulp-jsdoc3": "^0.3.0",
|
"gulp-jsdoc3": "^0.3.0",
|
||||||
"gulp-mocha": "^2.2.0",
|
"gulp-mocha": "^2.2.0",
|
||||||
"gulp-replace": "^0.5.4",
|
"gulp-replace": "^0.5.4",
|
||||||
|
15
ts/index.ts
15
ts/index.ts
@ -8,12 +8,12 @@ early.start("NPMTS");
|
|||||||
import * as plugins from "./npmts.plugins"
|
import * as plugins from "./npmts.plugins"
|
||||||
import * as paths from "./npmts.paths";
|
import * as paths from "./npmts.paths";
|
||||||
import {promisechain} from "./npmts.promisechain";
|
import {promisechain} from "./npmts.promisechain";
|
||||||
early.stop();
|
early.stop()
|
||||||
|
.done(() => {
|
||||||
|
let npmtsProjectInfo = new plugins.projectinfo.ProjectinfoNpm(paths.npmtsPackageRoot);
|
||||||
|
|
||||||
let npmtsProjectInfo = new plugins.projectinfo.ProjectinfoNpm(paths.npmtsPackageRoot);
|
let npmtsCli = new plugins.smartcli.Smartcli();
|
||||||
|
npmtsCli.standardTask()
|
||||||
let npmtsCli = new plugins.smartcli.Smartcli();
|
|
||||||
npmtsCli.standardTask()
|
|
||||||
.then(() => {
|
.then(() => {
|
||||||
plugins.beautylog.figletSync("NPMTS");
|
plugins.beautylog.figletSync("NPMTS");
|
||||||
plugins.beautylog.info("npmts version: " + npmtsProjectInfo.version);
|
plugins.beautylog.info("npmts version: " + npmtsProjectInfo.version);
|
||||||
@ -25,5 +25,6 @@ npmtsCli.standardTask()
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
npmtsCli.addVersion(npmtsProjectInfo.version);
|
npmtsCli.addVersion(npmtsProjectInfo.version);
|
||||||
npmtsCli.startParse();
|
npmtsCli.startParse();
|
||||||
|
});
|
Reference in New Issue
Block a user