Compare commits

..

13 Commits

Author SHA1 Message Date
41b1fe85d6 5.4.27 2016-09-03 18:50:12 +02:00
8372c1437c fixes #8 2016-09-03 18:50:09 +02:00
aedf9f3115 5.4.26 2016-09-02 17:42:45 +02:00
25320bdf5c fix checks 2016-09-02 17:42:41 +02:00
33c83de1fb 5.4.25 2016-09-02 17:12:38 +02:00
07a56fcaca fix @types/node 2016-09-02 17:12:35 +02:00
7bc986251f 5.4.24 2016-09-02 14:11:44 +02:00
cdde7da5f9 remove travis and appveyor 2016-09-02 14:11:27 +02:00
82c00fe444 fix typedoc integration 2016-09-02 14:10:09 +02:00
93682e9ec4 5.4.23 2016-09-01 15:50:01 +02:00
d339da7e11 compile 2016-09-01 15:49:57 +02:00
8b51992959 5.4.22 2016-09-01 15:47:10 +02:00
cb3bfaf438 updated README 2016-09-01 15:46:31 +02:00
15 changed files with 62 additions and 60 deletions

View File

@ -1,15 +0,0 @@
language: node_js
node_js:
- 4.3.1
- stable
deploy:
provider: npm
email: npm@lossless.digital
api_key:
secure: k075QdAcmEdmAoVaP5vclLnZmhbZB39v85VIUMWAKXbIAU+liHrYZRlIEYfAaIUrf6sha+zAo/U/vjAN7c5ArB7J/HjCLJ3lsi2fWtaSRlYQrYX9/EhU0S+YZjRE8Jrn4hGTcce6I2mANBnEzvzlXrlKaqVvSqOqTO9nJ5aDBCGa5XT3EwlHKkRlAlL3ZOLrRg38R343E8ifZBsbn9G0e+RgDt0sic3WD8NME9lpsQ/99UZKH00duHbhF9nme5Sjdh86y01hvsaBf+CLR4gfS2IntnrCSrZbETFrsOBUyMnJZDQ3qlrjcEaiTkpJ4iSIqr+ftwGMMD6S1MxCTPqkp64UIeMz2Tg41HqoaeIg7z8cF0APv6M9ZAdWhsU43GqsMe70dK900JZpQAkQxMf/6NpPpGfZug6TwqLYSIRzvjvNrhYfuyoGfXdAxrM3SJMkIq6rwE+T/y36kZaC3CrQRyNZypNz0vW1M9HLjJUi2vO0U/CDn8tvi1p6ChrDXDfV3H2UIAMHFlAF+GrT7dMWwD+p+d8mc9gpAFEF9zMqAIJamPhwboJxoHjKQrqrq5czNm75ETL77AzfnU6CfQlG5dTIFnGId8y0ZxXvtpBruDoyC1+ZF23MYZmb+ipxQZM2oLCjNLeL3aEePc/JlSm6Gn8w3sIkZTG261F0XZxdApw=
on:
tags: true
repo: pushrocks/npmts
env:
global:
secure: kPKBMnEKoC+K5dXpl11NhuK3LSp0c0fRO60Akj3QeQBjUWnVAcF0Ht30c31y0lnJaMEzXhmUIKdR7RQnlmw5be4TYGINzY7FD3Dcv7o+HO1ZQrkpMWSu46jF6ZJer9moGjZ8e0rX8wZyB9SqsXYlwWRzqvxfOVxQfTvU3BEnJKHbhq+R5JMJ8dwLBPNTJKMWKq85KNsjo3ap0BjxdBUoRLzvrn31VOPH30BkvmLGc5YiIz5QmITll/T2wmQKYTNT2qDlEJ729B8pYa3eNlCNi89AxsLDGCmEoJAVrPsyw5g+gAyBqZ1GRULy83UJbELUq7cse3MRLMSwCAm4f0INRAuqcyiKYJ4+LHd0NwKrFQ/dQ0pvyBTbbEjNemXaakkWH7S6F03UvF+u+tiQ7C97XH0CRsseGlm36zCkAClEhtWVWA4U0Q5c6zqRAAOYOI0xquXalRKPTJe7fCYewp2eqmlp8drt8MxancyKI/ynXNoR5vGFzDTSRoPjTlaYQPmbiH4+Nd5+6Qoj94PEIqghebIPDQo3C7vWts4WGccux5b2q524UgB63hjJQA6+GQOo1q4RibouS6WScn8/tW/ZOEP+sNhDfkeiZUIjye+Q3PyzonGHefgSQ8wBbsc8LOX0cKUcEFWr14nhdQ9ZeW+hrSSF04TbM4zGJPGcKhmT2UU=

View File

@ -1,8 +1,6 @@
# npmts # npmts
Write npm modules with TypeScript without hassle. TypeScript ready. Fully ES6. Write npm modules with TypeScript without hassle. TypeScript ready. Fully ES6.
[![npm](https://push.rocks/assets/repo-header.svg)](https://push.rocks)
## Availabililty ## Availabililty
[![npm](https://push.rocks/assets/repo-button-npm.svg)](https://www.npmjs.com/package/npmts) [![npm](https://push.rocks/assets/repo-button-npm.svg)](https://www.npmjs.com/package/npmts)
[![git](https://push.rocks/assets/repo-button-git.svg)](https://gitlab.com/pushrocks/npmts) [![git](https://push.rocks/assets/repo-button-git.svg)](https://gitlab.com/pushrocks/npmts)
@ -19,10 +17,19 @@ Write npm modules with TypeScript without hassle. TypeScript ready. Fully ES6.
[![node](https://img.shields.io/badge/node->=%206.x.x-blue.svg)](https://nodejs.org/dist/latest-v6.x/docs/api/) [![node](https://img.shields.io/badge/node->=%206.x.x-blue.svg)](https://nodejs.org/dist/latest-v6.x/docs/api/)
## Introduction ## Introduction
NPMTS is your friend when it comes to write, test, publish and document NPM modules written in TypeScript. NPMTS is your friend when writing, testing, publishing and documenting npm modules written in TypeScript.
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: npmts will
1. check your dependencies and package.json
1. transpile your code with tsc,
1. document your code with typedoc,
1. test your code with mocha
1. create coverage with istanbul
This works on your machine and in CI. There is a prebuild docker image available that includes npmts to make CI a breeze:
[hosttoday/ht-docker-node:npmts on Dockerhub](https://hub.docker.com/r/hosttoday/ht-docker-node/) [hosttoday/ht-docker-node:npmts on Dockerhub](https://hub.docker.com/r/hosttoday/ht-docker-node/)
For further information read the docs. For further information read the docs.
[![npm](https://push.rocks/assets/repo-header.svg)](https://push.rocks)

View File

@ -1,10 +0,0 @@
environment:
nodejs_version: "4"
install:
- ps: Install-Product node $env:nodejs_version
- npm install
test_script:
- node --version
- npm --version
- npm test
build: off

View File

@ -1,3 +1,5 @@
/// <reference types="q" /> /// <reference types="q" />
import * as plugins from "./npmts.plugins"; import * as plugins from "./npmts.plugins";
import { ProjectinfoNpm } from "projectinfo";
export declare let projectInfo: ProjectinfoNpm;
export declare let run: (configArg: any) => plugins.Q.Promise<{}>; export declare let run: (configArg: any) => plugins.Q.Promise<{}>;

5
dist/npmts.check.js vendored
View File

@ -2,10 +2,11 @@
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");
var projectinfo_1 = require("projectinfo");
var checkProjectTypings = function (configArg) { var checkProjectTypings = function (configArg) {
var done = plugins.Q.defer(); var done = plugins.Q.defer();
var cwdProjectInfo = new plugins.projectinfo.ProjectinfoNpm(paths.cwd); exports.projectInfo = new projectinfo_1.ProjectinfoNpm(paths.cwd);
if (typeof cwdProjectInfo.packageJson.typings == "undefined") { if (typeof exports.projectInfo.packageJson.typings == "undefined") {
plugins.beautylog.error("please add typings field to package.json"); plugins.beautylog.error("please add typings field to package.json");
process.exit(1); process.exit(1);
} }

View File

@ -20,7 +20,8 @@ var compileTs = function (tsFileArrayArg, tsOptionsArg) {
var compilerOptions = { var compilerOptions = {
declaration: tsOptionsCombined.declaration, declaration: tsOptionsCombined.declaration,
module: plugins.tsn.ModuleKind[tsOptionsCombined.module], module: plugins.tsn.ModuleKind[tsOptionsCombined.module],
target: plugins.tsn.ScriptTarget[tsOptionsCombined.target] target: plugins.tsn.ScriptTarget[tsOptionsCombined.target],
exclude: "node_modules/**/*"
}; };
return compilerOptions; return compilerOptions;
}; };

View File

@ -3,6 +3,7 @@ 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");
var npmts_check_1 = require("./npmts.check");
var genTypeDoc = function (configArg) { var genTypeDoc = function (configArg) {
var done = plugins.Q.defer(); var done = plugins.Q.defer();
npmts_promisechain_1.npmtsOra.text("now generating " + "TypeDoc documentation".yellow); npmts_promisechain_1.npmtsOra.text("now generating " + "TypeDoc documentation".yellow);
@ -17,8 +18,9 @@ var genTypeDoc = function (configArg) {
out: paths.pagesApiDir, out: paths.pagesApiDir,
json: plugins.path.join(paths.pagesApiDir, "file.json"), json: plugins.path.join(paths.pagesApiDir, "file.json"),
// TypeDoc options (see typedoc docs) // TypeDoc options (see typedoc docs)
name: "my-project", name: npmts_check_1.projectInfo.name,
//theme: "default", readme: plugins.path.join(paths.cwd, "README.md"),
// theme: "default",
ignoreCompilerErrors: true, ignoreCompilerErrors: true,
version: true, version: true,
})) }))

View File

@ -1,4 +1,4 @@
# Default task execution order # Default task execution of npmts
1. **Config:** Check config in ./npmextra.json (Check out [npmextra](https://www.npmjs.com/package/npmextra)) 1. **Config:** Check config in ./npmextra.json (Check out [npmextra](https://www.npmjs.com/package/npmextra))
1. **Clean:** Clean up from any previous builds (old js files) 1. **Clean:** Clean up from any previous builds (old js files)

View File

@ -1,4 +1,4 @@
# Examples for NPMTS # Examples for npmts
## Example Usage in modules: ## Example Usage in modules:
* [gulp-browser](https://www.npmjs.com/package/gulp-browser) * [gulp-browser](https://www.npmjs.com/package/gulp-browser)

View File

@ -1,8 +1,6 @@
# npmts # npmts
Write npm modules with TypeScript without hassle. TypeScript ready. Fully ES6. Write npm modules with TypeScript without hassle. TypeScript ready. Fully ES6.
[![npm](https://push.rocks/assets/repo-header.svg)](https://push.rocks)
## Availabililty ## Availabililty
[![npm](https://push.rocks/assets/repo-button-npm.svg)](https://www.npmjs.com/package/npmts) [![npm](https://push.rocks/assets/repo-button-npm.svg)](https://www.npmjs.com/package/npmts)
[![git](https://push.rocks/assets/repo-button-git.svg)](https://gitlab.com/pushrocks/npmts) [![git](https://push.rocks/assets/repo-button-git.svg)](https://gitlab.com/pushrocks/npmts)
@ -19,10 +17,19 @@ Write npm modules with TypeScript without hassle. TypeScript ready. Fully ES6.
[![node](https://img.shields.io/badge/node->=%206.x.x-blue.svg)](https://nodejs.org/dist/latest-v6.x/docs/api/) [![node](https://img.shields.io/badge/node->=%206.x.x-blue.svg)](https://nodejs.org/dist/latest-v6.x/docs/api/)
## Introduction ## Introduction
NPMTS is your friend when it comes to write, test, publish and document NPM modules written in TypeScript. NPMTS is your friend when writing, testing, publishing and documenting npm modules written in TypeScript.
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: npmts will
1. check your dependencies and package.json
1. transpile your code with tsc,
1. document your code with typedoc,
1. test your code with mocha
1. create coverage with istanbul
This works on your machine and in CI. There is a prebuild docker image available that includes npmts to make CI a breeze:
[hosttoday/ht-docker-node:npmts on Dockerhub](https://hub.docker.com/r/hosttoday/ht-docker-node/) [hosttoday/ht-docker-node:npmts on Dockerhub](https://hub.docker.com/r/hosttoday/ht-docker-node/)
For further information read the docs. For further information read the docs.
[![npm](https://push.rocks/assets/repo-header.svg)](https://push.rocks)

View File

@ -1,4 +1,4 @@
# Install NPMTS # Install npmts
First install npmts globally, then install the npmts-g locally. First install npmts globally, then install the npmts-g locally.
> **npmts-g* checks if the global version of npmts suffices the modules requirements. > **npmts-g* checks if the global version of npmts suffices the modules requirements.

View File

@ -1,6 +1,6 @@
{ {
"name": "npmts", "name": "npmts",
"version": "5.4.21", "version": "5.4.27",
"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": {
@ -32,19 +32,19 @@
}, },
"homepage": "https://gitlab.com/pushrocks/npmts#readme", "homepage": "https://gitlab.com/pushrocks/npmts#readme",
"dependencies": { "dependencies": {
"@types/gulp": "^3.8.30", "@types/gulp": "^3.8.31",
"@types/minimatch": "^2.0.28", "@types/minimatch": "^2.0.28",
"@types/q": "^0.x.x", "@types/q": "^0.x.x",
"@types/shelljs": "^0.3.29", "@types/shelljs": "^0.3.30",
"babel-preset-es2015": "^6.13.2", "babel-preset-es2015": "^6.14.0",
"beautylog": "5.0.20", "beautylog": "5.0.22",
"depcheck": "^0.6.4", "depcheck": "^0.6.4",
"early": "^2.0.25", "early": "^2.0.26",
"gulp": "3.9.1", "gulp": "3.9.1",
"gulp-babel": "^6.1.2", "gulp-babel": "^6.1.2",
"gulp-function": "^1.3.6", "gulp-function": "^1.3.6",
"gulp-inject-modules": "^1.0.0", "gulp-inject-modules": "^1.0.0",
"gulp-istanbul": "^1.1.0", "gulp-istanbul": "^1.1.1",
"gulp-mocha": "^3.0.1", "gulp-mocha": "^3.0.1",
"gulp-sourcemaps": "^1.6.0", "gulp-sourcemaps": "^1.6.0",
"gulp-typedoc": "^2.0.0", "gulp-typedoc": "^2.0.0",
@ -52,18 +52,18 @@
"npmextra": "^1.0.9", "npmextra": "^1.0.9",
"projectinfo": "1.0.3", "projectinfo": "1.0.3",
"q": "^1.4.1", "q": "^1.4.1",
"shelljs": "^0.7.3", "shelljs": "^0.7.4",
"smartcli": "1.0.4", "smartcli": "1.0.5",
"smartcov": "1.0.0", "smartcov": "1.0.0",
"smartenv": "1.2.5", "smartenv": "1.2.5",
"smartfile": "4.0.13", "smartfile": "4.0.15",
"smartpath": "3.2.2", "smartpath": "3.2.2",
"smartstring": "^2.0.17", "smartstring": "^2.0.17",
"source-map-support": "^0.4.2", "source-map-support": "^0.4.2",
"tsn": "^1.0.12", "tsn": "^1.0.12",
"typedoc": "^0.4.5", "typedoc": "^0.4.5",
"typescript": "next", "typescript": "next",
"typings-global": "*" "typings-global": "^1.0.14"
}, },
"devDependencies": {} "devDependencies": {}
} }

View File

@ -2,10 +2,14 @@ import * as plugins from "./npmts.plugins";
import * as paths from "./npmts.paths"; import * as paths from "./npmts.paths";
import { npmtsOra } from "./npmts.promisechain"; import { npmtsOra } from "./npmts.promisechain";
import {ProjectinfoNpm} from "projectinfo";
export let projectInfo:ProjectinfoNpm;
let checkProjectTypings = (configArg) => { let checkProjectTypings = (configArg) => {
let done = plugins.Q.defer(); let done = plugins.Q.defer();
let cwdProjectInfo = new plugins.projectinfo.ProjectinfoNpm(paths.cwd); projectInfo = new ProjectinfoNpm(paths.cwd);
if(typeof cwdProjectInfo.packageJson.typings == "undefined"){ if(typeof projectInfo.packageJson.typings == "undefined"){
plugins.beautylog.error(`please add typings field to package.json`); plugins.beautylog.error(`please add typings field to package.json`);
process.exit(1); process.exit(1);
}; };

View File

@ -22,7 +22,8 @@ let compileTs = (tsFileArrayArg:string[],tsOptionsArg = {}) => {
let compilerOptions:plugins.tsn.CompilerOptions = { let compilerOptions:plugins.tsn.CompilerOptions = {
declaration: tsOptionsCombined.declaration, declaration: tsOptionsCombined.declaration,
module: plugins.tsn.ModuleKind[tsOptionsCombined.module], module: plugins.tsn.ModuleKind[tsOptionsCombined.module],
target: plugins.tsn.ScriptTarget[tsOptionsCombined.target] target: plugins.tsn.ScriptTarget[tsOptionsCombined.target],
exclude: "node_modules/**/*"
}; };
return compilerOptions; return compilerOptions;
}; };

View File

@ -3,6 +3,8 @@ 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";
import {projectInfo} from "./npmts.check";
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);
@ -19,9 +21,9 @@ let genTypeDoc = function (configArg) {
json: plugins.path.join(paths.pagesApiDir, "file.json"), json: plugins.path.join(paths.pagesApiDir, "file.json"),
// TypeDoc options (see typedoc docs) // TypeDoc options (see typedoc docs)
name: "my-project", name: projectInfo.name,
readme: plugins.path.join(paths.cwd,"README.md"),
//theme: "default", // theme: "default",
ignoreCompilerErrors: true, ignoreCompilerErrors: true,
version: true, version: true,
})) }))