Class

core

core()

Core compiler

Constructor

# new core()

Author:

View Source src/compiler/core.ts, line 24

Methods

# static array_filter(arr)

filter array after deletion

Parameters:
Name Type Description
arr

View Source src/compiler/core.ts, line 38

# static async(callback)

return Asynchronous function (Promise)

Parameters:
Name Type Description
callback

View Source src/compiler/core.ts, line 47

# static browserify(filename)

transform *.browserify to .js

Parameters:
Name Type Description
filename

filepath

View Source src/compiler/core.ts, line 96

# static compileLESS(from, to)

Compile LESS to CSS

Parameters:
Name Type Description
from

less path file

to

to css path file

View Source src/compiler/core.ts, line 172

Example
compileLESS('src/test.less', 'dist/test.css')

# static composer(dir, type)

Composer

Parameters:
Name Type Description
dir

directory has composer.json

type

View Source src/compiler/core.ts, line 60

# static config()

config.json

View Source src/compiler/core.ts, line 31

# static filelog(file)

File Log Output Console

Parameters:
Name Type Description
file

View Source src/compiler/core.ts, line 89

# static isNode()

Is Node or CommonJS Browser

View Source src/compiler/core.ts, line 78

# static isWin()

Determine OS is windows

View Source src/compiler/core.ts, line 354

# static minCSS(file, callback)

minify css to *.min.css version

Parameters:
Name Type Default Description
file
callback null

View Source src/compiler/core.ts, line 362

# static minify_folder(folder)

Minify all js file to format *.min.js

Parameters:
Name Type Description
folder string

View Source src/compiler/core.ts, line 198

# static minJS(file)

Minify JS into *.min.js version

Parameters:
Name Type Description
file string

View Source src/compiler/core.ts, line 249

# static normalize(path) → {string|null}

format path to unix path

Parameters:
Name Type Description
path string

View Source src/compiler/core.ts, line 348

string | null

# static obfuscate(filejs)

Obfuscate Javascript

Parameters:
Name Type Description
filejs string

View Source src/compiler/core.ts, line 224

# static root() → {string}

Get root path

View Source src/compiler/core.ts, line 185

posix/unix path format

string

# static scss(filename)

Compile filename.scss to filename.css and filename.min.css

Parameters:
Name Type Description
filename

View Source src/compiler/core.ts, line 109

smart delete file

Parameters:
Name Type Description
file string

View Source src/compiler/core.ts, line 340