Compare commits
36 Commits
Author | SHA1 | Date | |
---|---|---|---|
5c7af1e59f | |||
da48b987ba | |||
9eabac7022 | |||
00683fbab1 | |||
3434bbf815 | |||
85ac242627 | |||
9b71872d12 | |||
281595f8c8 | |||
83f03994a9 | |||
01837f8420 | |||
b5735e3721 | |||
0dc45f1414 | |||
9d1c3f7457 | |||
017279730a | |||
0b50b14146 | |||
dfa27c0604 | |||
19e839a282 | |||
647e2ec886 | |||
4e267850bf | |||
a52f6a9e9b | |||
23b0ee1472 | |||
c4d58b047c | |||
403b530a60 | |||
7d6caaafce | |||
8f47b95220 | |||
375d5cdfcc | |||
a3b1391b86 | |||
d2f5a81cfb | |||
2bc2d11a2d | |||
ecf0666103 | |||
ad05144bba | |||
1e77aba991 | |||
bb6c07845c | |||
079b049a10 | |||
94f48afbbd | |||
944e9b227c |
43
.gitlab-ci.yml
Normal file
43
.gitlab-ci.yml
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
image: hosttoday/ht-docker-node
|
||||||
|
|
||||||
|
stages:
|
||||||
|
- test
|
||||||
|
- release
|
||||||
|
- page
|
||||||
|
|
||||||
|
testLTS:
|
||||||
|
stage: test
|
||||||
|
script:
|
||||||
|
- npmci test lts
|
||||||
|
tags:
|
||||||
|
- docker
|
||||||
|
|
||||||
|
testSTABLE:
|
||||||
|
stage: test
|
||||||
|
script:
|
||||||
|
- npmci test stable
|
||||||
|
tags:
|
||||||
|
- docker
|
||||||
|
|
||||||
|
release:
|
||||||
|
stage: release
|
||||||
|
script:
|
||||||
|
- npmci publish
|
||||||
|
only:
|
||||||
|
- tags
|
||||||
|
tags:
|
||||||
|
- docker
|
||||||
|
|
||||||
|
pages:
|
||||||
|
stage: page
|
||||||
|
script:
|
||||||
|
- npmci test lts
|
||||||
|
- mkdir .public
|
||||||
|
- cp -r test/assets/docs/ .public
|
||||||
|
- cp -r test/assets/coverage/ .public
|
||||||
|
- mv .public public
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- public
|
||||||
|
only:
|
||||||
|
- master
|
@ -1,6 +1,6 @@
|
|||||||
.idea/
|
.idea/
|
||||||
support
|
compile/
|
||||||
compile
|
coverage/
|
||||||
test/
|
test/
|
||||||
docs/
|
docs/
|
||||||
examples
|
examples
|
||||||
|
7
CHANGELOG
Normal file
7
CHANGELOG
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
Please view this file on the master branch, on stable branches it's out of date.
|
||||||
|
|
||||||
|
v 6.0.0 (unreleased)
|
||||||
|
- handle bithound
|
||||||
|
- check package.json
|
||||||
|
- check .gitlab-ci-yml
|
||||||
|
- check appveyor.yml
|
4
CONTRIBUTING.md
Normal file
4
CONTRIBUTING.md
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# Contribution Guide
|
||||||
|
|
||||||
|
This module is developed on the fabulous GitLab.com:
|
||||||
|
https://gitlab.com/pushrocks/npmts
|
@ -2,8 +2,8 @@
|
|||||||
Write npm modules with TypeScript without hassle.
|
Write npm modules with TypeScript without hassle.
|
||||||
|
|
||||||
## Status
|
## Status
|
||||||
[](https://travis-ci.org/pushrocks/npmts)
|
[](https://gitlab.com/pushrocks/npmts/commits/master)
|
||||||
[](https://ci.appveyor.com/project/philkunz/npmts)
|
[](https://ci.appveyor.com/project/philkunz/npmts/branch/master)
|
||||||
[](https://david-dm.org/pushrocks/npmts)
|
[](https://david-dm.org/pushrocks/npmts)
|
||||||
[](https://www.bithound.io/github/pushrocks/npmts/master/dependencies/npm)
|
[](https://www.bithound.io/github/pushrocks/npmts/master/dependencies/npm)
|
||||||
[](https://www.bithound.io/github/pushrocks/npmts)
|
[](https://www.bithound.io/github/pushrocks/npmts)
|
||||||
@ -51,7 +51,10 @@ the npmts.json is the main config file. You can use it to customize the behaviou
|
|||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"mode":"default",
|
"mode":"default",
|
||||||
"codecov":true,
|
"codecov":{
|
||||||
|
"publish":true,
|
||||||
|
"token":"sometoken"
|
||||||
|
},
|
||||||
"ts":{
|
"ts":{
|
||||||
"./customdir/*.ts":"./"
|
"./customdir/*.ts":"./"
|
||||||
},
|
},
|
||||||
|
2
dist/index.js
vendored
2
dist/index.js
vendored
@ -1,5 +1,5 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
/// <reference path="./typings/index.d.ts" />
|
require("typings-global");
|
||||||
var early = require("early");
|
var early = require("early");
|
||||||
early.start("NPMTS");
|
early.start("NPMTS");
|
||||||
var plugins = require("./npmts.plugins");
|
var plugins = require("./npmts.plugins");
|
||||||
|
2
dist/npmts.assets.js
vendored
2
dist/npmts.assets.js
vendored
@ -1,5 +1,5 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
/// <reference path="./typings/index.d.ts" />
|
require("typings-global");
|
||||||
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");
|
||||||
|
10
dist/npmts.clean.js
vendored
10
dist/npmts.clean.js
vendored
@ -1,5 +1,5 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
/// <reference path="./typings/index.d.ts" />
|
require("typings-global");
|
||||||
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");
|
||||||
@ -8,8 +8,14 @@ var removeDist = function () {
|
|||||||
return plugins.smartfile.fsaction.remove(paths.distDir);
|
return plugins.smartfile.fsaction.remove(paths.distDir);
|
||||||
};
|
};
|
||||||
var removeTypings = function () {
|
var removeTypings = function () {
|
||||||
|
var done = plugins.Q.defer();
|
||||||
npmts_promisechain_1.npmtsOra.text("cleaning " + "typings".yellow + " folder");
|
npmts_promisechain_1.npmtsOra.text("cleaning " + "typings".yellow + " folder");
|
||||||
return plugins.smartfile.fsaction.remove(paths.typingsDir);
|
if (false) {
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
done.resolve();
|
||||||
|
}
|
||||||
|
return done.promise;
|
||||||
};
|
};
|
||||||
exports.run = function (configArg) {
|
exports.run = function (configArg) {
|
||||||
npmts_promisechain_1.npmtsOra.text("cleaning up from previous builds...");
|
npmts_promisechain_1.npmtsOra.text("cleaning up from previous builds...");
|
||||||
|
3
dist/npmts.cli.js
vendored
3
dist/npmts.cli.js
vendored
@ -1 +1,2 @@
|
|||||||
/// <reference path="./typings/index.d.ts" />
|
"use strict";
|
||||||
|
require("typings-global");
|
||||||
|
2
dist/npmts.compile.js
vendored
2
dist/npmts.compile.js
vendored
@ -1,5 +1,5 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
/// <reference path="./typings/index.d.ts" />
|
require("typings-global");
|
||||||
var plugins = require("./npmts.plugins");
|
var plugins = require("./npmts.plugins");
|
||||||
var paths = require("./npmts.paths");
|
var paths = require("./npmts.paths");
|
||||||
var helpers = require("./npmts.compile.helpers");
|
var helpers = require("./npmts.compile.helpers");
|
||||||
|
2
dist/npmts.configfile.js
vendored
2
dist/npmts.configfile.js
vendored
@ -1,5 +1,5 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
/// <reference path="./typings/index.d.ts" />
|
require("typings-global");
|
||||||
var plugins = require("./npmts.plugins");
|
var plugins = require("./npmts.plugins");
|
||||||
var paths = require("./npmts.paths");
|
var paths = require("./npmts.paths");
|
||||||
exports.run = function () {
|
exports.run = function () {
|
||||||
|
2
dist/npmts.install.js
vendored
2
dist/npmts.install.js
vendored
@ -1,5 +1,5 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
/// <reference path="./typings/index.d.ts" />
|
require("typings-global");
|
||||||
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");
|
||||||
|
2
dist/npmts.jsdoc.js
vendored
2
dist/npmts.jsdoc.js
vendored
@ -1,5 +1,5 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
/// <reference path="./typings/index.d.ts" />
|
require("typings-global");
|
||||||
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");
|
||||||
|
18
dist/npmts.options.js
vendored
18
dist/npmts.options.js
vendored
@ -1,5 +1,5 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
/// <reference path="./typings/index.d.ts" />
|
require("typings-global");
|
||||||
var plugins = require("./npmts.plugins");
|
var plugins = require("./npmts.plugins");
|
||||||
var npmts_promisechain_1 = require("./npmts.promisechain");
|
var npmts_promisechain_1 = require("./npmts.promisechain");
|
||||||
exports.isCi = function () {
|
exports.isCi = function () {
|
||||||
@ -10,8 +10,13 @@ exports.isRelease = function () {
|
|||||||
&& plugins.smartci.check.isTaggedCommit();
|
&& plugins.smartci.check.isTaggedCommit();
|
||||||
};
|
};
|
||||||
exports.doPublish = function () {
|
exports.doPublish = function () {
|
||||||
return exports.isRelease()
|
try {
|
||||||
&& plugins.smartci.get.subJobNumber() == 1;
|
return exports.isRelease()
|
||||||
|
&& plugins.smartci.get.subJobNumber() == 1;
|
||||||
|
}
|
||||||
|
catch (err) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
exports.run = function (configArg) {
|
exports.run = function (configArg) {
|
||||||
var done = plugins.Q.defer();
|
var done = plugins.Q.defer();
|
||||||
@ -36,9 +41,10 @@ exports.run = function (configArg) {
|
|||||||
: 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 + 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 codecov
|
||||||
config.codecov ? void (0) : config.codecov = true;
|
config.codecov ? void (0) : config.codecov = {};
|
||||||
exports.isCi() ? void (0) : config.codecov = false;
|
config.codecov.publish ? void (0) : config.codecov.publish = false;
|
||||||
|
exports.isCi() && (process.env.TRAVIS || config.codecov.token) ? 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 = {};
|
||||||
|
2
dist/npmts.paths.js
vendored
2
dist/npmts.paths.js
vendored
@ -1,5 +1,5 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
/// <reference path="./typings/index.d.ts" />
|
require("typings-global");
|
||||||
var plugins = require("./npmts.plugins");
|
var plugins = require("./npmts.plugins");
|
||||||
exports.cwd = plugins.smartcli.get.cwd().path;
|
exports.cwd = plugins.smartcli.get.cwd().path;
|
||||||
//Directories
|
//Directories
|
||||||
|
2
dist/npmts.plugins.js
vendored
2
dist/npmts.plugins.js
vendored
@ -1,5 +1,5 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
/// <reference path="./typings/index.d.ts" />
|
require("typings-global");
|
||||||
exports.beautylog = require("beautylog");
|
exports.beautylog = require("beautylog");
|
||||||
exports.fs = require("fs-extra");
|
exports.fs = require("fs-extra");
|
||||||
exports.gulp = require("gulp");
|
exports.gulp = require("gulp");
|
||||||
|
2
dist/npmts.promisechain.js
vendored
2
dist/npmts.promisechain.js
vendored
@ -1,5 +1,5 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
/// <reference path="./typings/index.d.ts" />
|
require("typings-global");
|
||||||
var plugins = require("./npmts.plugins");
|
var plugins = require("./npmts.plugins");
|
||||||
exports.npmtsOra = new plugins.beautylog.Ora("setting up TaskChain", "cyan");
|
exports.npmtsOra = new plugins.beautylog.Ora("setting up TaskChain", "cyan");
|
||||||
exports.npmtsOra.start();
|
exports.npmtsOra.start();
|
||||||
|
17
dist/npmts.publish.js
vendored
17
dist/npmts.publish.js
vendored
@ -1,13 +1,24 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
/// <reference path="./typings/index.d.ts" />
|
require("typings-global");
|
||||||
var plugins = require("./npmts.plugins");
|
var plugins = require("./npmts.plugins");
|
||||||
var NpmtsTests = require("./npmts.tests");
|
var paths = require("./npmts.paths");
|
||||||
var NpmtsJsdoc = require("./npmts.jsdoc");
|
var NpmtsJsdoc = require("./npmts.jsdoc");
|
||||||
|
exports.publishCoverage = function (configArg) {
|
||||||
|
var done = plugins.Q.defer();
|
||||||
|
plugins.beautylog.log("now uploading coverage data to codecov.io");
|
||||||
|
var stream = plugins.gulp.src([plugins.path.join(paths.cwd, "./coverage/lcov.info")])
|
||||||
|
.pipe(plugins.g.codecov())
|
||||||
|
.pipe(plugins.g.gFunction(function () {
|
||||||
|
plugins.beautylog.ok("Coverage data has been uploaded to codecov.io!");
|
||||||
|
done.resolve(configArg);
|
||||||
|
}, "atEnd"));
|
||||||
|
return done.promise;
|
||||||
|
};
|
||||||
exports.run = function (configArg) {
|
exports.run = function (configArg) {
|
||||||
var done = plugins.Q.defer();
|
var done = plugins.Q.defer();
|
||||||
var config = configArg;
|
var config = configArg;
|
||||||
var promiseArray = [];
|
var promiseArray = [];
|
||||||
config.codecov ? promiseArray.push(NpmtsTests.publishCoverage(configArg)) : void (0);
|
config.codecov.publish ? promiseArray.push(exports.publishCoverage(configArg)) : void (0);
|
||||||
config.docs.publish ? promiseArray.push(NpmtsJsdoc.publishDocs(configArg)) : void (0);
|
config.docs.publish ? promiseArray.push(NpmtsJsdoc.publishDocs(configArg)) : void (0);
|
||||||
promiseArray.length === 0 ? plugins.beautylog.info("Did not publish anything!") : void (0);
|
promiseArray.length === 0 ? plugins.beautylog.info("Did not publish anything!") : void (0);
|
||||||
plugins.Q.all(promiseArray).then(done.resolve);
|
plugins.Q.all(promiseArray).then(done.resolve);
|
||||||
|
13
dist/npmts.tests.js
vendored
13
dist/npmts.tests.js
vendored
@ -1,19 +1,8 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
/// <reference path="./typings/index.d.ts" />
|
require("typings-global");
|
||||||
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");
|
||||||
exports.publishCoverage = function (configArg) {
|
|
||||||
var done = plugins.Q.defer();
|
|
||||||
plugins.beautylog.log("now uploading coverage data to codecov.io");
|
|
||||||
var stream = plugins.gulp.src([plugins.path.join(paths.cwd, "./coverage/lcov.info")])
|
|
||||||
.pipe(plugins.g.codecov())
|
|
||||||
.pipe(plugins.g.gFunction(function () {
|
|
||||||
plugins.beautylog.ok("Coverage data has been uploaded to codecov.io!");
|
|
||||||
done.resolve(configArg);
|
|
||||||
}, "atEnd"));
|
|
||||||
return done.promise;
|
|
||||||
};
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @returns {*}
|
* @returns {*}
|
||||||
|
19
package.json
19
package.json
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "npmts",
|
"name": "npmts",
|
||||||
"version": "5.1.12",
|
"version": "5.1.20",
|
||||||
"description": "write npm modules with TypeScript",
|
"description": "write npm modules with TypeScript",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
@ -13,7 +13,7 @@
|
|||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git+https://github.com/pushrocks/npmts.git"
|
"url": "git+https://gitlab.com/pushrocks/npmts.git"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"TypeScript",
|
"TypeScript",
|
||||||
@ -22,11 +22,11 @@
|
|||||||
"author": "Lossless Digital UG (haftungsbeschraenkt)",
|
"author": "Lossless Digital UG (haftungsbeschraenkt)",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/pushrocks/npmts/issues"
|
"url": "https://gitlab.com/pushrocks/npmts/issues"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/pushrocks/npmts#readme",
|
"homepage": "https://gitlab.com/pushrocks/npmts#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"beautylog": "5.0.5",
|
"beautylog": "5.0.6",
|
||||||
"early": "^2.0.1",
|
"early": "^2.0.1",
|
||||||
"fs-extra": "^0.30.0",
|
"fs-extra": "^0.30.0",
|
||||||
"gulp": "3.9.1",
|
"gulp": "3.9.1",
|
||||||
@ -41,7 +41,7 @@
|
|||||||
"gulp-sourcemaps": "^2.0.0-alpha",
|
"gulp-sourcemaps": "^2.0.0-alpha",
|
||||||
"gulp-typescript": "2.13.4",
|
"gulp-typescript": "2.13.4",
|
||||||
"gulp-typings": "2.0.0",
|
"gulp-typings": "2.0.0",
|
||||||
"lodash": "^4.12.0",
|
"lodash": "^4.13.1",
|
||||||
"merge2": "1.0.2",
|
"merge2": "1.0.2",
|
||||||
"projectinfo": "1.0.1",
|
"projectinfo": "1.0.1",
|
||||||
"q": "^1.4.1",
|
"q": "^1.4.1",
|
||||||
@ -50,10 +50,11 @@
|
|||||||
"smartcli": "0.0.11",
|
"smartcli": "0.0.11",
|
||||||
"smartcov": "0.0.6",
|
"smartcov": "0.0.6",
|
||||||
"smartenv": "1.2.5",
|
"smartenv": "1.2.5",
|
||||||
"smartfile": "3.0.7",
|
"smartfile": "3.0.10",
|
||||||
"smartpath": "3.2.1",
|
"smartpath": "3.2.1",
|
||||||
"smartstring": "^1.0.3",
|
"smartstring": "^2.0.1",
|
||||||
"source-map-support": "^0.4.0"
|
"source-map-support": "^0.4.0",
|
||||||
|
"typings-global": "*"
|
||||||
},
|
},
|
||||||
"devDependencies": {}
|
"devDependencies": {}
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
"./subts2/typings.json",
|
"./subts2/typings.json",
|
||||||
"./customdir/typings.json"
|
"./customdir/typings.json"
|
||||||
],
|
],
|
||||||
"codecov":true,
|
|
||||||
"docs": {
|
"docs": {
|
||||||
"publish":true
|
"publish":true
|
||||||
},
|
},
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/// <reference path="./typings/index.d.ts" />
|
import "typings-global";
|
||||||
import * as early from "early";
|
import * as early from "early";
|
||||||
early.start("NPMTS");
|
early.start("NPMTS");
|
||||||
import * as plugins from "./npmts.plugins"
|
import * as plugins from "./npmts.plugins"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/// <reference path="./typings/index.d.ts" />
|
import "typings-global";
|
||||||
import plugins = require("./npmts.plugins");
|
import plugins = require("./npmts.plugins");
|
||||||
import paths = require("./npmts.paths");
|
import paths = require("./npmts.paths");
|
||||||
import {npmtsOra} from "./npmts.promisechain";
|
import {npmtsOra} from "./npmts.promisechain";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/// <reference path="./typings/index.d.ts" />
|
import "typings-global";
|
||||||
import plugins = require("./npmts.plugins");
|
import plugins = require("./npmts.plugins");
|
||||||
import paths = require("./npmts.paths");
|
import paths = require("./npmts.paths");
|
||||||
import {npmtsOra} from "./npmts.promisechain";
|
import {npmtsOra} from "./npmts.promisechain";
|
||||||
@ -9,8 +9,15 @@ let removeDist = function(){
|
|||||||
};
|
};
|
||||||
|
|
||||||
let removeTypings = function(){
|
let removeTypings = function(){
|
||||||
|
let done = plugins.Q.defer();
|
||||||
npmtsOra.text("cleaning " + "typings".yellow + " folder");
|
npmtsOra.text("cleaning " + "typings".yellow + " folder");
|
||||||
return plugins.smartfile.fsaction.remove(paths.typingsDir);
|
if(false){
|
||||||
|
//plugins.smartfile.fsaction.remove(paths.typingsDir)
|
||||||
|
// .then(done.resolve);
|
||||||
|
} else {
|
||||||
|
done.resolve();
|
||||||
|
}
|
||||||
|
return done.promise;
|
||||||
};
|
};
|
||||||
|
|
||||||
export let run = function(configArg){
|
export let run = function(configArg){
|
||||||
|
@ -1 +1 @@
|
|||||||
/// <reference path="./typings/index.d.ts" />
|
import "typings-global";
|
@ -1,4 +1,4 @@
|
|||||||
/// <reference path="./typings/index.d.ts" />
|
import "typings-global";
|
||||||
import plugins = require("./npmts.plugins");
|
import plugins = require("./npmts.plugins");
|
||||||
import paths = require("./npmts.paths");
|
import paths = require("./npmts.paths");
|
||||||
import helpers = require("./npmts.compile.helpers");
|
import helpers = require("./npmts.compile.helpers");
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/// <reference path="./typings/index.d.ts" />
|
import "typings-global";
|
||||||
import plugins = require("./npmts.plugins");
|
import plugins = require("./npmts.plugins");
|
||||||
import paths = require("./npmts.paths");
|
import paths = require("./npmts.paths");
|
||||||
export var run = function(){
|
export var run = function(){
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/// <reference path="./typings/index.d.ts" />
|
import "typings-global";
|
||||||
import plugins = require("./npmts.plugins");
|
import plugins = require("./npmts.plugins");
|
||||||
import paths = require("./npmts.paths");
|
import paths = require("./npmts.paths");
|
||||||
import {npmtsOra} from "./npmts.promisechain";
|
import {npmtsOra} from "./npmts.promisechain";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/// <reference path="./typings/index.d.ts" />
|
import "typings-global";
|
||||||
import plugins = require("./npmts.plugins");
|
import plugins = require("./npmts.plugins");
|
||||||
import paths = require("./npmts.paths");
|
import paths = require("./npmts.paths");
|
||||||
import {npmtsOra} from "./npmts.promisechain";
|
import {npmtsOra} from "./npmts.promisechain";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/// <reference path="./typings/index.d.ts" />
|
import "typings-global";
|
||||||
import plugins = require("./npmts.plugins");
|
import plugins = require("./npmts.plugins");
|
||||||
import {npmtsOra} from "./npmts.promisechain";
|
import {npmtsOra} from "./npmts.promisechain";
|
||||||
|
|
||||||
@ -12,8 +12,13 @@ export let isRelease = function():boolean {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export let doPublish = function():boolean {
|
export let doPublish = function():boolean {
|
||||||
return isRelease()
|
try {
|
||||||
&& plugins.smartci.get.subJobNumber() == 1;
|
return isRelease()
|
||||||
|
&& plugins.smartci.get.subJobNumber() == 1;
|
||||||
|
}
|
||||||
|
catch (err){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export var run = function(configArg){
|
export var run = function(configArg){
|
||||||
@ -44,9 +49,11 @@ export var run = function(configArg){
|
|||||||
isRelease() && doPublish() ? plugins.beautylog.info("All right: This is the first subBuild, so this one publishes COVERAGE + 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 codecov
|
||||||
config.codecov ? void(0) : config.codecov = true;
|
config.codecov ? void(0) : config.codecov = {};
|
||||||
isCi() ? void(0) : config.codecov = false;
|
config.codecov.publish ? void(0) : config.codecov.publish = false;
|
||||||
|
isCi() && (process.env.TRAVIS || config.codecov.token) ? void(0) : config.codecov = false;
|
||||||
|
|
||||||
|
|
||||||
config.coverageTreshold ? void(0) : config.coverageTreshold = 70;
|
config.coverageTreshold ? void(0) : config.coverageTreshold = 70;
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/// <reference path="./typings/index.d.ts" />
|
import "typings-global";
|
||||||
import plugins = require("./npmts.plugins");
|
import plugins = require("./npmts.plugins");
|
||||||
|
|
||||||
export let cwd = plugins.smartcli.get.cwd().path;
|
export let cwd = plugins.smartcli.get.cwd().path;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/// <reference path="./typings/index.d.ts" />
|
import "typings-global";
|
||||||
export import beautylog = require("beautylog");
|
export import beautylog = require("beautylog");
|
||||||
export let fs = require("fs-extra");
|
export let fs = require("fs-extra");
|
||||||
export let gulp = require("gulp");
|
export let gulp = require("gulp");
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/// <reference path="./typings/index.d.ts" />
|
import "typings-global";
|
||||||
import plugins = require("./npmts.plugins");
|
import plugins = require("./npmts.plugins");
|
||||||
|
|
||||||
export let npmtsOra = new plugins.beautylog.Ora("setting up TaskChain","cyan");
|
export let npmtsOra = new plugins.beautylog.Ora("setting up TaskChain","cyan");
|
||||||
|
@ -1,15 +1,25 @@
|
|||||||
/// <reference path="./typings/index.d.ts" />
|
import "typings-global";
|
||||||
import plugins = require("./npmts.plugins");
|
import plugins = require("./npmts.plugins");
|
||||||
import paths = require("./npmts.paths");
|
import paths = require("./npmts.paths");
|
||||||
import NpmtsTests = require("./npmts.tests");
|
|
||||||
import NpmtsJsdoc = require("./npmts.jsdoc");
|
import NpmtsJsdoc = require("./npmts.jsdoc");
|
||||||
|
|
||||||
|
export let publishCoverage = function(configArg){
|
||||||
|
let done = plugins.Q.defer();
|
||||||
|
plugins.beautylog.log("now uploading coverage data to codecov.io");
|
||||||
|
var stream = plugins.gulp.src([plugins.path.join(paths.cwd,"./coverage/lcov.info")])
|
||||||
|
.pipe(plugins.g.codecov())
|
||||||
|
.pipe(plugins.g.gFunction(function(){
|
||||||
|
plugins.beautylog.ok("Coverage data has been uploaded to codecov.io!");
|
||||||
|
done.resolve(configArg);
|
||||||
|
},"atEnd"));
|
||||||
|
return done.promise;
|
||||||
|
};
|
||||||
|
|
||||||
export let run = function(configArg){
|
export let run = function(configArg){
|
||||||
let done = plugins.Q.defer();
|
let done = plugins.Q.defer();
|
||||||
let config = configArg;
|
let config = configArg;
|
||||||
let promiseArray = [];
|
let promiseArray = [];
|
||||||
config.codecov ? promiseArray.push(NpmtsTests.publishCoverage(configArg)) : void(0);
|
config.codecov.publish ? promiseArray.push(publishCoverage(configArg)) : void(0);
|
||||||
config.docs.publish ? promiseArray.push(NpmtsJsdoc.publishDocs(configArg)) : void(0);
|
config.docs.publish ? promiseArray.push(NpmtsJsdoc.publishDocs(configArg)) : void(0);
|
||||||
promiseArray.length === 0 ? plugins.beautylog.info("Did not publish anything!") : void(0);
|
promiseArray.length === 0 ? plugins.beautylog.info("Did not publish anything!") : void(0);
|
||||||
|
|
||||||
|
@ -1,20 +1,8 @@
|
|||||||
/// <reference path="./typings/index.d.ts" />
|
import "typings-global";
|
||||||
import plugins = require("./npmts.plugins");
|
import plugins = require("./npmts.plugins");
|
||||||
import paths = require("./npmts.paths");
|
import paths = require("./npmts.paths");
|
||||||
import {npmtsOra} from "./npmts.promisechain";
|
import {npmtsOra} from "./npmts.promisechain";
|
||||||
|
|
||||||
export let publishCoverage = function(configArg){
|
|
||||||
let done = plugins.Q.defer();
|
|
||||||
plugins.beautylog.log("now uploading coverage data to codecov.io");
|
|
||||||
var stream = plugins.gulp.src([plugins.path.join(paths.cwd,"./coverage/lcov.info")])
|
|
||||||
.pipe(plugins.g.codecov())
|
|
||||||
.pipe(plugins.g.gFunction(function(){
|
|
||||||
plugins.beautylog.ok("Coverage data has been uploaded to codecov.io!");
|
|
||||||
done.resolve(configArg);
|
|
||||||
},"atEnd"));
|
|
||||||
return done.promise;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @returns {*}
|
* @returns {*}
|
||||||
|
Reference in New Issue
Block a user