GithubHelp home page GithubHelp logo

flexible-h5's Introduction

移动端页面适配dpr

  • 使用:100px=1rem

前端自动化-构建工具

  • 用 es6,typescript 编写的脚本文件需要编译成浏览器认识的 javascript
  • 用 scss,less 编写的样式文件需要编译成浏览器认识的 css
  • 检查代码是否符合书写规范,跑单元测试和集成测试
  • 开发环境如果有 sourcemaps 的话调试起来就方便多了,修改完代码浏览器能自动刷新立即看到效果就更好了
  • 生产环境部署代码需要压缩合并静态文件,添加文件指纹控制缓存
  • 浏览器自动刷新看到效果

gulp vs webpack

  • gulp基于流的作业方式适合多页面应用开发
  • webpack 适合大型单页应用方面

gulp使用

gulpfile.js

  • sass的编译(gulp-ruby-sass)
  • 自动添加css前缀(gulp-autoprefixer)
  • 压缩css(gulp-minify-css)
  • js代码校验(gulp-jshint)
  • 合并js文件(gulp-concat)
  • 压缩js代码(gulp-uglify)
  • 压缩图片(gulp-imagemin)
  • 自动刷新页面(gulp-livereload)
  • 图片缓存,只有图片替换了才压缩(gulp-cache)
  • 更改提醒(gulp-notify)
  • 清除文件(del)

flexible-h5's People

Contributors

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