fix tsn issue
This commit is contained in:
		
							
								
								
									
										18
									
								
								dist/npmts.clean.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										18
									
								
								dist/npmts.clean.js
									
									
									
									
										vendored
									
									
								
							@@ -3,10 +3,27 @@ require("typings-global");
 | 
			
		||||
const plugins = require("./npmts.plugins");
 | 
			
		||||
const paths = require("./npmts.paths");
 | 
			
		||||
const npmts_promisechain_1 = require("./npmts.promisechain");
 | 
			
		||||
/**
 | 
			
		||||
 * removes the  dist directory which will be entirely rebuild
 | 
			
		||||
 */
 | 
			
		||||
let removeDist = function () {
 | 
			
		||||
    npmts_promisechain_1.npmtsOra.text('cleaning dist folder');
 | 
			
		||||
    return plugins.smartfile.fs.remove(paths.distDir);
 | 
			
		||||
};
 | 
			
		||||
/**
 | 
			
		||||
 * remove .d.ts files from testDirctory
 | 
			
		||||
 */
 | 
			
		||||
let removeTestDeclarations = function () {
 | 
			
		||||
    let done = plugins.q.defer();
 | 
			
		||||
    plugins.smartfile.fs.listFileTree('./test/', '**/*.d.ts').then(fileArray => {
 | 
			
		||||
        let fileArrayToRemove = plugins.smartpath.transform.toAbsolute(fileArray, process.cwd() + '//test/');
 | 
			
		||||
        plugins.smartfile.fs.removeManySync(fileArrayToRemove);
 | 
			
		||||
        done.resolve();
 | 
			
		||||
    });
 | 
			
		||||
};
 | 
			
		||||
/**
 | 
			
		||||
 * remove old pages
 | 
			
		||||
 */
 | 
			
		||||
let removePages = function () {
 | 
			
		||||
    npmts_promisechain_1.npmtsOra.text('cleaning pages folder');
 | 
			
		||||
    return plugins.smartfile.fs.remove(paths.pagesDir);
 | 
			
		||||
@@ -15,6 +32,7 @@ exports.run = function (configArg) {
 | 
			
		||||
    npmts_promisechain_1.npmtsOra.text('cleaning up from previous builds...');
 | 
			
		||||
    let done = plugins.q.defer();
 | 
			
		||||
    removeDist()
 | 
			
		||||
        .then(removeTestDeclarations)
 | 
			
		||||
        .then(removePages)
 | 
			
		||||
        .then(function () {
 | 
			
		||||
        plugins.beautylog.ok('Cleaned up from previous builds!');
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										4
									
								
								dist/npmts.options.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								dist/npmts.options.js
									
									
									
									
										vendored
									
									
								
							@@ -38,10 +38,10 @@ exports.run = function (argvArg) {
 | 
			
		||||
    // handle default mode
 | 
			
		||||
    if (config.mode === 'default') {
 | 
			
		||||
        config.ts = {
 | 
			
		||||
            ['./ts/**/*.ts']: './dist/'
 | 
			
		||||
            './ts/**/*.ts': './dist/'
 | 
			
		||||
        };
 | 
			
		||||
        config.testTs = {
 | 
			
		||||
            ['./test/test.ts']: './test/'
 | 
			
		||||
            './test/**/*.ts': './test/'
 | 
			
		||||
        };
 | 
			
		||||
    }
 | 
			
		||||
    ;
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										10
									
								
								package.json
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								package.json
									
									
									
									
									
								
							@@ -38,7 +38,7 @@
 | 
			
		||||
    "@types/minimatch": "^2.0.29",
 | 
			
		||||
    "@types/q": "^0.x.x",
 | 
			
		||||
    "@types/shelljs": "^0.3.31",
 | 
			
		||||
    "babel-preset-es2015": "^6.14.0",
 | 
			
		||||
    "babel-preset-es2015": "^6.16.0",
 | 
			
		||||
    "beautylog": "5.0.23",
 | 
			
		||||
    "depcheck": "^0.6.4",
 | 
			
		||||
    "early": "^2.0.35",
 | 
			
		||||
@@ -50,7 +50,7 @@
 | 
			
		||||
    "gulp-mocha": "^3.0.1",
 | 
			
		||||
    "gulp-sourcemaps": "^1.6.0",
 | 
			
		||||
    "gulp-typedoc": "^2.0.0",
 | 
			
		||||
    "lodash": "^4.16.1",
 | 
			
		||||
    "lodash": "^4.16.2",
 | 
			
		||||
    "npmextra": "^2.0.3",
 | 
			
		||||
    "projectinfo": "1.0.3",
 | 
			
		||||
    "q": "^1.4.1",
 | 
			
		||||
@@ -59,12 +59,12 @@
 | 
			
		||||
    "smartcli": "1.0.9",
 | 
			
		||||
    "smartcov": "1.0.0",
 | 
			
		||||
    "smartenv": "1.2.5",
 | 
			
		||||
    "smartfile": "4.0.21",
 | 
			
		||||
    "smartfile": "4.0.22",
 | 
			
		||||
    "smartpath": "3.2.2",
 | 
			
		||||
    "smartstream": "^1.0.5",
 | 
			
		||||
    "smartstring": "^2.0.17",
 | 
			
		||||
    "source-map-support": "^0.4.2",
 | 
			
		||||
    "tsn": "^2.0.3",
 | 
			
		||||
    "source-map-support": "^0.4.3",
 | 
			
		||||
    "tsn": "^2.0.4",
 | 
			
		||||
    "typedoc": "^0.4.5",
 | 
			
		||||
    "typescript": "next",
 | 
			
		||||
    "typings-global": "^1.0.14"
 | 
			
		||||
 
 | 
			
		||||
@@ -1,24 +1,43 @@
 | 
			
		||||
import 'typings-global'
 | 
			
		||||
import plugins = require('./npmts.plugins')
 | 
			
		||||
import paths = require('./npmts.paths')
 | 
			
		||||
import {npmtsOra} from './npmts.promisechain'
 | 
			
		||||
import { npmtsOra } from './npmts.promisechain'
 | 
			
		||||
 | 
			
		||||
let removeDist = function(){
 | 
			
		||||
/**
 | 
			
		||||
 * removes the  dist directory which will be entirely rebuild
 | 
			
		||||
 */
 | 
			
		||||
let removeDist = function () {
 | 
			
		||||
    npmtsOra.text('cleaning dist folder')
 | 
			
		||||
    return plugins.smartfile.fs.remove(paths.distDir)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
let removePages = function(){
 | 
			
		||||
/**
 | 
			
		||||
 * remove .d.ts files from testDirctory
 | 
			
		||||
 */
 | 
			
		||||
let removeTestDeclarations = function () {
 | 
			
		||||
    let done = plugins.q.defer()
 | 
			
		||||
    plugins.smartfile.fs.listFileTree('./test/', '**/*.d.ts').then(fileArray => {
 | 
			
		||||
        let fileArrayToRemove = plugins.smartpath.transform.toAbsolute(fileArray, process.cwd() + '//test/')
 | 
			
		||||
        plugins.smartfile.fs.removeManySync(fileArrayToRemove)
 | 
			
		||||
        done.resolve()
 | 
			
		||||
    })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * remove old pages
 | 
			
		||||
 */
 | 
			
		||||
let removePages = function () {
 | 
			
		||||
    npmtsOra.text('cleaning pages folder')
 | 
			
		||||
    return plugins.smartfile.fs.remove(paths.pagesDir)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export let run = function(configArg){
 | 
			
		||||
export let run = function (configArg) {
 | 
			
		||||
    npmtsOra.text('cleaning up from previous builds...')
 | 
			
		||||
    let done = plugins.q.defer()
 | 
			
		||||
    removeDist()
 | 
			
		||||
        .then(removeTestDeclarations)
 | 
			
		||||
        .then(removePages)
 | 
			
		||||
        .then(function(){
 | 
			
		||||
        .then(function () {
 | 
			
		||||
            plugins.beautylog.ok('Cleaned up from previous builds!')
 | 
			
		||||
            done.resolve(configArg)
 | 
			
		||||
        })
 | 
			
		||||
 
 | 
			
		||||
@@ -59,10 +59,10 @@ export var run = function (argvArg) {
 | 
			
		||||
    // handle default mode
 | 
			
		||||
    if (config.mode === 'default') {
 | 
			
		||||
        config.ts = {
 | 
			
		||||
            ['./ts/**/*.ts']: './dist/'
 | 
			
		||||
            './ts/**/*.ts': './dist/'
 | 
			
		||||
        }
 | 
			
		||||
        config.testTs = {
 | 
			
		||||
            ['./test/test.ts']: './test/'
 | 
			
		||||
            './test/**/*.ts': './test/'
 | 
			
		||||
        }
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user