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/)
|
||||
|
||||
### Install
|
||||
First install npmts as dev dependency:
|
||||
First install npmts globally, then install the npmts checker:
|
||||
|
||||
```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
|
||||
"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. Run Tests
|
||||
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
|
||||
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.
|
||||
|
||||
## 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:
|
||||
[](https://lossless.com/)
|
||||
|
||||
|
32
dist/index.js
vendored
32
dist/index.js
vendored
@ -8,19 +8,21 @@ early.start("NPMTS");
|
||||
var plugins = require("./npmts.plugins");
|
||||
var paths = require("./npmts.paths");
|
||||
var npmts_promisechain_1 = require("./npmts.promisechain");
|
||||
early.stop();
|
||||
var npmtsProjectInfo = new plugins.projectinfo.ProjectinfoNpm(paths.npmtsPackageRoot);
|
||||
var npmtsCli = new plugins.smartcli.Smartcli();
|
||||
npmtsCli.standardTask()
|
||||
.then(function () {
|
||||
plugins.beautylog.figletSync("NPMTS");
|
||||
plugins.beautylog.info("npmts version: " + npmtsProjectInfo.version);
|
||||
try {
|
||||
npmts_promisechain_1.promisechain();
|
||||
}
|
||||
catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
early.stop()
|
||||
.done(function () {
|
||||
var npmtsProjectInfo = new plugins.projectinfo.ProjectinfoNpm(paths.npmtsPackageRoot);
|
||||
var npmtsCli = new plugins.smartcli.Smartcli();
|
||||
npmtsCli.standardTask()
|
||||
.then(function () {
|
||||
plugins.beautylog.figletSync("NPMTS");
|
||||
plugins.beautylog.info("npmts version: " + npmtsProjectInfo.version);
|
||||
try {
|
||||
npmts_promisechain_1.promisechain();
|
||||
}
|
||||
catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
npmtsCli.addVersion(npmtsProjectInfo.version);
|
||||
npmtsCli.startParse();
|
||||
});
|
||||
npmtsCli.addVersion(npmtsProjectInfo.version);
|
||||
npmtsCli.startParse();
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "npmts",
|
||||
"version": "5.3.0",
|
||||
"version": "5.3.2",
|
||||
"description": "write npm modules with TypeScript",
|
||||
"main": "dist/index.js",
|
||||
"bin": {
|
||||
@ -28,13 +28,13 @@
|
||||
"homepage": "https://gitlab.com/pushrocks/npmts#readme",
|
||||
"dependencies": {
|
||||
"beautylog": "5.0.8",
|
||||
"early": "^2.0.7",
|
||||
"early": "^2.0.13",
|
||||
"fs-extra": "^0.30.0",
|
||||
"gulp": "3.9.1",
|
||||
"gulp-concat": "^2.6.0",
|
||||
"gulp-function": "^1.3.5",
|
||||
"gulp-function": "^1.3.6",
|
||||
"gulp-if": "^2.0.1",
|
||||
"gulp-istanbul": "^0.10.4",
|
||||
"gulp-istanbul": "^1.0.0",
|
||||
"gulp-jsdoc3": "^0.3.0",
|
||||
"gulp-mocha": "^2.2.0",
|
||||
"gulp-replace": "^0.5.4",
|
||||
|
35
ts/index.ts
35
ts/index.ts
@ -8,22 +8,23 @@ early.start("NPMTS");
|
||||
import * as plugins from "./npmts.plugins"
|
||||
import * as paths from "./npmts.paths";
|
||||
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()
|
||||
.then(() => {
|
||||
plugins.beautylog.figletSync("NPMTS");
|
||||
plugins.beautylog.info("npmts version: " + npmtsProjectInfo.version);
|
||||
try {
|
||||
promisechain();
|
||||
}
|
||||
catch(err){
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
|
||||
let npmtsCli = new plugins.smartcli.Smartcli();
|
||||
npmtsCli.standardTask()
|
||||
.then(() => {
|
||||
plugins.beautylog.figletSync("NPMTS");
|
||||
plugins.beautylog.info("npmts version: " + npmtsProjectInfo.version);
|
||||
try {
|
||||
promisechain();
|
||||
}
|
||||
catch(err){
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
|
||||
npmtsCli.addVersion(npmtsProjectInfo.version);
|
||||
npmtsCli.startParse();
|
||||
npmtsCli.addVersion(npmtsProjectInfo.version);
|
||||
npmtsCli.startParse();
|
||||
});
|
Reference in New Issue
Block a user