Git Product home page Git Product logo

gourd's Introduction

gourd

基于前端项目与构建分离的想法,前端工程师专注于业务开发,无需关心构建。前端工程师只需要通过一个配置文件说明自己的输入输出,由 gourd 负责构建。

roadhog想法类似。

Getting Started

配置

配置文件 gourd.config.js 在项目根目录下

默认配置:

module.exports = {
  paths: {
    src: 'src',
    build: 'build',
    public: 'public',
  },
  entry: './index.js',
  publicPath: '/',
  externals: {
  },
  disableCSSModules: false,
  html: {
    filename: 'index.html',
    template: './index.html',
  },
  server: {
    host: '127.0.0.1',
    port: 8080,
    proxy: {},
  }
}

配置说明:

  • paths 基本上不会有变动 src 源代码路径,一般不会变动,entry 和 template 均是相对这个路径 build 构建目的目录 public 放置 favicon 的目录
  • entry 入口,只支持字符串,或者字符串数组
  • publicPath 构建后的资源路径
  • externals 第三方库配置
  • disableCSSModules 禁用 CSS modules
  • html filename build 生成的文件名 template html 模板文件
  • server 可能会改动 host port proxy

gourd's People

Watchers

 avatar  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.