Compare commits

...

8 Commits

Author SHA1 Message Date
6df449394d 5.3.11 2016-07-14 13:08:48 +02:00
27b6119bbb improve README 2016-07-14 13:08:43 +02:00
b22abef889 5.3.10 2016-07-14 13:04:11 +02:00
4d8a7a4202 Merge branch 'master' of gitlab.com:pushrocks/npmts 2016-07-14 13:03:54 +02:00
72bc08e973 5.3.9 2016-07-14 13:03:09 +02:00
430f636ae4 now using EsDoc, closes #2 2016-07-14 13:02:58 +02:00
bbc8f13ecf update docker link in README 2016-07-11 15:50:39 +02:00
a01f07f62c improve README 2016-07-11 14:46:31 +02:00
7 changed files with 45 additions and 46 deletions

View File

@ -13,7 +13,7 @@ NPMTS is your friend when it comes to write, test, publish and document NPM modu
By default NPMTS will **bundle declaration files**. As a result npm module **code completion in editors like Visual Studio Code** works.
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-node:npmts on Dockerhub](https://hub.docker.com/r/hosttoday/ht-docker-node/)
### Install
First install npmts globally, then install the npmts-g locally.
@ -40,7 +40,7 @@ Then add it to your package.json's script section to trigger a build:
1. Clean up from any previous builds (old js files)
1. Install typings
1. Transpile TypeScript with **inline sourcemaps** and **declaration files**
1. Create JsDoc Documentation
1. Create EsDoc Documentation
1. Instrumentalize created JavaScript files with istanbul
1. Run Tests
1. Create Coverage report
@ -104,7 +104,6 @@ Any errors will be shown with reference to their originating source in TypeScrip
thanks to autogenerated source maps.
## Example Usage in modules:
* [gulp-typings](https://www.npmjs.com/package/gulp-typings)
* [gulp-browser](https://www.npmjs.com/package/gulp-typings)
> We will add more options over time.
@ -112,7 +111,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 JsDocs for the module
* Use [npmpage](https://www.npmjs.com/package/npmtspage) to create a webpage from coverage reports and EsDocs 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:

30
dist/npmts.jsdoc.js vendored
View File

@ -3,26 +3,24 @@ require("typings-global");
var plugins = require("./npmts.plugins");
var paths = require("./npmts.paths");
var npmts_promisechain_1 = require("./npmts.promisechain");
var genJsdoc = function (configArg) {
var genEsDoc = function (configArg) {
var done = plugins.Q.defer();
npmts_promisechain_1.npmtsOra.text("now generating " + "JsDoc documentation".yellow);
plugins.gulp.src([
plugins.path.join(paths.cwd, "README.md"),
plugins.path.join(paths.distDir, "**/*.js")
])
.pipe(plugins.g.jsdoc3({
opts: {
destination: paths.docsDir
}
}, function () {
plugins.beautylog.ok("JsDoc documentation has been generated!");
done.resolve(configArg);
}));
npmts_promisechain_1.npmtsOra.text("now generating " + "EsDoc documentation".yellow);
plugins.beautylog.log("ESDoc Output:");
var esdocConfig = {
source: paths.distDir,
destination: paths.docsDir
};
plugins.esdoc.generate(esdocConfig, plugins.esdocPublisher);
plugins.beautylog.ok("Docs by EsDoc have been created!");
done.resolve(configArg);
return done.promise;
};
exports.run = function (configArg) {
var done = plugins.Q.defer();
genJsdoc(configArg)
.then(done.resolve);
genEsDoc(configArg)
.then(function () {
done.resolve(configArg);
});
return done.promise;
};

View File

@ -1,10 +1,11 @@
import "typings-global";
export import beautylog = require("beautylog");
export declare let esdoc: any;
export declare let esdocPublisher: any;
export declare let gulp: any;
export declare let g: {
gFunction: any;
istanbul: any;
jsdoc3: any;
mocha: any;
replace: any;
sourcemaps: any;

View File

@ -1,11 +1,12 @@
"use strict";
require("typings-global");
exports.beautylog = require("beautylog");
exports.esdoc = require("esdoc");
exports.esdocPublisher = require("esdoc/out/src/Publisher/publish");
exports.gulp = require("gulp");
exports.g = {
gFunction: require("gulp-function"),
istanbul: require("gulp-istanbul"),
jsdoc3: require("gulp-jsdoc3"),
mocha: require("gulp-mocha"),
replace: require("gulp-replace"),
sourcemaps: require("gulp-sourcemaps")

View File

@ -1,6 +1,6 @@
{
"name": "npmts",
"version": "5.3.9",
"version": "5.3.11",
"description": "write npm modules with TypeScript",
"main": "dist/index.js",
"bin": {
@ -29,11 +29,12 @@
},
"homepage": "https://gitlab.com/pushrocks/npmts#readme",
"dependencies": {
"@types/minimatch": "^2.0.22-alpha",
"@types/q": "0.0.21-alpha",
"@types/shelljs": "^0.3.21-alpha",
"beautylog": "5.0.12",
"@types/minimatch": "^2.0.27-alpha",
"@types/q": "0.0.26-alpha",
"@types/shelljs": "^0.3.26-alpha",
"beautylog": "5.0.13",
"early": "^2.0.13",
"esdoc": "^0.4.7",
"gulp": "3.9.1",
"gulp-concat": "^2.6.0",
"gulp-function": "^1.3.6",
@ -54,9 +55,9 @@
"smartenv": "1.2.5",
"smartfile": "4.0.10",
"smartpath": "3.2.2",
"smartstring": "^2.0.10",
"smartstring": "^2.0.14",
"source-map-support": "^0.4.1",
"tsn": "^1.0.5",
"tsn": "^1.0.6",
"typescript": "^2.0.0-dev.20160630",
"typings-global": "*"
},

View File

@ -3,28 +3,26 @@ import plugins = require("./npmts.plugins");
import paths = require("./npmts.paths");
import {npmtsOra} from "./npmts.promisechain";
let genJsdoc = function(configArg){
let genEsDoc = function(configArg){
let done = plugins.Q.defer();
npmtsOra.text("now generating " + "JsDoc documentation".yellow);
plugins.gulp.src([
plugins.path.join(paths.cwd,"README.md"),
plugins.path.join(paths.distDir,"**/*.js")
])
.pipe(plugins.g.jsdoc3({
opts: {
destination: paths.docsDir
}
}, function(){
plugins.beautylog.ok("JsDoc documentation has been generated!");
done.resolve(configArg)
}));
npmtsOra.text("now generating " + "EsDoc documentation".yellow);
plugins.beautylog.log("ESDoc Output:");
let esdocConfig = {
source: paths.distDir,
destination: paths.docsDir
};
plugins.esdoc.generate(esdocConfig,plugins.esdocPublisher);
plugins.beautylog.ok("Docs by EsDoc have been created!");
done.resolve(configArg);
return done.promise;
};
export let run = function(configArg){
let done = plugins.Q.defer();
genJsdoc(configArg)
.then(done.resolve);
genEsDoc(configArg)
.then(() => {
done.resolve(configArg);
});
return done.promise;
};

View File

@ -1,10 +1,11 @@
import "typings-global";
export import beautylog = require("beautylog");
export let esdoc = require("esdoc");
export let esdocPublisher = require("esdoc/out/src/Publisher/publish");
export let gulp = require("gulp");
export let g = {
gFunction: require("gulp-function"),
istanbul: require("gulp-istanbul"),
jsdoc3: require("gulp-jsdoc3"),
mocha: require("gulp-mocha"),
replace: require("gulp-replace"),
sourcemaps: require("gulp-sourcemaps")