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

  1. module.exports = function (grunt) {
  2.  
  3. grunt.initConfig({
  4. // 指定打包目录
  5. buildBase: 'build',
  6. //源码目录
  7. srcBase: 'src',
  8.  
  9. clean: {
  10. build: [
  11. '<%=buildBase %>'
  12. ]
  13. },
  14. copy: {
  15. all: {
  16. files: [
  17. {
  18. expand: true,
  19. cwd: '<%= srcBase %>',
  20. src: ['**/*.css'],
  21. dest: '<%=buildBase %>'
  22. }
  23. ]
  24. }
  25.  
  26. },
  27. compass: {
  28. dist: {
  29. options: {
  30. sassDir: '<%= srcBase %>',
  31. specify: '<%= srcBase %>/index.sass',
  32. cssDir : '<%= srcBase %>',
  33. assetCacheBuster: false
  34. }
  35. },
  36. sprite: {
  37. options: {
  38. sassDir: '<%= srcBase %>',
  39. specify: '<%= srcBase %>/sprite.sass',
  40. cssDir : '<%= srcBase %>',
  41. imagesDir: "<%= srcBase %>/images",
  42. httpPath:"http://www.36ria.com/css",
  43. assetCacheBuster: false
  44. }
  45. },
  46. spriteX2: {
  47. options: {
  48. sassDir: '<%= srcBase %>',
  49. specify: '<%= srcBase %>/sprite-x2.sass',
  50. cssDir : '<%= srcBase %>',
  51. imagesDir: "<%= srcBase %>/images",
  52. assetCacheBuster: false
  53. }
  54. }
  55. },
  56. cssmin: {
  57. build: {
  58. expand: true,
  59. cwd: '<%=buildBase %>',
  60. src: ['**/*.css', '!**/*-min.css'],
  61. dest: '<%=buildBase %>',
  62. ext: '-min.css'
  63. }
  64. },
  65. watch: {
  66. options: {
  67. livereload: true
  68. },
  69. compass: {
  70. files: ['<%= srcBase %>/**/*.sass'],
  71. tasks: ['compass']
  72. }
  73. }
  74. });
  75. /**
  76. * 载入使用到的通过NPM安装的模块
  77. */
  78. grunt.loadNpmTasks('grunt-contrib-clean');
  79. grunt.loadNpmTasks('grunt-contrib-copy');
  80. grunt.loadNpmTasks('grunt-contrib-cssmin');
  81. grunt.loadNpmTasks('grunt-contrib-watch');
  82. grunt.loadNpmTasks('grunt-contrib-compass');
  83.  
  84. grunt.registerTask('default', ['clean','compass','copy:all','cssmin:build']);
  85. grunt.registerTask('dev', ['watch']);
  86. grunt.registerTask('sprite', ['compass:spriteX2']);
  87.  
  88. };

  

grunt + compass的更多相关文章

  1. grunt + compass retina sprites

    https://github.com/AdamBrodzinski/Retina-Sprites-for-Compass

  2. [工具]前端自动化工具grunt+bower+yoman

    安装过程 安装nodejs 安装grunt,bower,yoeman 命令:(-g 表示全局安装,否则安装到当前目录下) npm install -g grunt-cli npm install -g ...

  3. eclipse tomcat maven

    jdk jre eclipse 略过 下载maven和tomcat 上apache官网下载maven:http://maven.apache.org/download.cgi. 上apache官网下载 ...

  4. Sass和compass 安装 和配合grunt实时显示 [Sass和compass学习笔记]

    demo 下载http://vdisk.weibo.com/s/DOlfkrAWjkF/1401192855 为什么要学习Sass和compass ?提高站独立和代码产品化的绝密武器,尤其是程序化cs ...

  5. sass&compass&grunt

    1. compass compile path/to/project//编译scss compass watch path/to/project//自动监视文件变化 2.mixin @include ...

  6. (绝对官方好用,快速上手)针对grunt之前写的那篇有些乱,这次总结个清晰的

    安装 Grunt基于Node.js,安装之前要先安装Node.js,然后运行下面的命令. sudo npm install grunt-cli -g grunt-cli表示安装的是grunt的命令行界 ...

  7. grunt 入门学习

    前端工作流,Grunt上手指南 Posted@2013-04-20 7:15 a.m. CategoriesGrunt ,  javascript 我想先花点时间回忆一下作为一个前端需要做的工作(Lo ...

  8. 如何使用grunt工具

    本文来源于同事的笔记,也是在网上查找的资料,记录分析的特别详细,对初学者来说简直不能再通俗易懂了,感谢原作者! 1.前言 选择Grunt原因 管理我们的文件依赖 随心所欲的批处理任务 整合常用的前端工 ...

  9. 【转载】Grunt常用插件介绍

    项目名称 grunt-contrib v0.8.0 项目地址 https://github.com/gruntjs/grunt-contrib 项目介绍 此项目是对grunt常用插件的集合,刚接触gr ...

随机推荐

  1. POJ 2315 最小费用最大流

    从1走到N然后从N走回来的最短路程是多少? 转换为费用流来建模. 1: /** 2: 因为e ==0 所以 pe[v] pe[v]^1 是两条相对应的边 3: E[pe[v]].c -= aug; E ...

  2. xcode 编译错误的 之 头文件 包含成.m了

    duplicate symbol _OBJC_CLASS_$_AutoTableViewViewController in: /Users/apple/Library/Developer/Xcode/ ...

  3. c++ read

    #include <fstream> #include <iostream> int main(void) { ] = {}; ; std::ifstream read(&qu ...

  4. IOS crash分析

    此处不讨论具体的如何根据.dsym文件解析crash log的方式. 什么是崩溃: 不希望出现的中断,APP收到了系统发出的unhandle signal,来源主要由系统内核,处理器,或者应用程序本身 ...

  5. UVA 12382 Grid of Lamps 贪心

    题目链接: C - Grid of Lamps Time Limit:1000MSMemory Limit: 0KB 问题描述 We have a grid of lamps. Some of the ...

  6. HDU 1423 Greatest Common Increasing Subsequence LCIS

    题目链接: 题目 Greatest Common Increasing Subsequence Time Limit: 2000/1000 MS (Java/Others) Memory Limit: ...

  7. 解决Tomcat 7遇到StackOverflowError的异常

    参考网址:http://qingyuexiao.iteye.com/blog/1886059 前言:在写此博客前,首先感谢姚双琪.林瑞丰.网友qingyuexiao的倾囊相助!此博文不过是笔者对于他们 ...

  8. 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("% ...

  9. [设计模式] 12 代理模式 proxy

    在GOF的<设计模式:可复用面向对象软件的基础>一书中对代理模式是这样说的:为其他对象提供一种代理以控制对这个对象的访问.结合上面的游戏代理的例子和下面的图,我们来进行分析一下.以前你是这 ...

  10. 查看 dmp 字符集

    用Oracle的exp工具导出的dmp文件也包含了字符集信息,dmp文件的第2和第3个字节记录了dmp文件的字符集.如果dmp文件不大,比如只有几M或几十M,可以用UltraEdit打开(16进制方式 ...