All Projects → duenyang → webpack-multipage-cli

duenyang / webpack-multipage-cli

Licence: other
用webpack(已更新至4)构建的多页应用项目脚手架,具有自动打包,编译,部署等功能

Programming Languages

javascript
184084 projects - #8 most used programming language
shell
77523 projects
HTML
75241 projects
CSS
56736 projects

Projects that are alternatives of or similar to webpack-multipage-cli

app
Yii 3 application template
Stars: ✭ 157 (+201.92%)
Mutual labels:  project-template
MonolithicArchitecture
This repository presents an approach on how to build an application using Monolithic architecture, ASP.NET Core, EntityFrameworkCore, Identity Server, CQRS, DDD
Stars: ✭ 18 (-65.38%)
Mutual labels:  project-template
project-template
📂 A template for open source projects.
Stars: ✭ 12 (-76.92%)
Mutual labels:  project-template
fastapi-tortoise
The template for building scalable web APIs based on FastAPI, Tortoise ORM and other.
Stars: ✭ 95 (+82.69%)
Mutual labels:  project-template
sparky
A Bootstrap 3 and 4 Sass Starter Project
Stars: ✭ 21 (-59.62%)
Mutual labels:  project-template
tweego-setup
A blank Tweego project with all the trimmings. Uses node and gulp.
Stars: ✭ 40 (-23.08%)
Mutual labels:  project-template
fastapi-project-template
DO NOT FORK, CLICK "Use this template" - The base to start an openapi project featuring: SQLModel, Typer, FastAPI, JWT Token Auth, Interactive Shell, Management Commands.
Stars: ✭ 262 (+403.85%)
Mutual labels:  project-template
cmake-gtest-gbench-starter
A cross-platform C++11/14/17 starter project with google test and google benchmark support.
Stars: ✭ 27 (-48.08%)
Mutual labels:  project-template
qt-qml-project-template-with-ci
Template for a Qt/QML application with batteries included: GitHub C.I. for your QML app; automated gui testing with Xvfb; automatic code-format checks and more. Compiles for Desktop and Mobile (Linux, Mac, Windows, and Android).
Stars: ✭ 33 (-36.54%)
Mutual labels:  project-template
cpp14-project-template
A simple, cross-platform, and continuously integrated C++14 project template
Stars: ✭ 64 (+23.08%)
Mutual labels:  project-template
kedro-starters
Templates for your Kedro projects.
Stars: ✭ 39 (-25%)
Mutual labels:  project-template
opencart-project-template
OpenCart Project Template
Stars: ✭ 16 (-69.23%)
Mutual labels:  project-template
project-template
Yii2 Project Template
Stars: ✭ 53 (+1.92%)
Mutual labels:  project-template
cookiecutter-deeplearning
Project folder structure for doing and sharing deep learning work.
Stars: ✭ 36 (-30.77%)
Mutual labels:  project-template
AspNet-Core-REST-Service
VS2017/VS2019 project template for ASP.Net Core 3.1/5.0 to create fully functional production ready RESTful services
Stars: ✭ 57 (+9.62%)
Mutual labels:  project-template
project skeleton
A skeleton pytorch codebase commonly used across my projects
Stars: ✭ 31 (-40.38%)
Mutual labels:  project-template
flask-project-template
DO NOT FORK, CLICK "Use this template" - A github template to start a Flask Project - this uses github actions to generate your project based on the template.
Stars: ✭ 74 (+42.31%)
Mutual labels:  project-template
javacard-gradle-template
JavaCard project template for building CAP and running JCardSim with gradle + coverage
Stars: ✭ 27 (-48.08%)
Mutual labels:  project-template
vanillajs-hello
Start a VanillaJS website using WebPack in just 30 seconds: HTML,CSS,Babel,SASS,Bootstrap,Prettier,Gitpod
Stars: ✭ 24 (-53.85%)
Mutual labels:  project-template
docker-django-boilerplate
Minimal boilerplate setup for a Django project with Docker.
Stars: ✭ 41 (-21.15%)
Mutual labels:  project-template

webpack-template

用webpack4构建的多页应用前端项目模板(架构)

  • 根据官方文档进行配置(webpack4)

  • 具有自动编译、打包、热更新、代码检查、服务器环境预览、自动部署等功能

  • 你可以在此项目中正常使用vuereact等前端框架

  • 待补充

    1. html-loader
    2. 自动部署
    3. 使用说明

2019-03-01更新:

升级至 webpack 4!

2017-01-09新增自动部署(shell脚本),你可以在命令行中直接执行对应的命令:

  #不需要运行 npm run build,此脚本会自动帮你运行

  #自动打包部署到测试环境
  sudo sh ./deploy.sh build dev

  #自动打包部署到生产环境
  sudo sh ./deploy.sh build prod

  #如果服务器中没有对应的目录,你可以运行下面的代码在部署时自动在服务器上生成一个目录
  sudo sh ./deploy.sh build prod(or dev) newDir

当然,以上命令均可在此项目的./deploy.sh 脚本文件中进行个性化配置
需要注意的是,当你每次执行以上命令时,系统都会提示你输入远程服务器密码,你可以把你本地的ssh公钥(~/.ssh/id_rsa.pub)配置到对应服务器(~/.ssh/authorized_keys)中就可以不需要每一次都输入密码了


2017-01-08新增html-loader ,你可以在html中引入src相对路径,比如:

<img src="../image/a.jpg">

url-loader或者file-loader会把图片链接自动打包为/image/[name].[hash].[ext]形式,并且放到dist目录下,当然,这些都是可以自定义的;

对于css文件,建议使用官方推荐的在js文件中使用 import '../css/a.css 这种形式;
使用此模板在开发环境下(npm run dev),css会以style标签的形式插入到html中,在生产环境中(npm run build)时,css会被extract-text-webpack-plugin这个插件提取出来,生成对应的css/[name].[hash].css文件,以link标签的形式插入的html->head中;


使用说明

  #以下命令均可在package.json中进行配置

  #开发环境下运行
  npm run dev

  #使用Eslint进行代码检测
  npm run lint

  #打包构建
  npm run build

  #服务器环境下预览
  npm run serve
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].