Giter VIP home page Giter VIP logo

sublime-lightning's Introduction

sublime-lightning

Sublime Plugin for Lightning Component Development

This plugin requires Sublime Text 3 and works in conjunction with the Force CLI. You can download the version for your OS here: https://force-cli.herokuapp.com

Make sure that you have installed the Force CLI into a folder on your path and that is marked as executable.

To install the plugin, you will need to install Package Control. Installation instructions are here: https://sublime.wbond.net/installation

Once you have both of these installed, create a new folder to be your working folder.

mkdir mywork

cd mywork

Launch Sublime Text and open the new folder. If you have not logged in recently from the command line, you can right-click the folder in Sublime's sidebar and click "Salesforce Login". In the bottom tray of Sublime enter your username and hit the enter key, enter your password (the password will be shown in clear text, sorry) and hit the enter key.

At this point, you will not be able to create any Lightning artifacts, unless you have a folder under your work directory named 'metadata/aura'. You can, however, fetch existing Lightning artifacts by right clicking the work folder and selecting "Fetch Lightning". This will query your Salesforce instance for all Lightning bundles and display them for you to choose which thing you want to edit. You can open all lightning bundles at once, scroll to the one you want, or begin typing the name of the Lightning bundle to filter the list and then select the one you want.

Once you have a Lightning bundle locally in sublime, you can begin editing your component, controller, event, app, css. To save your changes back to Salesforce, simply press cmd+s on your Mac or ctrl+s on your Windows machine. You will see a verification of the save and the time it took in the status bar at the bottom of the screen. You will also see any errors that might have prevented pushing component artifact there as well.

To create a new Lightning bundle, right-click the "aura" folder and select the type of component that you want to create. You are prompted for a name at the bottom of the screen. Enter a name and hit enter. Once your bundle is created, you can right click the bundle folder and add other artifacts to your bundle as appropriate for the type of bundle that you created.

Deleting artifacts is accomplished by right-clicking the file and selecting "Delete Lightning Definition". This will only delete the selected file and remove that artifact from the bundle both locally and on Salesforce. If you want to delete the entire bundle, right-click the bundle folder and select "Delete Lightning Bundle". Deletes CANNOT be undone and there is no confirmation prompt in the current version of the plugin.

You can safely right click any file or folder and select the Sublime menu item for deleting file or folder, as what is saved locally is a copy of what is in Salesforce. You can easily retrieve the Lightning bundle or artifact by re-fetching, right-click and select "Fetch Lightning".

screenshot-238

screenshot-237

screenshot-236

screenshot-235

See "how to" video below.

http://img.youtube.com/vi/A_sUTfeGKxw/0.jpg

sublime-lightning's People

Contributors

dcarroll avatar devangel avatar nathanialle avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.