GithubHelp home page GithubHelp logo

webpack_multipages_cli's Introduction

webpack_multiPages_cli

前端:一个简单的webpack多页项目工程,适用与官网等

Feature

  • 支持 ES6 语法,使用 babel 编译
  • html 支持 ejs 语法,使用 underscore-template-loader 和 HtmlWebpackPlugin 编译,详细语法可查看 underscore 或者 lodash _.template 函数部分。另外 underscore-template-loader 提供 Macros (宏) 的特性可自定义静态内容,内置 require 宏可在页面 html 文件内引入公共 html 组件,比如 header、footer 之类多页面公共组件,并且可以提供参数给组件。
  • 自动处理浏览器兼容
  • 通过采用contenthash优化打包速率
  • 无需手动添加入口页面,在对应目录结构下写内容即可

目录结构

  |-- src/                        -- 源文件
  |   |--assets                       --公共静态资源 如img、css、js
  |   |--lib                          --公用组件 如头部、底部html
  |   |-- index.html                  -- 主页面
  |   |-- index/                      -- 主页面资源
  |       |-- index.css
  |       |-- index.js
  |   |-- page1/                     -- page-a 页面
  |       |-- img/                     -- page-a 页面图片文件,目录名不可更改
  |       |-- page1.html
  |       |-- page1.css
  |       |-- page1.js
  |       |-- sub_page_1                 -- page-a 子页面
  |           |-- subPage.html
  |           |-- subpage.css
  |           |-- index.js

== 每个页面目录的图片文件夹固定为img == == 每个页面目录的图片文件夹固定为img == == 重要的事情说三遍 ==

怎么使用呢?

都在看多页面脚手架了,不会? You got to be kidding me.

webpack_multipages_cli's People

Contributors

alsnei avatar

Stargazers

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