https://github.com/gaowhen/gon
Not meer another f2e build tool
https://github.com/gaowhen/gon
dev-tool f2e gulp proxy-server webpack
Last synced: 21 days ago
JSON representation
Not meer another f2e build tool
- Host: GitHub
- URL: https://github.com/gaowhen/gon
- Owner: gaowhen
- License: mit
- Created: 2016-11-16T06:55:10.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2024-05-24T15:07:21.000Z (almost 2 years ago)
- Last Synced: 2025-08-19T22:10:45.373Z (7 months ago)
- Topics: dev-tool, f2e, gulp, proxy-server, webpack
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/Gon
- Size: 2.88 MB
- Stars: 13
- Watchers: 1
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Gon
Not meer another f2e build tool.




### Installation
`npm install -g Gon`
### Usage
#### Gon create [Project's Name]
Creates a new project, generates all the folders and files.
#### Gon dev
Starts the proxy server and the project, with javascript, stylus and pug files processed by Webpack and Gulp.
Should be used with `sudo`, because the proxy server runs on port `80`.
#### Gon release
Releases all the static files to the `static` folder and all template files to the `view` folder.
### Convention
#### Folder Structure

#### File Name
The module file which will be imported (stylus) or required (js) to the entry file should be named start with the `_` prefix.
### Custom Config
```javascript
// gon.config.js
module.exports = {
domain: 'gon.com',
port: 8000,
// web server
// request to the upper domain will be proxyed to these servers
fe: {
local: '127.0.0.1:8000',
dev: '',
pre: '',
pro: '',
},
// api server
// requests to `/api` will be prxoyed to these servers
be: {
dev: '127.0.0.1:80',
pre: '',
pro: '',
},
proxy: {
// proxy a project's request to an outiside server
'/data/sk/101010100.html': 'www.weather.com.cn:80',
// proxy an outside request to project
'2pmh9.free.natapp.cc': '/ping',
},
// used for webpack to avoid compiling these files
externals: {
react: 'React',
'react-dom': 'ReactDOM',
},
}
```
### Switch Proxy Setting
You can switch all these proxy setting on [http://localhost/](http://localhost/).

### FAQ
* Name is from [Gon Freecss](https://en.wikipedia.org/wiki/List_of_Hunter_%C3%97_Hunter_characters#Gon_Freecss)
* Needs Node.js version >= 7.0.0 and npm version >= 3.3.6
Most thanks to Webpack2.0rc and Gulp4.