@icreate/package
v0.0.17
Published
Ics核心打包工具类
Downloads
30
Maintainers
Keywords
Readme
Usage
npm i @icreate/package
Features
- Package:打包类
Importing library
You can import the generated bundle to use the whole library generated by this starter:
import Package from '@icreate/package'
const Package = require('@icreate/package')
Package
/**
* @description: 打包
* @param {dir} 目录
* @param {pkgFile} 包文件
*/
packageSync(dir: string, pkgFile: string): Promise<void>
/**
* @description: 合并脚本
* @param {dir} 目录
* @param {scriptFile} 脚本文件
*/
scriptSync(dir: string, scriptFile: string): Promise<void>
/**
* @description:写入数据到指定文件
* @param {file} 文件路径
* @param {data} 数据对象
*/
writeSync(file: string, data: Object): Promise<void>
/**
* @description:处理权限
* @param {routes} 路由数组
*/
permission(routes: Array<Route>): void