grunt + compass
compass和sass文章列表:http://182.92.240.72/tag/compass/
compass实战grunt:
http://wrox.cn/article/2000491/
http://ju.outofmemory.cn/entry/73492
http://ju.outofmemory.cn/entry/75413
compass-demo/Gruntfile.js: https://github.com/minghe/compass-demo/blob/master/Gruntfile.js#L38
- module.exports = function (grunt) {
- grunt.initConfig({
- // 指定打包目录
- buildBase: 'build',
- //源码目录
- srcBase: 'src',
- clean: {
- build: [
- '<%=buildBase %>'
- ]
- },
- copy: {
- all: {
- files: [
- {
- expand: true,
- cwd: '<%= srcBase %>',
- src: ['**/*.css'],
- dest: '<%=buildBase %>'
- }
- ]
- }
- },
- compass: {
- dist: {
- options: {
- sassDir: '<%= srcBase %>',
- specify: '<%= srcBase %>/index.sass',
- cssDir : '<%= srcBase %>',
- assetCacheBuster: false
- }
- },
- sprite: {
- options: {
- sassDir: '<%= srcBase %>',
- specify: '<%= srcBase %>/sprite.sass',
- cssDir : '<%= srcBase %>',
- imagesDir: "<%= srcBase %>/images",
- httpPath:"http://www.36ria.com/css",
- assetCacheBuster: false
- }
- },
- spriteX2: {
- options: {
- sassDir: '<%= srcBase %>',
- specify: '<%= srcBase %>/sprite-x2.sass',
- cssDir : '<%= srcBase %>',
- imagesDir: "<%= srcBase %>/images",
- assetCacheBuster: false
- }
- }
- },
- cssmin: {
- build: {
- expand: true,
- cwd: '<%=buildBase %>',
- src: ['**/*.css', '!**/*-min.css'],
- dest: '<%=buildBase %>',
- ext: '-min.css'
- }
- },
- watch: {
- options: {
- livereload: true
- },
- compass: {
- files: ['<%= srcBase %>/**/*.sass'],
- tasks: ['compass']
- }
- }
- });
- /**
- * 载入使用到的通过NPM安装的模块
- */
- grunt.loadNpmTasks('grunt-contrib-clean');
- grunt.loadNpmTasks('grunt-contrib-copy');
- grunt.loadNpmTasks('grunt-contrib-cssmin');
- grunt.loadNpmTasks('grunt-contrib-watch');
- grunt.loadNpmTasks('grunt-contrib-compass');
- grunt.registerTask('default', ['clean','compass','copy:all','cssmin:build']);
- grunt.registerTask('dev', ['watch']);
- grunt.registerTask('sprite', ['compass:spriteX2']);
- };
grunt + compass的更多相关文章
- grunt + compass retina sprites
https://github.com/AdamBrodzinski/Retina-Sprites-for-Compass
- [工具]前端自动化工具grunt+bower+yoman
安装过程 安装nodejs 安装grunt,bower,yoeman 命令:(-g 表示全局安装,否则安装到当前目录下) npm install -g grunt-cli npm install -g ...
- eclipse tomcat maven
jdk jre eclipse 略过 下载maven和tomcat 上apache官网下载maven:http://maven.apache.org/download.cgi. 上apache官网下载 ...
- Sass和compass 安装 和配合grunt实时显示 [Sass和compass学习笔记]
demo 下载http://vdisk.weibo.com/s/DOlfkrAWjkF/1401192855 为什么要学习Sass和compass ?提高站独立和代码产品化的绝密武器,尤其是程序化cs ...
- sass&compass&grunt
1. compass compile path/to/project//编译scss compass watch path/to/project//自动监视文件变化 2.mixin @include ...
- (绝对官方好用,快速上手)针对grunt之前写的那篇有些乱,这次总结个清晰的
安装 Grunt基于Node.js,安装之前要先安装Node.js,然后运行下面的命令. sudo npm install grunt-cli -g grunt-cli表示安装的是grunt的命令行界 ...
- grunt 入门学习
前端工作流,Grunt上手指南 Posted@2013-04-20 7:15 a.m. CategoriesGrunt , javascript 我想先花点时间回忆一下作为一个前端需要做的工作(Lo ...
- 如何使用grunt工具
本文来源于同事的笔记,也是在网上查找的资料,记录分析的特别详细,对初学者来说简直不能再通俗易懂了,感谢原作者! 1.前言 选择Grunt原因 管理我们的文件依赖 随心所欲的批处理任务 整合常用的前端工 ...
- 【转载】Grunt常用插件介绍
项目名称 grunt-contrib v0.8.0 项目地址 https://github.com/gruntjs/grunt-contrib 项目介绍 此项目是对grunt常用插件的集合,刚接触gr ...
随机推荐
- POJ 2315 最小费用最大流
从1走到N然后从N走回来的最短路程是多少? 转换为费用流来建模. 1: /** 2: 因为e ==0 所以 pe[v] pe[v]^1 是两条相对应的边 3: E[pe[v]].c -= aug; E ...
- xcode 编译错误的 之 头文件 包含成.m了
duplicate symbol _OBJC_CLASS_$_AutoTableViewViewController in: /Users/apple/Library/Developer/Xcode/ ...
- c++ read
#include <fstream> #include <iostream> int main(void) { ] = {}; ; std::ifstream read(&qu ...
- IOS crash分析
此处不讨论具体的如何根据.dsym文件解析crash log的方式. 什么是崩溃: 不希望出现的中断,APP收到了系统发出的unhandle signal,来源主要由系统内核,处理器,或者应用程序本身 ...
- UVA 12382 Grid of Lamps 贪心
题目链接: C - Grid of Lamps Time Limit:1000MSMemory Limit: 0KB 问题描述 We have a grid of lamps. Some of the ...
- HDU 1423 Greatest Common Increasing Subsequence LCIS
题目链接: 题目 Greatest Common Increasing Subsequence Time Limit: 2000/1000 MS (Java/Others) Memory Limit: ...
- 解决Tomcat 7遇到StackOverflowError的异常
参考网址:http://qingyuexiao.iteye.com/blog/1886059 前言:在写此博客前,首先感谢姚双琪.林瑞丰.网友qingyuexiao的倾囊相助!此博文不过是笔者对于他们 ...
- POJ 1068 AC 2014-01-07 15:24 146人阅读 评论(0) 收藏
POJ的题目都是英文的,所以,,,还是直接贴代码吧 #include<stdio.h> int main(){ int x,y,z; int n,nm,max; scanf("% ...
- [设计模式] 12 代理模式 proxy
在GOF的<设计模式:可复用面向对象软件的基础>一书中对代理模式是这样说的:为其他对象提供一种代理以控制对这个对象的访问.结合上面的游戏代理的例子和下面的图,我们来进行分析一下.以前你是这 ...
- 查看 dmp 字符集
用Oracle的exp工具导出的dmp文件也包含了字符集信息,dmp文件的第2和第3个字节记录了dmp文件的字符集.如果dmp文件不大,比如只有几M或几十M,可以用UltraEdit打开(16进制方式 ...