ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Compile Selected ES6

by xinchaobeta ST2/ST3

[DEPRECATED] a sublime plugin for compiling the selected es6 code on the fly, since the babel sublime plugin did not provide this feature

Details

Installs

  • Total 3K
  • Win 2K
  • OS X 830
  • Linux 273
Nov 15 Nov 14 Nov 13 Nov 12 Nov 11 Nov 10 Nov 9 Nov 8 Nov 7 Nov 6 Nov 5 Nov 4 Nov 3 Nov 2 Nov 1 Oct 31 Oct 30 Oct 29 Oct 28 Oct 27 Oct 26 Oct 25 Oct 24 Oct 23 Oct 22 Oct 21 Oct 20 Oct 19 Oct 18 Oct 17 Oct 16 Oct 15 Oct 14 Oct 13 Oct 12 Oct 11 Oct 10 Oct 9 Oct 8 Oct 7 Oct 6 Oct 5 Oct 4 Oct 3 Oct 2 Oct 1
Windows 0 1 0 1 1 1 4 1 0 3 0 1 1 1 0 0 1 0 0 3 1 1 1 1 1 1 1 2 1 0 2 2 0 3 1 2 0 0 1 2 0 0 1 1 3 2
OS X 0 0 0 0 0 0 1 0 0 0 0 0 0 0 3 0 2 1 0 0 0 0 0 1 0 0 1 0 0 0 1 0 0 1 1 0 0 0 1 1 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 1 0 0 0 0 0 0 0 0 1 0 0

Readme

Source
raw.​githubusercontent.​com

Compile Selected ES6 Package for Sublime Text 3

[DEPRECATED] This project has been deprecated – please use the official project babel-sublime instead

A sublime plugin for compiling the selected es6 code on the fly, since the babel sublime plugin did not provide this feature

Requirements

In order for build system to work you will need babel installed via npm and available in your PATH.

Install

The easiest way to install this is with Package Control.

  • Bring up the Command Palette (Command+Shift+p on OS X, Control+Shift+p on Linux/Windows).
  • Select “Package Control: Install Package” (it'll take a few seconds)
  • Select Compile Selected ES6 when the list appears.

Package Control will automatically keep the package up to date with the latest version.

Screenshots

the-usage-of-plugin

  • Compile Select ES6 plugin supports both javascript ES6 sytax and JSX syntax. First you select the content you want to compile, then you right click the mouse and select compile es menu.

the-result-of-compiled-code

  • Now you got the compiled code.

Note that you can also use the keyboard shortcut Option+Shift+d to compile the code without using the mouse way.


check-syntax-on-save

  • By default, the plugin will check synax error when you save the file. You can disable this feature by changing the plugin user setting checkSyntaxOnSave to false.

Settings

Go to Preferences > Package Settings > Compile Selected ES6 > Settings - User to change settings.

Full details in the comments in Preferences > Package Settings > Compile Selected ES6 > Settings - Default

There's two ways to change the stage option. One way is using the plugin user setting. Another way is creating a .babelrc file in the project directory. The .babelrc file settings will override the plugin user settings.

Note if you changed the stage value in the settings, make sure you installed the latest version of Babel whose CLI support --stage .

Issues & Feature Requests

Please use GitHub Issue Tracker to report any bugs and make feature requests.

Licensing

Licensed under permissive MIT-style license