update to support latest deps
This commit is contained in:
@ -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 {
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user