Code Monkey home page Code Monkey logo

gp-build's Introduction

gp-build

目录结构

  • dist
  • src
    • css
    • img
    • js
    • include
    • index.html

dist 打包文件

src 开发文件

css:支持scss转css。(less、postcss需要可以另加)
js:支持es6转es5。(暂时不支持一些promise、Object.assign转换,后续研究gulp添加babel-polyfill实现支持)

scss与css不能同名。例如:index.css,index.scss

使用

下载然后安装所有依赖包

npm install

打开本地服务

npm run dev

默认本服务:http://127.0.0.1:3000 支持设为本机ip,局域网内远程访问。 支持反向代理设置 source:请求的路径 target: 映射到的路径

webServer({
  proxies: {
    source: '/abc',//请求
    target: 'http://localhost:8080/abc',
    options: {
      headers: {
        'ABC_HEADER': 'abc'
      }
    }
  }
})

打包

npm run build

打包会对html、css、js、img进行压缩处理。

后续优化

- js、css文件合并 - 配置本地服务反向代理

gp-build's People

Contributors

mr-junhao avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.