Git Product home page Git Product logo

cutie's Introduction

cutie

切图工作流

  • gulp workflow
    • html template engine:pug
    • css pre-processer:stylus
    • browsersync reload
    • css sprite

结构说明

dist 文件夹下存放serve和compile后的结果


|--assets(被原样不动地复制到 dist 下)

|--style(存放 stylus 样式文件,编译至 dist/css 下,app 这个层级保留,里面的样式作为单独注入页面的特殊样式,style/index.styl中的样式会作为公共样式插入到所有html中)

|--vendor(被原样不动地复制到 dist 下)

|--views(存放 pug 模板,第一层下的pug会被编译至 dist 下)

编译时会读取 pug 文件首个-中划线前的字符串作为为 html 注入的单独样式文件的名称

命令

# serve with livereload
# port is 8003
npm start
# 清理 dist
npm run clean
# 生成编译结果,并将vendor、css中的脚本或样式依赖插入html
npm run compile
# 生成雪碧图(必须在编译之后,手动执行)
npm run sprite

直接执行 gulp 命令需要安装gulp-cli

# serve with livereload
# port is 8003
gulp start
# 清理 dist
gulp clean
# 生成编译结果,并将vendor、css中的脚本或样式依赖插入html
gulp compile
# 生成雪碧图(必须在编译之后,手动执行)
gulp sprite

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.