gcc-min

2019-05-22 admin

gcc-min是什么

什么是gcc-min,Just write scripts for Node.js environment, then build to use in the browsers

gcc-min使用教程帮助文档

gcc-min

Just write scripts for Node.js environment, then build to use in the browsers.

NPM Build Status

Usage

Install:

npm install gcc-min

Run command to build:

gccmin --entry entryFile --name moduleName --file fileName --output outputDir --package pathToPackageJSONFile

// or
gccmin -e entryFile -n moduleName -f fileName -o outputDir -p pathToPackageJSONFile

Or Node APIs

const gccmin = require('gcc-min');

gccmin(path entryFile, String moduleName, String fileName, path outputDir, Object config);

In which:

  • entryFile: path to entry file that will be processed by Rollup
  • moduleName: name of module, to be accessible from global scope
  • fileName: name of file will be generated, if not specify, it’s the same as moduleName
  • outputDir: location to save generated files to
  • config: a JavaScript object which contain the meta data info to insert into the output files. It may be extracted from package.json file.

The config object must provide the following properties:

{
  name: String,
  version: String in semver format, e.g: '1.2.3'
  author: String,
  repository: Object {
    type: 'git',
    url: "https://github.com/username/reponame"
  },
  license: String
}

Test

git clone https://github.com/ndaidong/gcc-min.git
cd gcc-min
npm install
npm test

License

The MIT License (MIT)

本站文章除注明转载外,均为本站原创或编译。欢迎任何形式的转载,但请务必注明出处。

转载请注明:文章转载自 JavaScript中文网 [https://www.javascriptcn.com]

本文地址:https://www.javascriptcn.com/read-65474.html

文章标题:gcc-min

回到顶部