• sass coffee 和grunt的各种命令


    grunt自动编译:命令 grunt watch

    Gruntfile.js:

     1 module.exports = function(grunt) {
     2 
     3     // Project configuration.
     4     grunt.initConfig({
     5 
     6         //Read the package.json (optional)
     7         pkg: grunt.file.readJSON('package.json'),
     8 
     9         // Metadata.
    10         meta: {
    11             basePath: '../',
    12             srcPath: '../assets/sass/',
    13             deployPath: '../assets/css/'
    14         },
    15 
    16         banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - ' +
    17                 '<%= grunt.template.today("yyyy-mm-dd") %>
    ' +
    18                 '* Copyright (c) <%= grunt.template.today("yyyy") %> ',
    19 
    20         // Task configuration.
    21         sass: {
    22             dist: {
    23                 files: {
    24                     '<%= meta.deployPath %>test.css': '<%= meta.srcPath %>test.scss'
    25                 },
    26                 options: {
    27                     sourcemap: 'true'
    28                 }
    29             }
    30         },
    31         watch: {
    32             scripts: {
    33                 files: [
    34                     '<%= meta.srcPath %>/**/*.scss'
    35                 ],
    36                 tasks: ['sass']
    37             }
    38         }
    39     });
    40 
    41     // These plugins provide necessary tasks.
    42     grunt.loadNpmTasks('grunt-contrib-sass');
    43     grunt.loadNpmTasks('grunt-contrib-watch');
    44 
    45     // Default task.
    46     grunt.registerTask('default', ['sass']);
    47 };

    package.json:

    1 {
    2   "name": "gruntSass",
    3     "version": "0.0.1",
    4     "devDependencies": {
    5         "grunt": "0.4.1",
    6         "grunt-contrib-watch": "0.4.3",
    7         "grunt-contrib-sass": "0.4.0"
    8     }
    9 }

    原址:http://www.w3cplus.com/preprocessor/nodejs-and-grunt-compile-sass-to-css.html

    coffee自动编译:coffee --watch --compile experimental.coffee

    原址:http://coffee-script.org/

    sass自动编译:sass --watch app/sass:public/stylesheets

    原址:http://sass-lang.com/guide

  • 相关阅读:
    (转)回车 执行button点击
    (转)sp_executesql介绍和使用
    (转)SQL Server 2008将数据导出为脚本 [SQL Server]
    (转)Phonegap VS AppCan
    (转)asp.net动态设置标题title 关键字keywords 描述descrtptions
    Ubuntu Tomcat Service
    Ubuntu使用ssh方法连接不上
    Ubuntu输入su提示认证失败的解决方法
    Redis通过命令行进行配置
    linux下安装redis3.2
  • 原文地址:https://www.cnblogs.com/Akishimo/p/5133330.html
Copyright © 2020-2023  润新知