GithubHelp home page GithubHelp logo

gulp-standard's Introduction

个人用的gulp配置方案,用于单页跟踪

gulp-rev-append 插件将通过正则(?:href|src)=”(.)[?]rev=(.)[“] 查找并给指定链接填加版本号(默认根据文件MD5生成,因此文件未发生改变,此版本号将不会变) 该插件只对存在的文件添加版本号如果方法执行时文件不存在则即使添加下面的参数也不会改变

注意:需要在引用后面添加?rev=@@hash参数

项目中使用gulp-connect+proxy-middleware做代理,相关配置信息请修改gulpfile.js中的host对象。

欢迎 Issues

simpleProject为单页面使用require方案;适用于单页活动页

someProjects为多页面项目,使用任何技术均可,但目前没有添加压缩

注意:src文件夹中styles放所有样式文件(less、scss、css),gulp在编译时会在src中生成一个css文件,该文件中不要放入任何样式文件(由于gulp-rev-append在修改html文件中的代码是对应文件必须存在的,所以需要在src中也生成一个css便于添加版本号)

项目默认使用requirejs,默认引入了JSLite(jquery精简)fastclick.jslayerMobile.js、browser.js(这个来源网络)框架(库),默认使用hotCss方案

备注:点击查看JSLite与fastclick的修改、browser为对浏览器的检查,目前里面有是否是微信、QQ、PC以及是否是浏览器的检查,isBrowser为false表示为webview而不是浏览器

gulp-standard's People

Contributors

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