jasmine - Sublime Text: Different Snippet for JavaScript ES5 vs ES6? -
i have these snippets use regularly when writing tests in jasmine, example of 1 is;
<snippet> <content><![cdata[ beforeeach(function() { }); ]]></content> <tabtrigger>be</tabtrigger> <scope>source.js</scope> </snippet>
what i'm wondering (possibly using <scope>
value?) if output different based on current language between javascript, javascriptnext — es6 syntax, , jsx? far do, these share source.js
scope?
the output want is;
javascript
beforeeach(function() { });
javascriptnext — es6 syntax, , jsx
beforeeach(() => { });
thanks time.
the scope
depends on syntax using file.
es6 syntax highlighters uses source.js
compatibility reasons.
babel-sublime/javascript (babel).sublime-syntax
javascriptnext.tmlanguage/javascriptnext.yaml-tmlanguage
syntax (e.g. markdown) may specify portion of text source.js
, handled es6 syntax.
you have forked jsnext syntax , use scope, source.js.es6
.
i recommend facelessuser/scopehunter checking scopes.
Comments
Post a Comment