Build 将指定的生成系统设置为sublime text 2上文件类型的默认值
我已经安装了软件包。SCSS提供语法突出显示,而SASS提供SCSS所需的构建系统。我的问题是,如果build设置为automatic,那么如果我按ctrl+b,它将不会生成scss文件,因此我必须始终返回并重新选择该选项。有没有办法使该生成系统成为SCS的自动生成系统?使用生成系统进行设置,然后使用F7启动: 有关设置的详细信息 最新答案 复制以下内容:Build 将指定的生成系统设置为sublime text 2上文件类型的默认值,build,system,sass,sublimetext2,Build,System,Sass,Sublimetext2,我已经安装了软件包。SCSS提供语法突出显示,而SASS提供SCSS所需的构建系统。我的问题是,如果build设置为automatic,那么如果我按ctrl+b,它将不会生成scss文件,因此我必须始终返回并重新选择该选项。有没有办法使该生成系统成为SCS的自动生成系统?使用生成系统进行设置,然后使用F7启动: 有关设置的详细信息 最新答案 复制以下内容: { "cmd": ["sass", "--update", "$file:${file_path}/${file_base_name}.
{
"cmd": ["sass", "--update", "$file:${file_path}/${file_base_name}.css", "--stop-on-error", "--no-cache"],
"selector": "source.sass, source.scss",
"line_regex": "Line ([0-9]+):",
"osx":
{
"path": "/usr/local/bin:$PATH"
},
"windows":
{
"shell": "true"
}
}
在升华文本中,转到工具>构建系统>新建构建系统>粘贴
给它起个名字。宾果
更简单的方法
最简单的方法
当你不需要的时候,为什么要自己动手
是否希望每次保存时都在打开的浏览器中更新站点
npm grunt-contrib-jshint --save-dev
标记“dev”-仅适用于本地项目(当前文件夹和子文件夹)
另外,在package.json中被列为“devDependency”,这意味着它不会
在发行版/产品版本中打包您的项目
// make a new folder. cd into it, and type:
yo webapp
// There are multiple 'generators' you can install with yo.
// webapp is the one most suitable for front-end dev / web app building
// other things you might want before you start.. maybe underscore:
bower install underscore
// adds '_' to the set-up as a dependency
// These commands will brighten your day:
grunt test
// comprehensive testing of app
grunt server
// This part you'll love! Starts server and launches app in browser
// - includes live-refreshing... save a file, and all required builds etc
// are preformed (damn fast) and automatically refreshes browser.
// Yup, 'grunt server' = project-wide equiv to 'compass watch'
grunt
// Build application for deploy. Not only do you get minification and concatenation;
// also optimize all your image files, HTML, compile your CoffeeScript and Compass files,
// if you're using AMD, will pass those modules through r.js so you don't have to.
“使用构建系统进行设置并使用F7启动”,这是错误的。不过,通过这些文档,我找到了我的答案,所以谢谢你的链接。该包没有将自己设置为文件类型的默认生成系统,因此我必须打开.sublime生成文件并自己添加它。目前还没有一个包可以自动完成这个过程——唉,链接。可以在搜索build时找到build的键绑定,并在默认(OS)中进行更改。升华键映射-在我的系统上,系统上的build快捷键映射为:
{“keys”:[“f7”],“command”:“build”},{“keys”:[“ctrl+b”],“command”:“build”}
。由于我没有更改默认值,只有用户密钥映射,所以我认为这是操作系统的公共密钥。我猜,它是由另一个软件包添加的。这是没有帮助的:链接上的说明只是针对问题的手势,页面上没有指向更相关材料的链接。我有一个与OP非常相似的问题,我不敢相信OP会满意。对不起@Tom,这和当时一样好。由于这一次,通过软件包以及上面的手动设置可以获得更多选项。我很快会发布一个全面的更新。