在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):nicosantangelo/sublime-gulp开源软件地址(OpenSource Url):https://github.com/nicosantangelo/sublime-gulp开源编程语言(OpenSource Language):Python 93.7%开源软件介绍(OpenSource Introduction):Sublime GulpA plugin to run your Gulp tasks from within Sublime plus some handy snippets too. Quickstart
Installationvia PackageControlIf you have PackageControl installed, you can use it to install the package. Just type ManuallyYou can clone the repo in your
TroubleshootingFor older gulp versions, the plugin makes use of node which should already be installed if you are using Gulp. It creates a cache using node, so in some systems you might need to add your node_modules path to the NODE_PATH, for example (for Unix):
Sublime Gulp might not work without If you are having trouble running the plugin in Mac OSX it's possible that your path isn't being reported by your shell. In which case give the plugin SublimeFixMacPath a try. It may resolve our issue. If you still can't get it to run properly, first make sure your Gulp tasks run from a terminal (i.e. outside of sublime) and if so then submit an issue. CoffeeScript SupportIf you want to use a
require('coffee-script/register');
var gulp = require('./gulpfile.coffee'); Gulpfile.jsThe Sublime Gulp plugin was made for those using the Gulp Streaming Build - Task Runner System within Node.js for their workflow. Sublime Gulp now supports not only a basic gulpfile.js file in the root of your project but also recognizes your tasks within a directory set by the RequireDir module or within a gulpfile.js directory. So no matter how your gulp tasks are organized Sublime Gulp will find them. UsageAvailable CommandsSublime Gulp supports the following commands accessible from
Running a Gulp TaskTo run a task, first choose The plugin will then display all the Gulp tasks in a list. Selecting one will run that task. To show the task's standard output the plugin uses a panel or a new tab (depends on your settings). After a first task has been run you can use the hide and show panel commands as desired. (see table above) If you want to run the normal Arbitrary taskIf you want to run an arbitrary task you need to choose Run last taskThe command will re-run the last task ran by any of the package commands (if there's one). Customized Task AccessOut of the box Sublime Gulp has a menu item If you want to run other of your tasks from a menu item or keyboard shortcut you can customize both. For example to add a menu item in the tools menu for a [
{
"id": "tools",
"children": [
{ "caption": "Run Sass Task", "command": "gulp", "args": { "task_name": "sass" } }
]
}
] Note: You can run any command silently by adding or you also can use a keyboard shortcut to do the same. Edit { "keys": ["KEYS"], "command": "gulp", "args": { "task_name": "sass" } } For more detailed information on shortcut keys and binding specific tasks below. Killing TasksTo kill running tasks like If you want to supress the command output, you can map it to a keyboard shortcut and pass { "keys": ["KEYS"], "command": "gulp_kill", "args": { "silent": true } }
{ "keys": ["KEYS"], "command": "gulp_kill_task", "args": { "silent": true } } For more detailed information on shortcut keys and binding specific tasks below. Windows If you're running Windows, the package will use taskkill so every child process is correctly terminated. If the executable isn't on your system, you'll need to add it for this command to work correctly. Show or Hide the Panel
Listing Gulp PluginsRunning Deleting The CacheRunning Quitting Sublime Killing Running Gulp TasksThis command will close Sublime Text, but first it'll kill any running tasks. It's the same as running You can select
You can bind it to Snippetsvargulp
pipe
Docsgulps -
Docsgulpt -
Docsgulpd -
Docsgulpw -
Docsgulpwcb -
SettingsThe file The defaults are: {
"exec_args": {},
"recursive_gulpfile_search": false,
"ignored_gulpfile_folders": [".git", "node_modules", "vendor", "tmp", "dist"],
"gulpfile_paths": [],
"results_in_new_tab": false,
"results_autoclose_timeout_in_milliseconds": 0,
"show_silent_errors": true,
"log_errors": true,
"syntax": "Packages/Gulp/syntax/GulpResults.tmLanguage",
"nonblocking": true,
"track_processes": true,
"flags": {},
"check_for_gulpfile": false,
"tasks_on_save": {},
"silent_tasks_on_save": {},
"kill_before_save_tasks": false,
"status_bar_tasks": false,
"status_bar_format": "Gulp: {task_name}"
} exec_argsYou may override your {
"exec_args": {
"path": "/bin:/usr/bin:/usr/local/bin"
}
} gulp installed locallyIf gulp is installed locally in the project, you have to specify the path to the gulp executable. Threfore, adjust the path to recursive_gulpfile_searchIf set to If ignored_gulpfile_foldersIgnored folder names for the recursive search of gulpfile.js files, used to drastically improve performance.
Example: gulpfile_pathsThis setting is active only if Each item in the array constitutes an additional paths to search the gulpfile in, by default only the root of each project folder is used.
Example: results_in_new_tabIf set to results_autoclose_timeout_in_millisecondsDefines the delay used to autoclose the panel or tab that holds the gulp results.
If false (or 0) it will remain open, so if what you want is to keep it closed check the show_silent_errorsIf true it will open the output panel when running log_errorsToggles the creation of syntaxSyntax file for highlighting the gulp results. You can pick it from from the command panel as Set the setting to nonblockingWhen enabled, the package will read the streams from the task process using two threads, one for If set to track_processesPersist the long running task pids to a local file to keep track even if the editor is closed. If set to If set to Depending on the OS you're on, the process might die anyways without the package interverting. Sublime Gulp tries to remedy this by checking if the process is still alive before listing it, which works most of the time but it's not a reliable check.
Worst case scenario, you'll see a dead task, killing it won't do anything. Worst and really not likely case scenario, you'll kill another process if the pid was reused by the OS |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论