1 | # gcc-min
|
2 | Just write scripts for Node.js environment, then build to use in the browsers.
|
3 |
|
4 | [![NPM](https://badge.fury.io/js/gcc-min.svg)](https://badge.fury.io/js/gcc-min)
|
5 | [![Build Status](https://travis-ci.org/ndaidong/gcc-min.svg?branch=master)](https://travis-ci.org/ndaidong/gcc-min)
|
6 | [![codecov](https://codecov.io/gh/ndaidong/gcc-min/branch/master/graph/badge.svg)](https://codecov.io/gh/ndaidong/gcc-min)
|
7 | [![Dependency Status](https://gemnasium.com/badges/github.com/ndaidong/gcc-min.svg)](https://gemnasium.com/github.com/ndaidong/gcc-min)
|
8 | [![NSP Status](https://nodesecurity.io/orgs/techpush/projects/1423652f-9450-40d0-9df6-1d54b2312441/badge)](https://nodesecurity.io/orgs/techpush/projects/1423652f-9450-40d0-9df6-1d54b2312441)
|
9 |
|
10 |
|
11 | ## Usage
|
12 |
|
13 | Install:
|
14 |
|
15 | ```
|
16 | npm install gcc-min
|
17 | ```
|
18 |
|
19 | Run command to build:
|
20 |
|
21 | ```
|
22 | gccmin --entry entryFile --name moduleName --output outputDir --package pathToPackageJSONFile
|
23 |
|
24 | // or
|
25 | gccmin -e entryFile -n moduleName -o outputDir -p pathToPackageJSONFile
|
26 | ```
|
27 |
|
28 | Or Node APIs
|
29 |
|
30 | ```
|
31 | var gccmin = require('gcc-min');
|
32 |
|
33 | gccmin(path entryFile, String moduleName, path outputDir, Object config);
|
34 |
|
35 | ```
|
36 |
|
37 | `config` is a JavaScript object which contain the meta data info to insert into the output files. It may be extracted from package.json file.
|
38 |
|
39 |
|
40 | The config object must provide the following properties:
|
41 |
|
42 | ```
|
43 | {
|
44 | name: String,
|
45 | version: String in semver format, e.g: '1.2.3'
|
46 | author: String,
|
47 | repository: Object {
|
48 | type: 'git',
|
49 | url: "https://github.com/username/reponame"
|
50 | },
|
51 | license: String
|
52 | }
|
53 |
|
54 | ```
|
55 |
|
56 |
|
57 | ## Test
|
58 |
|
59 | ```
|
60 | git clone https://github.com/ndaidong/gcc-min.git
|
61 | cd gcc-min
|
62 | npm install
|
63 | npm test
|
64 | ```
|
65 |
|
66 | # License
|
67 |
|
68 | The MIT License (MIT)
|