From f03c4a45c29d3faecdb5b83bd44cf10c91eb8c0a Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Sun, 15 Jan 2017 14:32:28 +0100 Subject: [PATCH] remove TypeDoc --- CHANGELOG | 8 +++--- dist/mod01/index.js | 46 +------------------------------- dist/mod01/mod01.plugins.d.ts | 3 --- dist/mod01/mod01.plugins.js | 4 --- dist/npmts.config.d.ts | 1 - dist/npmts.config.js | 5 ---- docs/config.md | 7 ----- docs/default.md | 1 - package.json | 30 ++++++++++----------- ts/mod01/index.ts | 49 +---------------------------------- ts/mod01/mod01.plugins.ts | 7 ----- ts/npmts.config.ts | 5 ---- 12 files changed, 19 insertions(+), 147 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index b701317..4dd255d 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,7 +1,5 @@ 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 \ No newline at end of file +v 6.0.0 (released) + - remove TypeDoc, please look at npmpage + - check package.json \ No newline at end of file diff --git a/dist/mod01/index.js b/dist/mod01/index.js index 2499c76..0292651 100644 --- a/dist/mod01/index.js +++ b/dist/mod01/index.js @@ -3,52 +3,8 @@ * This module creates TypeScript documentation * -------------------------------------------- */ const q = require("q"); -const paths = require("../npmts.paths"); -const npmts_log_1 = require("../npmts.log"); -const plugins = require("./mod01.plugins"); -const mod00_check_1 = require("../mod00/mod00.check"); -let genTypeDoc = function (configArg) { - let done = q.defer(); - npmts_log_1.npmtsOra.text('now generating ' + 'TypeDoc documentation'.yellow); - plugins.beautylog.log('TypeDoc Output:'); - let localSmartstream = new plugins.smartstream.Smartstream([ - plugins.gulp.src(plugins.path.join(paths.tsDir, '**/*.ts')), - plugins.gulpTypedoc({ - // TypeScript options (see typescript docs) - module: 'commonjs', - target: 'es6', - includeDeclarations: true, - // Output options (see typedoc docs) - out: paths.pagesApiDir, - json: plugins.path.join(paths.pagesApiDir, 'file.json'), - // TypeDoc options (see typedoc docs) - name: mod00_check_1.projectInfo.name, - readme: plugins.path.join(paths.cwd, 'README.md'), - // theme: "default", - version: true - }) - ]); - localSmartstream.run().then(() => { - plugins.beautylog.ok('TypeDoc documentation generated!'); - done.resolve(configArg); - }, (err) => { - plugins.beautylog.warn('TypeDoc documentation generation failed!'); - console.log(err); - done.resolve(configArg); - }); - return done.promise; -}; exports.run = function (configArg) { let done = q.defer(); - if (configArg.docs) { - genTypeDoc(configArg) - .then(() => { - done.resolve(configArg); - }); - } - else { - done.resolve(configArg); - } - ; + done.resolve(configArg); return done.promise; }; diff --git a/dist/mod01/mod01.plugins.d.ts b/dist/mod01/mod01.plugins.d.ts index 1291d8f..85e3c5e 100644 --- a/dist/mod01/mod01.plugins.d.ts +++ b/dist/mod01/mod01.plugins.d.ts @@ -1,4 +1 @@ export * from '../npmts.plugins'; -import * as gulp from 'gulp'; -declare let gulpTypedoc: any; -export { gulp, gulpTypedoc }; diff --git a/dist/mod01/mod01.plugins.js b/dist/mod01/mod01.plugins.js index b500bb9..0ab8f47 100644 --- a/dist/mod01/mod01.plugins.js +++ b/dist/mod01/mod01.plugins.js @@ -3,7 +3,3 @@ function __export(m) { for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; } __export(require("../npmts.plugins")); -const gulp = require("gulp"); -exports.gulp = gulp; -let gulpTypedoc = require('gulp-typedoc'); -exports.gulpTypedoc = gulpTypedoc; diff --git a/dist/npmts.config.d.ts b/dist/npmts.config.d.ts index 3570cea..0e0ad25 100644 --- a/dist/npmts.config.d.ts +++ b/dist/npmts.config.d.ts @@ -4,7 +4,6 @@ export declare type npmtsMode = 'default' | 'custom'; export interface INpmtsConfig { argv: any; coverageTreshold: number; - docs: boolean; mode: npmtsMode; test: boolean; testTs: any; diff --git a/dist/npmts.config.js b/dist/npmts.config.js index 5ba7c52..e0ea569 100644 --- a/dist/npmts.config.js +++ b/dist/npmts.config.js @@ -9,7 +9,6 @@ exports.run = function (argvArg) { let defaultConfig = { argv: undefined, coverageTreshold: 70, - docs: true, mode: 'default', test: true, testTs: {}, @@ -50,10 +49,6 @@ exports.run = function (argvArg) { config.test = false; } ; - if (config.argv.nodocs) { - config.docs = false; - } - ; if (config.argv.watch) { config.watch = true; } diff --git a/docs/config.md b/docs/config.md index f4545b8..4c66c59 100644 --- a/docs/config.md +++ b/docs/config.md @@ -20,7 +20,6 @@ with default behaviour. ```json { "mode":"custom", - "docs":false, "test":true, "npmts":{ "ts":{ @@ -38,7 +37,6 @@ with default behaviour. | key | default value | description | | --- | --- | --- | | `"mode"` | `"default"` | "default" will do default stuff and override , "custom" only does what you specify | -| `"docs"` | `true` | create docs for your module | | `"test"` | `true` | test your module | | `"ts"` | `{"./ts/*.ts":"./","./test/test.ts":"./test/"}` | allows you to define multiple ts portions | | `"tsOptions"` | `{"target":"ES5", "declaration":"true"}` | specify options for tsc | @@ -63,11 +61,6 @@ This is in line with the latest TypeScript best practices. You can then import plugins via the TypeScript `import` Syntax and tsc will pick up the declaration file automatically. -### TypeDoc -By default TypeDoc will create docs for your module in `./pages/api/` directory. -> Note: Use [npmpage](https://www.npmjs.com/package/npmpage) to build a website for the module. -It also allows you to integrate api docs with a gitbook located in `./docs/` - ## Some notes: #### Typings for third party modules that do not bundle declaration files NPMTS no longer supports typings.json. Instead use the new TypeScript 2.x approach to typings using the @types/ npm scope. diff --git a/docs/default.md b/docs/default.md index f1a47d7..f4e1efe 100644 --- a/docs/default.md +++ b/docs/default.md @@ -4,5 +4,4 @@ 1. **Clean:** Clean up from any previous builds (old js files) 1. **Check:** Check project for typings declaration in package.json, unused dependencies and missing dependencies 1. **Transpile:** Transpile TypeScript with **inline sourcemaps** and **declaration files** to ES target -1. **Documentation:** Create TypeDoc Documentation from TypeScript files 1. **Test:** Babelify ES6 to ES5 on the fly, instrumentalize ES5 JavaScript with istanbul and run tests with Mocha. \ No newline at end of file diff --git a/package.json b/package.json index 9fb412b..b6b4eb7 100644 --- a/package.json +++ b/package.json @@ -45,39 +45,37 @@ "@types/through2": "^2.0.32", "babel-preset-es2015": "^6.18.0", "beautylog": "6.0.0", - "depcheck": "^0.6.5", + "depcheck": "^0.6.7", "early": "^2.0.35", "gulp": "3.9.1", "gulp-babel": "^6.1.2", - "gulp-function": "^2.2.2", + "gulp-function": "^2.2.3", "gulp-inject-modules": "^1.0.0", "gulp-istanbul": "^1.1.1", "gulp-mocha": "^3.0.1", - "gulp-sourcemaps": "^2.2.0", - "gulp-typedoc": "^2.0.0", - "lodash": "^4.17.2", + "gulp-sourcemaps": "^2.4.0", + "lodash": "^4.17.4", "npmextra": "^2.0.3", - "projectinfo": "1.0.4", + "projectinfo": "3.0.1", "q": "^1.4.1", - "shelljs": "^0.7.5", + "shelljs": "^0.7.6", "smartchok": "^1.0.4", - "smartcli": "1.0.15", + "smartcli": "2.0.1", "smartcov": "1.0.0", "smartenv": "2.0.0", - "smartfile": "4.1.0", - "smartpath": "3.2.5", + "smartfile": "4.1.2", + "smartpath": "3.2.7", "smartstream": "^1.0.5", "smartstring": "^2.0.22", - "smartsystem": "^1.0.9", - "source-map-support": "^0.4.6", - "through2": "^2.0.1", - "tsn": "^2.0.13", - "typedoc": "^0.5.1", + "smartsystem": "^1.0.12", + "source-map-support": "^0.4.8", + "through2": "^2.0.3", + "tsn": "^2.0.14", "typescript": "next", "typings-global": "^1.0.14" }, "devDependencies": { "@types/should": "^8.1.30", - "should": "^11.1.1" + "should": "^11.1.2" } } diff --git a/ts/mod01/index.ts b/ts/mod01/index.ts index f461e94..d411663 100644 --- a/ts/mod01/index.ts +++ b/ts/mod01/index.ts @@ -9,55 +9,8 @@ import { INpmtsConfig } from '../npmts.config' import * as plugins from './mod01.plugins' - -import { projectInfo } from '../mod00/mod00.check' - -let genTypeDoc = function (configArg: INpmtsConfig) { - let done = q.defer() - npmtsOra.text('now generating ' + 'TypeDoc documentation'.yellow) - plugins.beautylog.log('TypeDoc Output:') - let localSmartstream = new plugins.smartstream.Smartstream([ - plugins.gulp.src(plugins.path.join(paths.tsDir, '**/*.ts')), - plugins.gulpTypedoc({ - // TypeScript options (see typescript docs) - module: 'commonjs', - target: 'es6', - includeDeclarations: true, - - // Output options (see typedoc docs) - out: paths.pagesApiDir, - json: plugins.path.join(paths.pagesApiDir, 'file.json'), - - // TypeDoc options (see typedoc docs) - name: projectInfo.name, - readme: plugins.path.join(paths.cwd, 'README.md'), - // theme: "default", - version: true - }) - ]) - localSmartstream.run().then( - () => { - plugins.beautylog.ok('TypeDoc documentation generated!') - done.resolve(configArg) - }, - (err) => { - plugins.beautylog.warn('TypeDoc documentation generation failed!') - console.log(err) - done.resolve(configArg) - } - ) - return done.promise -} - export let run = function (configArg: INpmtsConfig) { let done = q.defer() - if (configArg.docs) { - genTypeDoc(configArg) - .then(() => { - done.resolve(configArg) - }) - } else { - done.resolve(configArg) - }; + done.resolve(configArg) return done.promise } diff --git a/ts/mod01/mod01.plugins.ts b/ts/mod01/mod01.plugins.ts index 683ab72..c128845 100644 --- a/ts/mod01/mod01.plugins.ts +++ b/ts/mod01/mod01.plugins.ts @@ -1,9 +1,2 @@ export * from '../npmts.plugins' -import * as gulp from 'gulp' -let gulpTypedoc = require('gulp-typedoc') - -export { - gulp, - gulpTypedoc -} diff --git a/ts/npmts.config.ts b/ts/npmts.config.ts index 560b42d..244280a 100644 --- a/ts/npmts.config.ts +++ b/ts/npmts.config.ts @@ -10,7 +10,6 @@ export type npmtsMode = 'default' | 'custom' export interface INpmtsConfig { argv: any, coverageTreshold: number, - docs: boolean, mode: npmtsMode, test: boolean, testTs: any, @@ -25,7 +24,6 @@ export var run = function (argvArg) { let defaultConfig: INpmtsConfig = { argv: undefined, coverageTreshold: 70, - docs: true, mode: 'default', test: true, testTs: {}, @@ -72,9 +70,6 @@ export var run = function (argvArg) { if (config.argv.notest) { config.test = false }; - if (config.argv.nodocs) { - config.docs = false - }; if (config.argv.watch) { config.watch = true };