zoukankan      html  css  js  c++  java
  • 【sublime】Compile SASS and CoffeeScript file when save.

    All these plugins you can install by package controller.
     

    1.First install pluin  "SASS" 

            It provide syntax highlighting and tab/code completion for Sass and SCSS files


    2. Install pluin "SublimeOnSaveBuild"

            It can trigger a build on each save. It just trigger the ".sublime-build" file to make it. So all we need to do is to edit the ".sublime-build" in SASS and coffee.
            Add "coffee" and make sure "build_on_save" is "1" which means open. 

    3. Edit the SASS build file

            Edit your ruby and sass path.

    4. Let's test it.

            Create a new file "test.scss" and write some code. It will compile the scss file into css file when save. Also you can press F7 or "ctrl + b"

    5. Install plugin "CodeFormatter" to format 

    • PHP - By PEAR PHP_Beautifier
    • JavaScript/JSON/JSONP - By JSBeautifier
    • HTML - By JSBeautifier
    • CSS - By JSBeautifier
    • Python - By PythonTidy (only ST2)
    Default shotcut "Control+Shift+P"

    6.Edit the CoffeeScript build file.



    Original 

    {
        "path": "$HOME/bin:/usr/local/bin:$PATH",
        "cmd": ["coffee","-c","$file"],
        "file_regex": "^(...*?):([0-9]*):?([0-9]*)",
        "selector": "source.coffee"
    }
     
    For Mac

    {

        "cmd": ["coffee", "$file"],

        "selector" : "source.coffee",

        "path" : "/usr/local/bin"

    For Windows

    {

       "cmd": ["coffee.cmd","-c","$file"],

        "selector": "source.coffee"

    }

     

    7. Let's test it

             Create a new file "test.coffee" and write some code. It will compile the coffee file into js file when save. Also you can press F7 or "ctrl + b"

    ≡≡≡≡≡≡≡≡≡≡★ From Laker's blog ★≡≡≡≡≡≡≡≡≡≡

    ¤ ╭⌒╮☀Coding and changing~☀ ╭╭ ⌒╮

    ✪Fighting and insisting~✪

     

  • 相关阅读:
    馒头国家标准公布:应是圆形或椭圆形(图)
    完全用C#写的SharpOS 0.0.1版发布
    c#操作c/c++的Dll文件
    研究发现GSM信号影响睡眠
    解决QQ与360的终极解决方案
    分享一个参数检查的类
    问题是问题,可是出路呢?
    读《码斗士修炼之路》有感
    我看博客园之争论
    关于ORM的一点思考
  • 原文地址:https://www.cnblogs.com/younglaker/p/3311966.html
Copyright © 2011-2022 走看看