Compare commits

...

17 Commits

Author SHA1 Message Date
ea779add20 5.0.4 2016-04-09 11:35:42 +02:00
938a7bd872 some improvement in handling projects that do not follow npmts conventions 2016-04-09 11:35:29 +02:00
45f9674550 5.0.3 2016-04-05 00:54:19 +02:00
eae983b271 now everything working again 2016-04-05 00:54:01 +02:00
871990725d 5.0.2 2016-04-05 00:45:56 +02:00
d46bb18893 update deps 2016-04-05 00:45:50 +02:00
d8fb9747cd 5.0.1 2016-04-05 00:31:25 +02:00
53209b18a9 update des 2016-04-05 00:31:17 +02:00
3e3561f4bb 5.0.0 2016-04-04 23:19:50 +02:00
099b513e0a update deps 2016-04-04 23:19:34 +02:00
cf15c428c1 4.0.3 2016-04-04 22:58:08 +02:00
3bd876a201 update deps 2016-04-04 22:57:50 +02:00
af62f20614 4.0.2 2016-04-04 16:57:13 +02:00
69eba08b27 updated log message 2016-04-04 16:57:09 +02:00
6635265f4b added codecov badge 2016-04-02 19:36:46 +02:00
ebdda5f969 4.0.1 2016-04-02 19:22:17 +02:00
f3a24154b4 now publishing coverage every time on travis since codecov does a good job sorting anything unwanted out 2016-04-02 19:22:01 +02:00
6 changed files with 27 additions and 20 deletions

View File

@ -6,7 +6,7 @@ Write npm modules with TypeScript without hassle.
[![Dependency Status](https://david-dm.org/pushrocks/npmts.svg)](https://david-dm.org/pushrocks/npmts) [![Dependency Status](https://david-dm.org/pushrocks/npmts.svg)](https://david-dm.org/pushrocks/npmts)
[![bitHound Dependencies](https://www.bithound.io/github/pushrocks/npmts/badges/dependencies.svg)](https://www.bithound.io/github/pushrocks/npmts/master/dependencies/npm) [![bitHound Dependencies](https://www.bithound.io/github/pushrocks/npmts/badges/dependencies.svg)](https://www.bithound.io/github/pushrocks/npmts/master/dependencies/npm)
[![bitHound Code](https://www.bithound.io/github/pushrocks/npmts/badges/code.svg)](https://www.bithound.io/github/pushrocks/npmts) [![bitHound Code](https://www.bithound.io/github/pushrocks/npmts/badges/code.svg)](https://www.bithound.io/github/pushrocks/npmts)
[![Coverage Status](https://coveralls.io/repos/github/pushrocks/npmts/badge.svg?branch=master)](https://coveralls.io/github/pushrocks/npmts?branch=master) [![codecov.io](https://codecov.io/github/pushrocks/npmts/coverage.svg?branch=master)](https://codecov.io/github/pushrocks/npmts?branch=master)
## What is NPMTS? ## What is NPMTS?
NPMTS is your friend when it comes to write, test, publish and document NPM modules written in TypeScript. NPMTS is your friend when it comes to write, test, publish and document NPM modules written in TypeScript.

View File

@ -1,6 +1,9 @@
"use strict"; "use strict";
/// <reference path="./typings/main.d.ts" /> /// <reference path="./typings/main.d.ts" />
var plugins = require("./npmts.plugins"); var plugins = require("./npmts.plugins");
exports.isCi = function () {
return plugins.smartci.check.isCi();
};
exports.isRelease = function () { exports.isRelease = function () {
return plugins.smartci.check.isCi() return plugins.smartci.check.isCi()
&& plugins.smartci.check.isTaggedCommit(); && plugins.smartci.check.isTaggedCommit();
@ -28,11 +31,11 @@ exports.run = function (configArg) {
// handle state of current build // handle state of current build
exports.isRelease() ? plugins.beautylog.info("All right: This is a RELEASE build!") exports.isRelease() ? plugins.beautylog.info("All right: This is a RELEASE build!")
: plugins.beautylog.info("NOT A RELEASE build!"); : plugins.beautylog.info("NOT A RELEASE build!");
exports.isRelease() && exports.doPublish() ? plugins.beautylog.info("All right: This is the first subBuild, so this one publishes coverage and docs when tests succeed!") exports.isRelease() && exports.doPublish() ? plugins.beautylog.info("All right: This is the first subBuild, so this one publishes COVERAGE + DOCS when tests succeed!")
: plugins.beautylog.info("We are not publishing anything!"); : plugins.beautylog.info("We are not publishing anything!");
// handle coveralls // handle coveralls
config.codecov ? void (0) : config.codecov = true; config.codecov ? void (0) : config.codecov = true;
exports.doPublish() ? void (0) : config.codecov = false; exports.isCi() ? void (0) : config.codecov = false;
config.coverageTreshold ? void (0) : config.coverageTreshold = 70; config.coverageTreshold ? void (0) : config.coverageTreshold = 70;
// handle docs // handle docs
config.docs ? void (0) : config.docs = {}; config.docs ? void (0) : config.docs = {};

4
dist/npmts.tests.js vendored
View File

@ -4,11 +4,11 @@ var plugins = require("./npmts.plugins");
var paths = require("./npmts.paths"); var paths = require("./npmts.paths");
exports.publishCoverage = function (configArg) { exports.publishCoverage = function (configArg) {
var done = plugins.Q.defer(); var done = plugins.Q.defer();
plugins.beautylog.log("now uploading coverage data to coveralls"); plugins.beautylog.log("now uploading coverage data to codecov.io");
var stream = plugins.gulp.src([plugins.path.join(paths.cwd, "./coverage/lcov.info")]) var stream = plugins.gulp.src([plugins.path.join(paths.cwd, "./coverage/lcov.info")])
.pipe(plugins.g.codecov()) .pipe(plugins.g.codecov())
.pipe(plugins.g.gFunction(function () { .pipe(plugins.g.gFunction(function () {
plugins.beautylog.ok("Coverage data has been uploaded to Coveralls!"); plugins.beautylog.ok("Coverage data has been uploaded to codecov.io!");
done.resolve(configArg); done.resolve(configArg);
}, "atEnd")); }, "atEnd"));
return done.promise; return done.promise;

View File

@ -1,6 +1,6 @@
{ {
"name": "npmts", "name": "npmts",
"version": "4.0.0", "version": "5.0.4",
"description": "write npm modules with TypeScript", "description": "write npm modules with TypeScript",
"main": "dist/index.js", "main": "dist/index.js",
"bin": { "bin": {
@ -25,29 +25,29 @@
}, },
"homepage": "https://github.com/pushrocks/npmts#readme", "homepage": "https://github.com/pushrocks/npmts#readme",
"dependencies": { "dependencies": {
"beautylog": "3.1.2", "beautylog": "4.1.2",
"fs-extra": "^0.26.7", "fs-extra": "^0.26.7",
"gulp": "3.9.1", "gulp": "3.9.1",
"gulp-codecov": "^2.0.1", "gulp-codecov": "^2.0.1",
"gulp-concat": "^2.6.0", "gulp-concat": "^2.6.0",
"gulp-function": "^1.2.0", "gulp-function": "^1.3.1",
"gulp-if": "^2.0.0", "gulp-if": "^2.0.0",
"gulp-istanbul": "^0.10.3", "gulp-istanbul": "^0.10.4",
"gulp-jsdoc3": "^0.2.1", "gulp-jsdoc3": "^0.2.1",
"gulp-mocha": "^2.2.0", "gulp-mocha": "^2.2.0",
"gulp-sourcemaps": "^1.6.0", "gulp-sourcemaps": "^1.6.0",
"gulp-typescript": "2.12.1", "gulp-typescript": "2.12.2",
"gulp-typings": "1.3.0", "gulp-typings": "1.3.4",
"merge2": "1.0.1", "merge2": "1.0.2",
"projectinfo": "1.0.1", "projectinfo": "1.0.1",
"q": "^1.4.1", "q": "^1.4.1",
"shelljs": "^0.6.0", "shelljs": "^0.6.0",
"smartci": "0.0.1", "smartci": "0.0.1",
"smartcli": "0.0.11", "smartcli": "0.0.11",
"smartcov": "0.0.4", "smartcov": "0.0.6",
"smartenv": "1.2.0", "smartenv": "1.2.2",
"smartfile": "2.2.0", "smartfile": "3.0.3",
"smartpath": "3.0.3", "smartpath": "3.1.4",
"source-map-support": "^0.4.0" "source-map-support": "^0.4.0"
}, },
"devDependencies": {} "devDependencies": {}

View File

@ -1,6 +1,10 @@
/// <reference path="./typings/main.d.ts" /> /// <reference path="./typings/main.d.ts" />
import plugins = require("./npmts.plugins"); import plugins = require("./npmts.plugins");
export let isCi = function(){
return plugins.smartci.check.isCi();
};
export let isRelease = function():boolean { export let isRelease = function():boolean {
return plugins.smartci.check.isCi() return plugins.smartci.check.isCi()
&& plugins.smartci.check.isTaggedCommit(); && plugins.smartci.check.isTaggedCommit();
@ -33,12 +37,12 @@ export var run = function(configArg){
isRelease() ? plugins.beautylog.info("All right: This is a RELEASE build!") isRelease() ? plugins.beautylog.info("All right: This is a RELEASE build!")
: plugins.beautylog.info("NOT A RELEASE build!"); : plugins.beautylog.info("NOT A RELEASE build!");
isRelease() && doPublish() ? plugins.beautylog.info("All right: This is the first subBuild, so this one publishes coverage and docs when tests succeed!") isRelease() && doPublish() ? plugins.beautylog.info("All right: This is the first subBuild, so this one publishes COVERAGE + DOCS when tests succeed!")
: plugins.beautylog.info("We are not publishing anything!"); : plugins.beautylog.info("We are not publishing anything!");
// handle coveralls // handle coveralls
config.codecov ? void(0) : config.codecov = true; config.codecov ? void(0) : config.codecov = true;
doPublish() ? void(0) : config.codecov = false; isCi() ? void(0) : config.codecov = false;
config.coverageTreshold ? void(0) : config.coverageTreshold = 70; config.coverageTreshold ? void(0) : config.coverageTreshold = 70;

View File

@ -4,11 +4,11 @@ import paths = require("./npmts.paths");
export let publishCoverage = function(configArg){ export let publishCoverage = function(configArg){
let done = plugins.Q.defer(); let done = plugins.Q.defer();
plugins.beautylog.log("now uploading coverage data to coveralls"); plugins.beautylog.log("now uploading coverage data to codecov.io");
var stream = plugins.gulp.src([plugins.path.join(paths.cwd,"./coverage/lcov.info")]) var stream = plugins.gulp.src([plugins.path.join(paths.cwd,"./coverage/lcov.info")])
.pipe(plugins.g.codecov()) .pipe(plugins.g.codecov())
.pipe(plugins.g.gFunction(function(){ .pipe(plugins.g.gFunction(function(){
plugins.beautylog.ok("Coverage data has been uploaded to Coveralls!"); plugins.beautylog.ok("Coverage data has been uploaded to codecov.io!");
done.resolve(configArg); done.resolve(configArg);
},"atEnd")); },"atEnd"));
return done.promise; return done.promise;