• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

craigbuckler/gulp-css: Using Gulp.js for CSS tasks

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

craigbuckler/gulp-css

开源软件地址(OpenSource Url):

https://github.com/craigbuckler/gulp-css

开源编程语言(OpenSource Language):

JavaScript 44.2%

开源软件介绍(OpenSource Introduction):

gulp-css

This provides an example Gulp.js project which automates CSS tasks including:

  • optimizing images
  • compiling Sass .scss files
  • handling and inlining assets
  • automatically appending vendor prefixes
  • removing unused CSS selectors
  • minifying CSS
  • reporting file sizes
  • outputing sourcemaps for use in browser devtools
  • live-reloading CSS in a browser when source files change.

Installation

To install on any Linux, Mac OS or Windows system, ensure Node.js is installed then clone the repository:

git clone https://github.com/craigbuckler/gulp-css.git

Navigate to the folder:

cd gulp-css

Install dependencies:

npm i gulp-cli -g
npm i

Note that module versions have been fixed to guarantee compatibility. Run npm outdated and update package.json as necessary.

Usage

Run in live-reloading development mode:

gulp

Navigate to http://localhost:8000/ or the External URL if accessing from another device. Further instructions are shown on the index page.

Build production CSS

Set NODE_ENV to production so Gulp tasks produce final code, i.e. remove unused CSS, minify files, and disable sourcemap generation.

Linux/Mac OS:

NODE_ENV=production
gulp css

(or inline NODE_ENV=production gulp css)

Windows Powershell:

$env:NODE_ENV="production"
gulp css

Windows legacy command line:

set NODE_ENV=production
gulp css



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap