Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
36c002581a | |||
db1cfe4746 | |||
2c254a2ecf | |||
425bc6150a | |||
b2aaa51882 | |||
8ee6623984 |
19
dist/npmts.check.js
vendored
19
dist/npmts.check.js
vendored
@ -55,18 +55,13 @@ var checkDependencies = function (configArg) {
|
|||||||
plugins.beautylog.info("exiting due to missing dependencies in package.json");
|
plugins.beautylog.info("exiting due to missing dependencies in package.json");
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
for (var _d = 0, _e = unused.using; _d < _e.length; _d++) {
|
for (var _d = 0, _e = unused.invalidFiles; _d < _e.length; _d++) {
|
||||||
var item = _e[_d];
|
var item = _e[_d];
|
||||||
console.log(item);
|
|
||||||
}
|
|
||||||
;
|
|
||||||
for (var _f = 0, _g = unused.invalidFiles; _f < _g.length; _f++) {
|
|
||||||
var item = _g[_f];
|
|
||||||
plugins.beautylog.warn("Watch out: could not parse file " + item.red);
|
plugins.beautylog.warn("Watch out: could not parse file " + item.red);
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
for (var _h = 0, _j = unused.invalidDirs; _h < _j.length; _h++) {
|
for (var _f = 0, _g = unused.invalidDirs; _f < _g.length; _f++) {
|
||||||
var item = _j[_h];
|
var item = _g[_f];
|
||||||
plugins.beautylog.warn("Watch out: could not parse directory " + item.red);
|
plugins.beautylog.warn("Watch out: could not parse directory " + item.red);
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
@ -93,11 +88,15 @@ var checkDevDependencies = function (configArg) {
|
|||||||
plugins.beautylog.log("unused devDependency " + item.red);
|
plugins.beautylog.log("unused devDependency " + item.red);
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
for (var _b = 0, _c = unused.using; _b < _c.length; _b++) {
|
for (var _b = 0, _c = unused.missing; _b < _c.length; _b++) {
|
||||||
var item = _c[_b];
|
var item = _c[_b];
|
||||||
console.log(item);
|
plugins.beautylog.error("unused devDependency " + item.red);
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
if (unused.missing.length > 0) {
|
||||||
|
plugins.beautylog.info("exiting due to missing dependencies in package.json");
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
for (var _d = 0, _e = unused.invalidFiles; _d < _e.length; _d++) {
|
for (var _d = 0, _e = unused.invalidFiles; _d < _e.length; _d++) {
|
||||||
var item = _e[_d];
|
var item = _e[_d];
|
||||||
plugins.beautylog.warn("Watch out: could not parse file " + item.red);
|
plugins.beautylog.warn("Watch out: could not parse file " + item.red);
|
||||||
|
7
dist/npmts.configfile.js
vendored
7
dist/npmts.configfile.js
vendored
@ -8,12 +8,17 @@ exports.run = function (argvArg) {
|
|||||||
npmts_promisechain_1.npmtsOra.text("looking for npmextra.json");
|
npmts_promisechain_1.npmtsOra.text("looking for npmextra.json");
|
||||||
var defaultConfig = {
|
var defaultConfig = {
|
||||||
mode: "default",
|
mode: "default",
|
||||||
notest: false
|
notest: false,
|
||||||
|
nodocs: false
|
||||||
};
|
};
|
||||||
if (argvArg.notest) {
|
if (argvArg.notest) {
|
||||||
defaultConfig.notest = true;
|
defaultConfig.notest = true;
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
if (argvArg.nodocs) {
|
||||||
|
defaultConfig.nodocs = true;
|
||||||
|
}
|
||||||
|
;
|
||||||
var config = plugins.npmextra.dataFor({
|
var config = plugins.npmextra.dataFor({
|
||||||
toolName: "npmts",
|
toolName: "npmts",
|
||||||
defaultSettings: defaultConfig,
|
defaultSettings: defaultConfig,
|
||||||
|
2
dist/npmts.tests.js
vendored
2
dist/npmts.tests.js
vendored
@ -25,7 +25,7 @@ var mocha = function (configArg) {
|
|||||||
plugins.gulp.src([plugins.path.join(paths.cwd, "test/test.js")])
|
plugins.gulp.src([plugins.path.join(paths.cwd, "test/test.js")])
|
||||||
.pipe(plugins.g.babel({
|
.pipe(plugins.g.babel({
|
||||||
presets: [
|
presets: [
|
||||||
plugins.path.join(paths.npmtsPackageRoot, "node_modules/babel-preset-es2015/index.js")
|
require.resolve("babel-preset-es2015")
|
||||||
]
|
]
|
||||||
}))
|
}))
|
||||||
.pipe(plugins.g.injectModules())
|
.pipe(plugins.g.injectModules())
|
||||||
|
12
dist/npmts.typedoc.js
vendored
12
dist/npmts.typedoc.js
vendored
@ -27,9 +27,15 @@ var genTypeDoc = function (configArg) {
|
|||||||
};
|
};
|
||||||
exports.run = function (configArg) {
|
exports.run = function (configArg) {
|
||||||
var done = plugins.Q.defer();
|
var done = plugins.Q.defer();
|
||||||
genTypeDoc(configArg)
|
if (configArg.nodocs) {
|
||||||
.then(function () {
|
|
||||||
done.resolve(configArg);
|
done.resolve(configArg);
|
||||||
});
|
}
|
||||||
|
else {
|
||||||
|
genTypeDoc(configArg)
|
||||||
|
.then(function () {
|
||||||
|
done.resolve(configArg);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
;
|
||||||
return done.promise;
|
return done.promise;
|
||||||
};
|
};
|
||||||
|
@ -1,18 +1,19 @@
|
|||||||
{
|
{
|
||||||
"name": "npmts",
|
"name": "npmts",
|
||||||
"version": "5.4.3",
|
"version": "5.4.6",
|
||||||
"description": "Write npm modules with TypeScript without hassle. TypeScript ready. Fully ES6.",
|
"description": "Write npm modules with TypeScript without hassle. TypeScript ready. Fully ES6.",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
"npmts": "dist/cli.js"
|
"npmts": "dist/cli.js"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "(npm run compile && npm run setupCheck && npm run check && npm run checkVersion && npm run checkNoTest)",
|
"test": "(npm run compile && npm run setupCheck && npm run check && npm run checkVersion && npm run checkNoTest && npm run checkNoDocs)",
|
||||||
"compile": "(rm -rf test/ && rm -r dist/ && mkdir dist/ && tsc && cp assets/cli.js dist/ )",
|
"compile": "(rm -rf test/ && rm -r dist/ && mkdir dist/ && tsc && cp assets/cli.js dist/ )",
|
||||||
"setupCheck": "(git clone https://gitlab.com/sandboxzone/sandbox-npmts.git test/)",
|
"setupCheck": "(git clone https://gitlab.com/sandboxzone/sandbox-npmts.git test/)",
|
||||||
"check": "(cd test && node ../dist/index.js)",
|
"check": "(cd test && npm install && node ../dist/index.js)",
|
||||||
"checkVersion": "(cd test/ && node ../dist/index.js -v)",
|
"checkVersion": "(cd test/ && node ../dist/index.js -v)",
|
||||||
"checkNoTest": "(cd test && node ../dist/index.js --notest)"
|
"checkNoTest": "(cd test && node ../dist/index.js --notest)",
|
||||||
|
"checkNoDocs": "(cd test && node ../dist/index.js --nodocs)"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
@ -52,9 +52,6 @@ let checkDependencies = (configArg) => {
|
|||||||
plugins.beautylog.info("exiting due to missing dependencies in package.json");
|
plugins.beautylog.info("exiting due to missing dependencies in package.json");
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
for (let item of unused.using) {
|
|
||||||
console.log(item);
|
|
||||||
};
|
|
||||||
for (let item of unused.invalidFiles) {
|
for (let item of unused.invalidFiles) {
|
||||||
plugins.beautylog.warn(`Watch out: could not parse file ${item.red}`);
|
plugins.beautylog.warn(`Watch out: could not parse file ${item.red}`);
|
||||||
};
|
};
|
||||||
@ -83,9 +80,13 @@ let checkDevDependencies = (configArg) => {
|
|||||||
for (let item of unused.devDependencies) {
|
for (let item of unused.devDependencies) {
|
||||||
plugins.beautylog.log(`unused devDependency ${item.red}`);
|
plugins.beautylog.log(`unused devDependency ${item.red}`);
|
||||||
};
|
};
|
||||||
for (let item of unused.using) {
|
for (let item of unused.missing) {
|
||||||
console.log(item);
|
plugins.beautylog.error(`unused devDependency ${item.red}`);
|
||||||
};
|
};
|
||||||
|
if (unused.missing.length > 0) {
|
||||||
|
plugins.beautylog.info("exiting due to missing dependencies in package.json");
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
for (let item of unused.invalidFiles) {
|
for (let item of unused.invalidFiles) {
|
||||||
plugins.beautylog.warn(`Watch out: could not parse file ${item.red}`);
|
plugins.beautylog.warn(`Watch out: could not parse file ${item.red}`);
|
||||||
};
|
};
|
||||||
|
@ -7,11 +7,15 @@ export var run = function(argvArg){
|
|||||||
npmtsOra.text("looking for npmextra.json");
|
npmtsOra.text("looking for npmextra.json");
|
||||||
let defaultConfig = {
|
let defaultConfig = {
|
||||||
mode: "default",
|
mode: "default",
|
||||||
notest:false
|
notest:false,
|
||||||
|
nodocs:false
|
||||||
};
|
};
|
||||||
if(argvArg.notest){
|
if(argvArg.notest){
|
||||||
defaultConfig.notest = true;
|
defaultConfig.notest = true;
|
||||||
};
|
};
|
||||||
|
if(argvArg.nodocs){
|
||||||
|
defaultConfig.nodocs = true;
|
||||||
|
};
|
||||||
let config = plugins.npmextra.dataFor({
|
let config = plugins.npmextra.dataFor({
|
||||||
toolName:"npmts",
|
toolName:"npmts",
|
||||||
defaultSettings:defaultConfig,
|
defaultSettings:defaultConfig,
|
||||||
|
@ -26,7 +26,7 @@ let mocha = function (configArg) {
|
|||||||
plugins.gulp.src([plugins.path.join(paths.cwd,"test/test.js")])
|
plugins.gulp.src([plugins.path.join(paths.cwd,"test/test.js")])
|
||||||
.pipe(plugins.g.babel({
|
.pipe(plugins.g.babel({
|
||||||
presets: [
|
presets: [
|
||||||
plugins.path.join(paths.npmtsPackageRoot,"node_modules/babel-preset-es2015/index.js")
|
require.resolve("babel-preset-es2015")
|
||||||
]
|
]
|
||||||
}))
|
}))
|
||||||
.pipe(plugins.g.injectModules())
|
.pipe(plugins.g.injectModules())
|
||||||
|
@ -1,40 +1,44 @@
|
|||||||
import "typings-global";
|
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";
|
||||||
|
|
||||||
let genTypeDoc = function(configArg){
|
let genTypeDoc = function (configArg) {
|
||||||
let done = plugins.Q.defer();
|
let done = plugins.Q.defer();
|
||||||
npmtsOra.text("now generating " + "TypeDoc documentation".yellow);
|
npmtsOra.text("now generating " + "TypeDoc documentation".yellow);
|
||||||
plugins.beautylog.log("TypeDoc Output:");
|
plugins.beautylog.log("TypeDoc Output:");
|
||||||
plugins.gulp.src(plugins.path.join(paths.tsDir,"**/*.ts"))
|
plugins.gulp.src(plugins.path.join(paths.tsDir, "**/*.ts"))
|
||||||
.pipe(plugins.g.typedoc({
|
.pipe(plugins.g.typedoc({
|
||||||
// TypeScript options (see typescript docs)
|
// TypeScript options (see typescript docs)
|
||||||
module: "commonjs",
|
module: "commonjs",
|
||||||
target: "es6",
|
target: "es6",
|
||||||
includeDeclarations: true,
|
includeDeclarations: true,
|
||||||
|
|
||||||
// Output options (see typedoc docs)
|
// Output options (see typedoc docs)
|
||||||
out: paths.docsDir,
|
out: paths.docsDir,
|
||||||
json: plugins.path.join(paths.docsDir,"file.json"),
|
json: plugins.path.join(paths.docsDir, "file.json"),
|
||||||
|
|
||||||
// TypeDoc options (see typedoc docs)
|
// TypeDoc options (see typedoc docs)
|
||||||
name: "my-project",
|
name: "my-project",
|
||||||
|
|
||||||
//theme: "default",
|
//theme: "default",
|
||||||
ignoreCompilerErrors: true,
|
ignoreCompilerErrors: true,
|
||||||
version: true,
|
version: true,
|
||||||
}))
|
}))
|
||||||
.pipe(plugins.g.gFunction(done.resolve,"atEnd"));
|
.pipe(plugins.g.gFunction(done.resolve, "atEnd"));
|
||||||
return done.promise;
|
return done.promise;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
export let run = function(configArg){
|
export let run = function (configArg) {
|
||||||
let done = plugins.Q.defer();
|
let done = plugins.Q.defer();
|
||||||
genTypeDoc(configArg)
|
if (configArg.nodocs) {
|
||||||
.then(() => {
|
done.resolve(configArg);
|
||||||
done.resolve(configArg);
|
} else {
|
||||||
});
|
genTypeDoc(configArg)
|
||||||
|
.then(() => {
|
||||||
|
done.resolve(configArg);
|
||||||
|
});
|
||||||
|
};
|
||||||
return done.promise;
|
return done.promise;
|
||||||
};
|
};
|
Reference in New Issue
Block a user