A simple yet powerful free webpack boilerplate to rapid prototyping and development of fron...

栏目: IT技术 · 发布时间: 5年前

内容简介:A simple but powerful project to rapid prototyping and development of front-end apps, with scss (optional), pug (optional), ES7, webpack (bundlefy, uglyfy, etc). Very useful to create static websites or apps, without having to worry about setting up the en

Create web apps with Webpack

A simple yet powerful free webpack boilerplate to rapid prototyping and development of fron...

A simple but powerful project to rapid prototyping and development of front-end apps, with scss (optional), pug (optional), ES7, webpack (bundlefy, uglyfy, etc). Very useful to create static websites or apps, without having to worry about setting up the environment.

You can get the source code free on Github

Features

  • Modern Technologies: Full support for HTML5, PUG, JavaScript (Vanilla and ES7) and CSS (Sass, scss and PostCSS)
  • Built-in Server: Local development server with live reloading
  • Performance Tuning: CSS and JavaScript transpilation, bundling, autoprefixing, and minification
  • Image Optimization: Optimizes images for loading speed
  • Favicon Generation: Automatically generates all favicons for Web, Apple and Android devices from one image file
  • Code Linting: Full support for JavaScript (ESLint) and CSS (StyleLint) linting
  • Setup Wizard: Optionally install helpful libraries and snippets including:
    • jQuery
    • Google Analytics
    • FTP deployment process
  • Cutting Edge: Uses Webpack for processing and bundling your code
  • Deployment: Built-in support for deployment via FTP

Requirements

Installation Steps

Clone repo:

git clone https://github.com/jomendez/simple-webpack-boilerplate && cd simple-webpack-boilerplate && 
rm -rf .git && git init
npm install
npm run setup

In this step you'll be able to setup your google analytics, enable jquery, setup (optional) an FTP for deployments.

A simple yet powerful free webpack boilerplate to rapid prototyping and development of fron...

npm run dev
npm run build
npm run deploy

If everything went well ( npm run dev )...

You browser should open a new tab and you should see something like this:

A simple yet powerful free webpack boilerplate to rapid prototyping and development of fron...

Quick example

It is recommended to create a new page within the src folder or use the one that comes with the example page.pug to start adding your content.

A simple yet powerful free webpack boilerplate to rapid prototyping and development of fron...

Then you can go to src/js/app.js file and add the following lines:

const page = require("../page.pug");
document.querySelector('container').innerHTML = page();

The code above is going to transpile the pug file this particular case (but it can be an html file). Then we will insert the content of the page into the container tag on the index.html.


以上所述就是小编给大家介绍的《A simple yet powerful free webpack boilerplate to rapid prototyping and development of fron...》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

图解Java多线程设计模式

图解Java多线程设计模式

[日] 结城浩 / 侯振龙、杨文轩 / 人民邮电出版社 / 2017-8 / 89.00元

本书通过具体的Java 程序,以浅显易懂的语言逐一说明了多线程和并发处理中常用的12 种设计模式。内容涉及线程的基础知识、线程的启动与终止、线程间的互斥处理与协作、线程的有效应用、线程的数量管理以及性能优化的注意事项等。此外,还介绍了一些多线程编程时容易出现的失误,以及多线程程序的阅读技巧等。在讲解过程中,不仅以图配文,理论结合实例,而且提供了运用模式解决具体问题的练习题和答案,帮助读者加深对多线......一起来看看 《图解Java多线程设计模式》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具