Compare commits

...

12 Commits

Author SHA1 Message Date
57aa38af89 5.5.7 2016-11-25 00:52:25 +01:00
12cf37f01f update messages for better feedback 2016-11-25 00:52:17 +01:00
44150f4d83 5.5.6 2016-11-25 00:36:50 +01:00
3fd755691d now catching babel errors 2016-11-25 00:36:44 +01:00
00983205ce 5.5.5 2016-11-22 18:54:56 +01:00
a0b1b1847c improve README 2016-11-22 18:54:35 +01:00
be9e98ad0c 5.5.4 2016-11-22 18:52:48 +01:00
84578e8dd0 update README 2016-11-22 18:51:51 +01:00
6d759706ac 5.5.3 2016-10-27 21:59:24 +02:00
2bd4063d22 speed bump 2016-10-27 21:59:19 +02:00
c274590184 5.5.2 2016-10-22 02:38:59 +02:00
de8992da84 fix some minor issues 2016-10-22 02:38:55 +02:00
7 changed files with 80 additions and 63 deletions

View File

@ -1,6 +1,6 @@
The MIT License (MIT)
Copyright (c) 2016 Push.Rocks
Copyright (c) 2016 Lossless GmbH
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -10,6 +10,8 @@ Write npm modules with TypeScript without hassle. TypeScript ready. Fully ES6.
## Status for master
[![build status](https://gitlab.com/pushrocks/npmts/badges/master/build.svg)](https://gitlab.com/pushrocks/npmts/commits/master)
[![coverage report](https://gitlab.com/pushrocks/npmts/badges/master/coverage.svg)](https://gitlab.com/pushrocks/npmts/commits/master)
[![npm downloads per month](https://img.shields.io/npm/dm/npmts.svg)](https://www.npmjs.com/package/npmts)
[![docker pulls](https://img.shields.io/docker/pulls/hosttoday/ht-docker-node.svg)](https://hub.docker.com/r/hosttoday/ht-docker-node/)
[![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 Code](https://www.bithound.io/github/pushrocks/npmts/badges/code.svg)](https://www.bithound.io/github/pushrocks/npmts)

View File

@ -49,7 +49,7 @@ let checkDependencies = (configArg) => {
plugins.beautylog.warn(`Watch out: unused dependency "${item}"`);
}
for (let item in unused.missing) {
plugins.beautylog.error(`unused devDependency "${item}"`);
plugins.beautylog.error(`missing dependency "${item}" in package.json`);
}
if (unused.missing.length > 0) {
plugins.beautylog.info('exiting due to missing dependencies in package.json');

60
dist/mod02/index.js vendored
View File

@ -14,32 +14,36 @@ let mocha = function (configArg) {
npmts_log_1.npmtsOra.text('Instrumentalizing and testing transpiled JS');
npmts_log_1.npmtsOra.end(); // end npmtsOra for tests.
let done = q.defer();
plugins.gulp.src([plugins.path.join(paths.cwd, 'dist/*.js')])
.pipe(plugins.gulpSourcemaps.init())
.pipe(plugins.gulpBabel({
presets: [
require.resolve('babel-preset-es2015')
]
}))
.pipe(plugins.gulpIstanbul({}))
.pipe(plugins.gulpSourcemaps.write())
.pipe(plugins.gulpInjectModules())
.on('finish', function () {
let localSmartstream = new plugins.smartstream.Smartstream([
plugins.gulp.src([plugins.path.join(paths.cwd, 'test/test.js')]),
plugins.gulpBabel({
presets: [
require.resolve('babel-preset-es2015')
]
}),
plugins.gulpInjectModules(),
plugins.gulpMocha(),
plugins.gulpIstanbul.writeReports({
dir: plugins.path.join(paths.cwd, './coverage'),
reporters: ['lcovonly', 'json', 'text', 'text-summary']
})
]);
localSmartstream.run()
let babelCoverageSmartstream = new plugins.smartstream.Smartstream([
plugins.gulp.src([plugins.path.join(paths.cwd, 'dist/*.js')]),
plugins.gulpSourcemaps.init(),
plugins.gulpBabel({
presets: [
require.resolve('babel-preset-es2015')
]
}),
plugins.gulpIstanbul({}),
plugins.gulpSourcemaps.write(),
plugins.gulpInjectModules()
]);
let localSmartstream = new plugins.smartstream.Smartstream([
plugins.gulp.src([plugins.path.join(paths.cwd, 'test/test.js')]),
plugins.gulpBabel({
presets: [
require.resolve('babel-preset-es2015')
]
}),
plugins.gulpInjectModules(),
plugins.gulpMocha(),
plugins.gulpIstanbul.writeReports({
dir: plugins.path.join(paths.cwd, './coverage'),
reporters: ['lcovonly', 'json', 'text', 'text-summary']
})
]);
babelCoverageSmartstream.run()
.then(() => {
plugins.beautylog.info('transpiled code to ES5 for use in mocha');
return localSmartstream.run()
.then(() => { done.resolve(configArg); }, (err) => {
plugins.beautylog.error('Tests failed!');
console.log(err);
@ -50,6 +54,8 @@ let mocha = function (configArg) {
process.exit(1);
}
});
}, (err) => {
console.log(err);
});
return done.promise;
};
@ -80,7 +86,7 @@ exports.run = function (configArg) {
let config = configArg;
if (config.test === true) {
npmts_log_1.npmtsOra.text('now starting tests');
plugins.beautylog.log('-------------------------------------------------------\n' +
plugins.beautylog.log('------------------------------------------------------\n' +
'*************************** TESTS: ***************************\n' +
'--------------------------------------------------------------');
mocha(config)

View File

@ -1,6 +1,6 @@
{
"name": "npmts",
"version": "5.5.1",
"version": "5.5.7",
"description": "Write npm modules with TypeScript without hassle. TypeScript ready. Fully ES6.",
"main": "dist/index.js",
"bin": {
@ -27,7 +27,7 @@
"TypeScript",
"Declaration"
],
"author": "Lossless Digital UG (haftungsbeschraenkt)",
"author": "Lossless GmbH",
"license": "MIT",
"bugs": {
"url": "https://gitlab.com/pushrocks/npmts/issues"
@ -42,7 +42,7 @@
"@types/minimatch": "^2.0.29",
"@types/q": "^0.x.x",
"@types/shelljs": "^0.3.32",
"babel-preset-es2015": "^6.16.0",
"babel-preset-es2015": "^6.18.0",
"beautylog": "6.0.0",
"depcheck": "^0.6.4",
"early": "^2.0.35",
@ -52,24 +52,24 @@
"gulp-inject-modules": "^1.0.0",
"gulp-istanbul": "^1.1.1",
"gulp-mocha": "^3.0.1",
"gulp-sourcemaps": "^2.1.1",
"gulp-sourcemaps": "^2.2.0",
"gulp-typedoc": "^2.0.0",
"lodash": "^4.16.4",
"npmextra": "^2.0.3",
"projectinfo": "1.0.3",
"projectinfo": "1.0.4",
"q": "^1.4.1",
"shelljs": "^0.7.4",
"shelljs": "^0.7.5",
"smartchok": "^1.0.2",
"smartcli": "1.0.10",
"smartcov": "1.0.0",
"smartenv": "1.2.5",
"smartfile": "4.0.24",
"smartfile": "4.1.0",
"smartpath": "3.2.5",
"smartstream": "^1.0.5",
"smartstring": "^2.0.17",
"smartsystem": "^1.0.9",
"source-map-support": "^0.4.5",
"tsn": "^2.0.11",
"tsn": "^2.0.13",
"typedoc": "^0.5.0",
"typescript": "next",
"typings-global": "^1.0.14"

View File

@ -54,7 +54,7 @@ let checkDependencies = (configArg) => {
plugins.beautylog.warn(`Watch out: unused dependency "${item}"`)
}
for (let item in unused.missing) {
plugins.beautylog.error(`unused devDependency "${item}"`)
plugins.beautylog.error(`missing dependency "${item}" in package.json`)
}
if (unused.missing.length > 0) {
plugins.beautylog.info('exiting due to missing dependencies in package.json')

View File

@ -17,33 +17,39 @@ let mocha = function (configArg: INpmtsConfig) {
npmtsOra.text('Instrumentalizing and testing transpiled JS')
npmtsOra.end() // end npmtsOra for tests.
let done = q.defer()
plugins.gulp.src([plugins.path.join(paths.cwd, 'dist/*.js')])
.pipe(plugins.gulpSourcemaps.init())
.pipe(plugins.gulpBabel({
let babelCoverageSmartstream = new plugins.smartstream.Smartstream([
plugins.gulp.src([plugins.path.join(paths.cwd, 'dist/*.js')]),
plugins.gulpSourcemaps.init(),
plugins.gulpBabel({
presets: [
require.resolve('babel-preset-es2015')
]
}))
.pipe(plugins.gulpIstanbul({
}))
.pipe(plugins.gulpSourcemaps.write())
.pipe(plugins.gulpInjectModules())
.on('finish', function () {
let localSmartstream = new plugins.smartstream.Smartstream([
plugins.gulp.src([plugins.path.join(paths.cwd, 'test/test.js')]),
plugins.gulpBabel({
presets: [
require.resolve('babel-preset-es2015')
]
}),
plugins.gulpInjectModules(),
plugins.gulpMocha(),
plugins.gulpIstanbul.writeReports({
dir: plugins.path.join(paths.cwd, './coverage'),
reporters: ['lcovonly', 'json', 'text', 'text-summary']
})
])
localSmartstream.run()
}),
plugins.gulpIstanbul({
}),
plugins.gulpSourcemaps.write(),
plugins.gulpInjectModules()
])
let localSmartstream = new plugins.smartstream.Smartstream([
plugins.gulp.src([plugins.path.join(paths.cwd, 'test/test.js')]),
plugins.gulpBabel({
presets: [
require.resolve('babel-preset-es2015')
]
}),
plugins.gulpInjectModules(),
plugins.gulpMocha(),
plugins.gulpIstanbul.writeReports({
dir: plugins.path.join(paths.cwd, './coverage'),
reporters: ['lcovonly', 'json', 'text', 'text-summary']
})
])
babelCoverageSmartstream.run()
.then(
() => {
plugins.beautylog.info('transpiled code to ES5 for use in mocha')
return localSmartstream.run()
.then(() => { done.resolve(configArg) }, (err) => {
plugins.beautylog.error('Tests failed!')
console.log(err)
@ -53,6 +59,9 @@ let mocha = function (configArg: INpmtsConfig) {
process.exit(1)
}
})
},
(err) => {
console.log(err)
})
return done.promise
}
@ -87,7 +96,7 @@ export let run = function (configArg: INpmtsConfig) {
if (config.test === true) {
npmtsOra.text('now starting tests')
plugins.beautylog.log(
'-------------------------------------------------------\n' +
'------------------------------------------------------\n' +
'*************************** TESTS: ***************************\n' +
'--------------------------------------------------------------'
)