Git Product home page Git Product logo

backstage's Introduction

#前端代码说明v1.0.0

##gulp的使用

  1. 安装node环境

  2. 全局安装gulp

  $ npm install gulp -g
  1. 进入到需要gulp管理的项目路径(如/big_mall/gulp),再安装一遍
  $ npm install gulp --save-dev
  1. 安装gulp插件
  $ npm install gulp-ruby-sass gulp-autoprefixer gulp-minify-css gulp-jshint gulp-concat gulp-uglify gulp-imagemin gulp-notify gulp-rename gulp-livereload gulp-cache del --save-dev
  • 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

5.运行task任务

   $ gulp

6.gulp的API请查看gulpfile.js文件

#scss文件规范以及说明 1.各个小模块以下划线开头全小写命名,多单词以 - 符号分隔,总模块正常以该模块文件夹命名,在其中导入需要的小模块(详细规则请查看font-awesome的scss源码),例:

  font-awesome
    _animated.scss
    _bordered-pulled.scss
    _core.scss
    _fixed-width.scss
    _icons.scss
    _larger.scss
    _list.scss
    _mixins.scss                  //预编译文件
    _path.scss                    //资源路径配置
    _rotated-flipped.scss
    _stacked.scss
    _variables.scss               //变量定义
    font-awesome.scss             //总模块文件

2.自定义变量放置在 _variables.scss 文件中

3.资源路径配置在 _path.scss 文件中

backstage's People

Contributors

tkvern avatar

Watchers

James Cloos avatar  avatar

Forkers

krufyliu

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.