ctrl+shift+p filters: :st2 :st3 :win :osx :linux
浏览

SublimeOnSaveBuild

作者: alexnj 全部

当你在Sublime Text 2中保存文件时立即触发构建。对于使用Less、Compass和其他任何预处理器或Makefile的Web项目来说,它是最受欢迎的。

详细信息

  • 2016.08.05.17.17.02
  • github.com
  • github.com
  • 8年前
  • 33分钟前
  • 13年前

安装次数

  • 总计 82K
  • Win 48K
  • Mac 25K
  • Linux 9K
8月7日 8月6日 8月5日 8月4日 8月3日 8月2日 8月1日 7月31日 7月30日 7月29日 7月28日 7月27日 7月26日 7月25日 7月24日 7月23日 7月22日 7月21日 7月20日 7月19日 7月18日 7月17日 7月16日 7月15日 7月14日 7月13日 7月12日 7月11日 7月10日 7月9日 7月8日 7月7日 7月6日 7月5日 7月4日 7月3日 7月2日 7月1日 6月30日 6月29日 6月28日 6月27日 6月26日 6月25日 6月24日
Windows 0 2 0 0 1 0 1 0 0 0 2 1 0 0 3 1 0 0 0 0 0 2 2 0 2 0 1 1 1 2 0 0 0 1 4 0 1 2 0 1 0 2 0 1 3
Mac 0 2 1 2 1 1 1 0 1 2 0 1 2 1 2 1 1 0 1 1 0 0 1 3 0 1 1 0 0 2 0 1 1 2 0 0 0 0 1 0 1 1 1 0 1
Linux 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 0 1 1
0123458月7日8月4日8月1日7月29日7月26日7月23日7月20日7月17日7月14日7月11日7月8日7月5日7月2日6月29日6月26日8月7日 Linux: 0 Mac: 0 Windows: 08月6日 Linux: 1 Mac: 2 Windows: 28月5日 Linux: 0 Mac: 1 Windows: 08月4日 Linux: 0 Mac: 2 Windows: 08月3日 Linux: 0 Mac: 1 Windows: 18月2日 Linux: 0 Mac: 1 Windows: 08月1日 Linux: 0 Mac: 1 Windows: 17月31日 Linux: 0 Mac: 0 Windows: 07月30日 Linux: 0 Mac: 1 Windows: 07月29日 Linux: 0 Mac: 2 Windows: 07月28日 Linux: 1 Mac: 0 Windows: 27月27日 Linux: 0 Mac: 1 Windows: 17月26日 Linux: 0 Mac: 2 Windows: 07月25日 Linux: 0 Mac: 1 Windows: 07月24日 Linux: 0 Mac: 2 Windows: 37月23日 Linux: 0 Mac: 1 Windows: 17月22日 Linux: 0 Mac: 1 Windows: 07月21日 Linux: 1 Mac: 0 Windows: 07月20日 Linux: 0 Mac: 1 Windows: 07月19日 Linux: 0 Mac: 1 Windows: 07月18日 Linux: 0 Mac: 0 Windows: 07月17日 Linux: 0 Mac: 0 Windows: 27月16日 Linux: 0 Mac: 1 Windows: 27月15日 Linux: 0 Mac: 3 Windows: 07月14日 Linux: 0 Mac: 0 Windows: 27月13日 Linux: 0 Mac: 1 Windows: 07月12日 Linux: 0 Mac: 1 Windows: 17月11日 Linux: 0 Mac: 0 Windows: 17月10日 Linux: 0 Mac: 0 Windows: 17月9日 Linux: 0 Mac: 2 Windows: 27月8日 Linux: 0 Mac: 0 Windows: 07月7日 Linux: 0 Mac: 1 Windows: 07月6日 Linux: 0 Mac: 1 Windows: 07月5日 Linux: 0 Mac: 2 Windows: 17月4日 Linux: 1 Mac: 0 Windows: 47月3日 Linux: 0 Mac: 0 Windows: 07月2日 Linux: 0 Mac: 0 Windows: 17月1日 Linux: 1 Mac: 0 Windows: 26月30日 Linux: 0 Mac: 1 Windows: 06月29日 Linux: 0 Mac: 0 Windows: 16月28日 Linux: 0 Mac: 1 Windows: 06月27日 Linux: 1 Mac: 1 Windows: 26月26日 Linux: 0 Mac: 1 Windows: 06月25日 Linux: 1 Mac: 0 Windows: 16月24日 Linux: 1 Mac: 1 Windows: 38月7日 Linux: 0 Mac: 0 Windows: 08月6日 Linux: 1 Mac: 2 Windows: 28月5日 Linux: 0 Mac: 1 Windows: 08月4日 Linux: 0 Mac: 2 Windows: 08月3日 Linux: 0 Mac: 1 Windows: 18月2日 Linux: 0 Mac: 1 Windows: 08月1日 Linux: 0 Mac: 1 Windows: 17月31日 Linux: 0 Mac: 0 Windows: 07月30日 Linux: 0 Mac: 1 Windows: 07月29日 Linux: 0 Mac: 2 Windows: 07月28日 Linux: 1 Mac: 0 Windows: 27月27日 Linux: 0 Mac: 1 Windows: 17月26日 Linux: 0 Mac: 2 Windows: 07月25日 Linux: 0 Mac: 1 Windows: 07月24日 Linux: 0 Mac: 2 Windows: 37月23日 Linux: 0 Mac: 1 Windows: 17月22日 Linux: 0 Mac: 1 Windows: 07月21日 Linux: 1 Mac: 0 Windows: 07月20日 Linux: 0 Mac: 1 Windows: 07月19日 Linux: 0 Mac: 1 Windows: 07月18日 Linux: 0 Mac: 0 Windows: 07月17日 Linux: 0 Mac: 0 Windows: 27月16日 Linux: 0 Mac: 1 Windows: 27月15日 Linux: 0 Mac: 3 Windows: 07月14日 Linux: 0 Mac: 0 Windows: 27月13日 Linux: 0 Mac: 1 Windows: 07月12日 Linux: 0 Mac: 1 Windows: 17月11日 Linux: 0 Mac: 0 Windows: 17月10日 Linux: 0 Mac: 0 Windows: 17月9日 Linux: 0 Mac: 2 Windows: 27月8日 Linux: 0 Mac: 0 Windows: 07月7日 Linux: 0 Mac: 1 Windows: 07月6日 Linux: 0 Mac: 1 Windows: 07月5日 Linux: 0 Mac: 2 Windows: 17月4日 Linux: 1 Mac: 0 Windows: 47月3日 Linux: 0 Mac: 0 Windows: 07月2日 Linux: 0 Mac: 0 Windows: 17月1日 Linux: 1 Mac: 0 Windows: 26月30日 Linux: 0 Mac: 1 Windows: 06月29日 Linux: 0 Mac: 0 Windows: 16月28日 Linux: 0 Mac: 1 Windows: 06月27日 Linux: 1 Mac: 1 Windows: 26月26日 Linux: 0 Mac: 1 Windows: 06月25日 Linux: 1 Mac: 0 Windows: 16月24日 Linux: 1 Mac: 1 Windows: 38月7日 Linux: 0 Mac: 0 Windows: 08月6日 Linux: 1 Mac: 2 Windows: 28月5日 Linux: 0 Mac: 1 Windows: 08月4日 Linux: 0 Mac: 2 Windows: 08月3日 Linux: 0 Mac: 1 Windows: 18月2日 Linux: 0 Mac: 1 Windows: 08月1日 Linux: 0 Mac: 1 Windows: 17月31日 Linux: 0 Mac: 0 Windows: 07月30日 Linux: 0 Mac: 1 Windows: 07月29日 Linux: 0 Mac: 2 Windows: 07月28日 Linux: 1 Mac: 0 Windows: 27月27日 Linux: 0 Mac: 1 Windows: 17月26日 Linux: 0 Mac: 2 Windows: 07月25日 Linux: 0 Mac: 1 Windows: 07月24日 Linux: 0 Mac: 2 Windows: 37月23日 Linux: 0 Mac: 1 Windows: 17月22日 Linux: 0 Mac: 1 Windows: 07月21日 Linux: 1 Mac: 0 Windows: 07月20日 Linux: 0 Mac: 1 Windows: 07月19日 Linux: 0 Mac: 1 Windows: 07月18日 Linux: 0 Mac: 0 Windows: 07月17日 Linux: 0 Mac: 0 Windows: 27月16日 Linux: 0 Mac: 1 Windows: 27月15日 Linux: 0 Mac: 3 Windows: 07月14日 Linux: 0 Mac: 0 Windows: 27月13日 Linux: 0 Mac: 1 Windows: 07月12日 Linux: 0 Mac: 1 Windows: 17月11日 Linux: 0 Mac: 0 Windows: 17月10日 Linux: 0 Mac: 0 Windows: 17月9日 Linux: 0 Mac: 2 Windows: 27月8日 Linux: 0 Mac: 0 Windows: 07月7日 Linux: 0 Mac: 1 Windows: 07月6日 Linux: 0 Mac: 1 Windows: 07月5日 Linux: 0 Mac: 2 Windows: 17月4日 Linux: 1 Mac: 0 Windows: 47月3日 Linux: 0 Mac: 0 Windows: 07月2日 Linux: 0 Mac: 0 Windows: 17月1日 Linux: 1 Mac: 0 Windows: 26月30日 Linux: 0 Mac: 1 Windows: 06月29日 Linux: 0 Mac: 0 Windows: 16月28日 Linux: 0 Mac: 1 Windows: 06月27日 Linux: 1 Mac: 1 Windows: 26月26日 Linux: 0 Mac: 1 Windows: 06月25日 Linux: 1 Mac: 0 Windows: 16月24日 Linux: 1 Mac: 1 Windows: 3

说明

源代码
raw.githubusercontent.com

SublimeOnSaveBuild Sublime插件

这是一个用于Sublime Text 2并在每次保存时触发构建的简单插件。

并非所有项目都需要这个插件,尤其是当构建操作很长时。然而,如果您有一个构建,比如通过工具如LessCSS预处理CSS并将所有JS文件拼接在一起,这个插件可能会非常实用。

安装

使用包管理器插件:安装SublimeOnSaveBuild最简单的方法是通过包管理器,可以在本站点找到:http://wbond.net/sublime_packages/package_control

安装好包管理器后,重启Sublime Text 2并打开命令面板(在OS X上为Command+Shift+P,在Linux/Windows上为Control+Shift+P)。选择“包管理器:安装包”,待包管理器更新最新包列表后,选择SublimeOnSaveBuild即可。使用此方法的好处是包管理器会自动将SublimeOnSaveBuild更新到最新版本。

无需Git:GitHub下载最新源码并将SublimeOnSaveBuild文件夹复制到您的Sublime Text 2“包”目录中。

使用Git:在Sublime Text 2“包”目录中克隆该存储库

git clone git://github.com/alexnj/SublimeOnSaveBuild.git

“包”目录位于

  • OS X

    ~/Library/Application Support/Sublime Text 2/Packages/
    
  • Linux

    ~/.config/sublime-text-2/Packages/
    
  • Windows

    %APPDATA%/Sublime Text 2/Packages/
    

配置

有许多配置选项可以自定义SublimeOnSaveBuild的行为。有关可用选项的详细信息,请选择菜单项首选设置->包设置->SublimeOnSaveBuild->设置 - 默认

不要编辑默认的SublimeOnSaveBuild设置。当SublimeOnSaveBuild更新时,您的更改将会丢失。始终通过选择首选项->包设置->SublimeOnSaveBuild->设置 - 用户来编辑用户的SublimeOnSaveBuild设置。

  • build_on_save 将其设置为1以在保存时触发构建。默认情况下,此选项设置为1。也就是说,SublimeOnSaveBuild尝试构建所有项目。您可以通过将build_on_save的用户特定设置配置为0并将项目特定设置设置为1来改变此行为,仅构建特定项目。

  • filename_filter SublimeOnSaveBuild与此正则表达式匹配正在保存的文件名,以确定是否应该触发构建。默认情况下,此设置的值为"\\.(css|js|sass|less|scss)$"

用法

  1. 确保您在Sublime Text 2项目中设置了构建操作,并且您能够使用Control+B(Linux/Windows)或Command+B(OS X)进行构建。
  2. 按您的快捷键保存文件,应会触发构建。

祝您好运!