update to support latest deps

This commit is contained in:
2017-02-19 03:29:54 +01:00
parent 930d90345a
commit f66864d0af
16 changed files with 370 additions and 154 deletions

View File

@ -1,7 +1,7 @@
// import modules
import check = require('./smartpath.check')
import get = require('./smartpath.get')
import transform = require('./smartpath.transform')
import * as check from './smartpath.check'
import * as get from './smartpath.get'
import * as transform from './smartpath.transform'
export {

View File

@ -1,10 +1,10 @@
import 'typings-global'
import plugins = require('./smartpath.plugins')
export let isDir = function(pathArg: string){
return !isFile(pathArg)
export let isDir = function (pathArg: string) {
return !isFile(pathArg)
}
export let isFile = function(pathArg){
return /\.[a-zA-Z]*$/.test(pathArg) // checks if there is a .anything at the end
export let isFile = function (pathArg) {
return /\.[a-zA-Z]*$/.test(pathArg) // checks if there is a .anything at the end
}

View File

@ -2,14 +2,14 @@ import * as plugins from './smartpath.plugins'
import * as getMod from './smartpath.get'
export class Smartpath {
originalPath: string
type: getMod.TPathType
pathLevels: string[]
pathLevelsBackwards: string[]
constructor(pathArg: string) {
this.originalPath = pathArg
this.type = getMod.type(this.originalPath)
this.pathLevels = getMod.pathLevels(this.originalPath)
this.pathLevelsBackwards = getMod.pathLevelsBackwards(this.originalPath)
}
originalPath: string
type: getMod.TPathType
pathLevels: string[]
pathLevelsBackwards: string[]
constructor(pathArg: string) {
this.originalPath = pathArg
this.type = getMod.type(this.originalPath)
this.pathLevels = getMod.pathLevels(this.originalPath)
this.pathLevelsBackwards = getMod.pathLevelsBackwards(this.originalPath)
}
}

View File

@ -1,3 +1,8 @@
import 'typings-global'
export var home = require('home')
export import path = require('path')
let home = require('home')
import * as path from 'path'
export {
home,
path
}