DustBuster
:dash: SublimeText Package : Dust syntax + completions
Details
Installs
- Total 6K
- Win 1K
- Mac 3K
- Linux 940
Mar 26 | Mar 25 | Mar 24 | Mar 23 | Mar 22 | Mar 21 | Mar 20 | Mar 19 | Mar 18 | Mar 17 | Mar 16 | Mar 15 | Mar 14 | Mar 13 | Mar 12 | Mar 11 | Mar 10 | Mar 9 | Mar 8 | Mar 7 | Mar 6 | Mar 5 | Mar 4 | Mar 3 | Mar 2 | Mar 1 | Feb 28 | Feb 27 | Feb 26 | Feb 25 | Feb 24 | Feb 23 | Feb 22 | Feb 21 | Feb 20 | Feb 19 | Feb 18 | Feb 17 | Feb 16 | Feb 15 | Feb 14 | Feb 13 | Feb 12 | Feb 11 | Feb 10 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 |
Mac | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Linux | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
DustBuster
DustBuster is a package for Sublime Text used for syntax definitions in .dust files. It also includes custom shortcut completions for dustjs-helpers and dustjs logic syntax.
Features
- syntax definition for .dust files (with html support)
- sublime completions for supported dustjs-helpers and dustjs logic
Requirements
Installing DustBuster
- cmd+shift+p, Install Package, search for DustBuster or Dust
Activating the Dust syntax definition for all .dust files
- open any .dust file and then select View > Syntax > Dust
Supported Helpers
Additional IDE Support
- Atom package :: language-dustjs
- VSCode extension :: vscode-dustjs
Sublime Completions
- to use these completions, just start typing the completion name and hit tab
- for example, type “ds”, hit tab and
{#name}{/name}
will be rendered - you can then tab through the snippet and change values
- type “d”, then control+spacebar to view all of the completions
ds|dust-section
{#section-name}
{/section-name}
db|dust-block
{+block-name}
{/block-name}
dy|dust-yes-exist
{?name} {/name}
dn|dust-no-exist
{^name} {/name}
dp|dust-partial
{>"path/to/partial"/}
dpi|dust-partial-inline
{<inline-partial-name}
{/inline-partial-name}
dpp|dust-partial-params
{>"path/to/partial" params /}
dpd|dust-partial-dynamic
{>"path/to/partial{dynamic-param}" /}
deq|dust-equals
{@eq value="bar"} {/eq}
deqe|dust-equals-else
{@eq key="10" value="price"}
Your price is 10
{:else}
Your price is not 10
{/eq}
dne|dust-not-equals
{@ne key="foo" value="foo"} {/ne}
dlt|dust-less-than
{@lt value=XX} {/lt}
dlte|dust-less-than-equals
{@lte value=XX} {/lte}
dgt|dust-greater-than
{@gt key="XX" value="20" type="number"} {/gt}
dgte|dust-greater-than-equals
{@gte key="XX" value="XX" type="number"} {/gte}
dm|dust-math
{@math key="XX" method="XX" operand="XX" round="true|false"/}
dma|dust-math-add
{@math key="XX" method="add" operand="XX"/}
dms|dust-math-subtract
{@math key="XX" method="subtract" operand="XX"/}
dmm|dust-math-multiply
{@math key="XX" method="multiply" operand="XX"/}
dmd|dust-math-divide
{@math key="XX" method="divide" operand="XX"/}
dmr|dust-math-round
{@math key="XX.5" method="round"/}
dmf|dust-math-floor
{@math key="XX.5" method="floor"/}
dmc|dust-math-ceil
{@math key="XX.5" method="ceil"/}
dmabs|dust-math-abs
{@math key="XX.5" method="ceil"/}
dmeq|dust-math-eq-filter
dskt|dust-select-with-key-and-type
{@select key="foo" type="string"}
{/select}
dsmcd|dust-select-multi-condition-with-default
{@select key="foo"}
{@eq value="bar"}bar{/eq}
{@eq value="baz"}baz{/eq}
{@eq value="biz"}biz{/eq}
{@default value="default"}default{/default}
{/select}
dsia|dust-select-inside-array
{#array}
{@select key=.}
{@eq value="foo"}foo{/eq}
{@eq value="bar"}bar{/eq}
{@default value="default"}default{/default}
{/select}
{/array}
dsize|dust-size
{@size key=XX/}
ddump|dust-context-dump
{@contextDump key="current|full" to="output|console" /}
dsep|dust-separator
{@sep} {/sep}
dfs|dust-filter-suppress-auto-escape
{name|s}
dfh|dust-filter-force-html-escaping
{name|h}
dfj|dust-filter-force-javascript-escaping
{name|j}
dfu|dust-filter-native-encodeURI
{name|u}
dfuc|dust-filter-native-encodeURIComponent
{name|uc}
dfjs|dust-filter-stringify-json
{name|js}
dfjp|dust-filter-parse-json
{name|jp}
Additional Credits
DustBuster is a complete rewrite of a previous package by sntran and gpbl.
License
(The MIT License)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.