Git Product home page Git Product logo

webpack-page-cli's Introduction

webpack-page-cli

npm-version download webpack-version

English | 简体中文

Install

npm install webpack-page-cli -g 
# OR
yarn global add webpack-page-cli

Usage

webpack-page create <app-name>

Features

✅ es6 ➡️ es5

✅ Css preprocessor(scss less stylus)

✅ eslint

✅ stylelint

✅ multi pages support

✅ HRM

Related screenshots

Directory Structure

webpack-page-cli
|
├─build                     // webpack config folder
|   ├─build.js              // webpack build entry
|   ├─utils.js              // some utils about webpack config
|   ├─webpack.base.conf.js  // webpack.base.conf
|   ├─webpack.dev.conf.js   // webpack.dev.conf
|   ├─webpack.prod.conf.js  // webpack.prod.conf.js
|   └─webpack.svg           // webpack icon
|
|─config                    // some configuration about development and production
|   ├─dev.env.js                
|   ├─index.js             
|   └─prod.env.js           
|  
├─dist                      // Packaged file
|   └─static
|   |    ├─css             
|   |    ├─img              
|   |    └─js               
|   └─index.html           
|         
├─node_modules              // node_modules
├─src
|   ├─css                   // Page css folder
|   ├─img                   // Page img folder
|   |─font                  // Page font folder
|   |─js                    // Page js folder
|   └─index.html            // html files
|
|─static                    // Static resources, which are packaged directly into the /dist/static directory
|   └─.gitkeep
├─.balelrc                  // babel config
├─.eslintrc.js              // eslint config
├─.stylelintrc.json         // stylelint config   
├─.gitignore                // .gitignore
├─favicon.icon              // icon
├─package.json              // package.json
├─postcss.config.js         // postcss config
└─README.md

Multi Pages Support

webpack-page-cli supports multi-page configuration, and the configuration for multiple pages is as follows

  • Create a new pageA.html in the src root directory and create a new pageA.js in the src/js/ directory (the page name and the js name must be the same, because the corresponding html template will be generated according to the name of the js file when packaging)
  • Add the entry in the webpack.base.conf.js entry file entry, {pageA: './src/js/pageA.js'}
  • If there are more pages, and so on

webpack-page-cli's People

Contributors

dependabot[bot] avatar jskuang avatar kuangpf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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