GithubHelp home page GithubHelp logo

gesanduo / gulp-webpack-generator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cxh0312/gulp-webpack-generator

0.0 1.0 0.0 88 KB

一个使用gulp+webpack的前端项目生成器,支持对vue组件

License: MIT License

CSS 96.18% HTML 0.34% JavaScript 2.90% Vue 0.58%

gulp-webpack-generator's Introduction

自己搭建的一个gulp+webpack的前端项目生成器;完成前端重复的一些步骤;

Gulp用于前端项目流程控制,webpack用于vue组件和js的模块化

安装依赖

npm install

使用方法

gulp //运行默认的Gulp任务,得到将是压缩混合后的版本
gulp --env=beta 运行测试环境下的Gulp任务

easy-reload

var reload = require("eady-reload");
//开启监听
reload.init();
//监听变换后调用,通知浏览器刷新
reload.stream();
//使用reload.js或者ocnsole.ls
<script src="localhost:3333/relaod.js">
劫持console.log方法

###Vue组件

1、.babelrc必须
2、vue-loader必须以及相关的loader
3、.vue中的style如果使用sass等也需要加载相应的loader

Tips

1、gulpfile.js中的comeIn和output分别是文件进入和处理之后的路径 2、默认运行gulp,执行html,sass,image,js等任务 3、默认为测试环境,打包的静态文件不压缩,需要压缩可以添加参数 --env=pro 或者 --ENV=pro

gulp-webpack-generator's People

Contributors

cxh0312 avatar

Watchers

 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.