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~✪

     

  • 相关阅读:
    MongoDB 部署复制集(副本集)
    MongoDB shell 2 副本集方法
    MongoDB shell 1 数据库方法
    MongoDB shell 0 集合方法
    CentOS7 安装 zabbix
    MongoDB Shell db.runCommand
    MongoDB Index
    MongoDB 启动报错
    MongoDB 聚合查询报错
    MongoDB 聚合函数
  • 原文地址:https://www.cnblogs.com/younglaker/p/3311966.html
Copyright © 2011-2022 走看看