EthanBrown.SublimeText2.WebPackages
- Sublime package featuring the best web-oriented packages - AnguarlJS, AutoFileName, Chai, Emmet, CoffeeComplete Plus, Hayaku, jQuery, LESS, LiveReload, SublimeLinter (custom that features CoffeeLint support), Twitter Bootstrap Snippets - Also includes a custom keybinding package hosted on GitHub - Merges in customized settings for User Preferences
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"installed_packages":
|
||||
[
|
||||
"AngularJS (CoffeeScript)",
|
||||
"AutoFileName",
|
||||
"Chai Completions",
|
||||
"CoffeeComplete Plus (Autocompletion)",
|
||||
"DocBlockr",
|
||||
"Emmet",
|
||||
"Grunt",
|
||||
"Hayaku - tools for writing CSS faster",
|
||||
"HTML5",
|
||||
"jQuery",
|
||||
"LESS",
|
||||
"LiveReload",
|
||||
"Pretty JSON",
|
||||
"sublime-better-coffeescript",
|
||||
"SublimeLinter",
|
||||
"Tag",
|
||||
"Twitter Bootstrap Snippets",
|
||||
"ZZZ.EthanBrown.SublimeKeyMap.Web"
|
||||
],
|
||||
"package_name_map": {
|
||||
"SublimeKeyMap.Web": "ZZZ.EthanBrown.SublimeKeyMap.Web"
|
||||
},
|
||||
"repositories":
|
||||
[
|
||||
"https://github.com/Iristyle/SublimeKeyMap.Web",
|
||||
"https://github.com/Iristyle/SublimeLinter"
|
||||
]
|
||||
}
|
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"auto_complete_commit_on_tab": true,
|
||||
"auto_complete_triggers":
|
||||
[
|
||||
{
|
||||
"characters": "<",
|
||||
"selector": "text.html"
|
||||
},
|
||||
{
|
||||
"characters": "/",
|
||||
"selector": "string.quoted.double.html,string.quoted.single.html, source.css"
|
||||
},
|
||||
{
|
||||
"characters": "$",
|
||||
"selector": "source.coffee, source.js, source.js.embedded.html"
|
||||
},
|
||||
{
|
||||
"characters": ".@",
|
||||
"selector": "source.coffee"
|
||||
}
|
||||
],
|
||||
"ignored_packages":
|
||||
[
|
||||
"CoffeeCompile",
|
||||
"CoffeeScript",
|
||||
"Live CSS",
|
||||
"LESS-build",
|
||||
"Sublime-HTMLPrettify",
|
||||
"ZenCoding"
|
||||
],
|
||||
"tab_size": 2,
|
||||
"word_separators": "./\\()\"'-:,.;<>~!@#%^&*|+=[]{}`~?"
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"exec_args": {
|
||||
"path": "{{node_path}}"
|
||||
}
|
||||
}
|
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"sublimelinter_executable_map":
|
||||
{
|
||||
"javascript":"{{node_path}}",
|
||||
"css":"{{node_path}}"
|
||||
},
|
||||
"sublimelinter_delay": 0.5,
|
||||
"sublimelinter_gutter_marks": true,
|
||||
"sublimelinter_popup_errors_on_save": true,
|
||||
"javascript_linter": "jshint",
|
||||
// http://www.jshint.com/options/ for more info. eval *NOT* allowed
|
||||
"jshint_options":
|
||||
{
|
||||
"indent": 0,
|
||||
"evil": false,
|
||||
"regexdash": true,
|
||||
"browser": true,
|
||||
"wsh": false,
|
||||
"trailing": true,
|
||||
"sub": false
|
||||
},
|
||||
"coffeelint_options":
|
||||
{
|
||||
"no_tabs": { "level": "error" },
|
||||
"no_trailing_whitespace": { "level": "error" },
|
||||
"max_line_length": { "level": "error", "value": 80 },
|
||||
"camel_case_classes": { "level": "error" },
|
||||
"indentation": { "level": "error", "value": 2 },
|
||||
//TODO: https://github.com/clutchski/coffeelint/issues/50
|
||||
"no_implicit_braces": { "level": "ignore" },
|
||||
"no_implicit_parens": { "level": "error" },
|
||||
"no_trailing_semicolons": { "level": "error" },
|
||||
"no_plusplus": { "level": "ignore" },
|
||||
"no_throwing_strings": { "level": "error" },
|
||||
"cyclomatic_complexity": { "level": "ignore", "value": 11 },
|
||||
"line_endings": { "level": "ignore", "value": "unix" },
|
||||
"no_backticks": { "level": "error" },
|
||||
"no_stand_alone_at": { "level": "error" }
|
||||
},
|
||||
// Set to true to highlight annotations
|
||||
"sublimelinter_notes": true,
|
||||
// The set of annotation phrases to highlight
|
||||
"annotations": ["TODO", "README", "FIXME", "HACK"]
|
||||
}
|
@@ -0,0 +1,52 @@
|
||||
$package = 'EthanBrown.SublimeText2.WebPackages'
|
||||
|
||||
function Get-CurrentDirectory
|
||||
{
|
||||
$thisName = $MyInvocation.MyCommand.Name
|
||||
[IO.Path]::GetDirectoryName((Get-Content function:$thisName).File)
|
||||
}
|
||||
|
||||
# simulate the unix command for finding things in path
|
||||
# http://stackoverflow.com/questions/63805/equivalent-of-nix-which-command-in-powershell
|
||||
function Which([string]$cmd)
|
||||
{
|
||||
Get-Command -ErrorAction "SilentlyContinue" $cmd |
|
||||
Select -ExpandProperty Definition
|
||||
}
|
||||
|
||||
try {
|
||||
. (Join-Path (Get-CurrentDirectory) 'JsonHelpers.ps1')
|
||||
. (Join-Path (Get-CurrentDirectory) 'SublimeHelpers.ps1')
|
||||
|
||||
$sublimeUserDataPath = Get-SublimeUserPath
|
||||
$linterFileName = 'SublimeLinter.sublime-settings'
|
||||
$gruntFileName = 'SublimeGrunt.sublime-settings'
|
||||
$linter = Join-Path (Get-CurrentDirectory) $linterFileName
|
||||
$grunt = Join-Path (Get-CurrentDirectory) $gruntFileName
|
||||
|
||||
$node = (Which node)
|
||||
$nodeRoot = Split-Path $node
|
||||
|
||||
$escapedNode = $node -replace '\\', '\\'
|
||||
([IO.File]::ReadAllText($linter)) -replace '{{node_path}}', $escapedNode |
|
||||
Out-File -FilePath (Join-Path $sublimeUserDataPath $linterFileName) -Force -Encoding ASCII
|
||||
|
||||
$escapedNodeRoot = $nodeRoot -replace '\\', '\\'
|
||||
([IO.File]::ReadAllText($grunt)) -replace '{{node_path}}', $escapedNodeRoot |
|
||||
Out-File -FilePath (Join-Path $sublimeUserDataPath $gruntFileName) -Force -Encoding ASCII
|
||||
|
||||
$packageControl = (Join-Path (Get-CurrentDirectory) 'Package Control.sublime-settings')
|
||||
Merge-PackageControlSettings -FilePath $packageControl
|
||||
|
||||
$preferences = (Join-Path (Get-CurrentDirectory) 'Preferences.sublime-settings')
|
||||
Merge-Preferences -FilePath $preferences
|
||||
|
||||
if (Get-Process -Name sublime_text -ErrorAction SilentlyContinue)
|
||||
{
|
||||
Write-Warning 'Please close and re-open Sublime Text to force packages to update'
|
||||
}
|
||||
Write-ChocolateySuccess $package
|
||||
} catch {
|
||||
Write-ChocolateyFailure $package "$($_.Exception.Message)"
|
||||
throw
|
||||
}
|
Reference in New Issue
Block a user