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

React Create Component

by alexsands ALL

A plugin for creating React Components in Sublime Text 2 and 3.

Labels react, es6, sidebar

Details

Installs

  • Total 1K
  • Win 920
  • Mac 280
  • Linux 292
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 Sep 30 Sep 29 Sep 28 Sep 27 Sep 26 Sep 25 Sep 24 Sep 23 Sep 22 Sep 21 Sep 20 Sep 19 Sep 18 Sep 17 Sep 16 Sep 15 Sep 14 Sep 13 Sep 12 Sep 11 Sep 10 Sep 9 Sep 8 Sep 7 Sep 6
Windows 0 4 0 2 2 4 4 3 6 3 3 6 5 6 6 1 4 2 4 3 8 2 3 6 8 2 4 6 2 4 3 4 0 3 5 4 7 6 4 3 9 2 4 4 9 5
Mac 0 1 1 1 0 0 2 1 3 4 1 0 1 2 2 0 0 0 1 0 2 1 1 3 2 1 0 1 0 0 0 0 2 3 3 0 3 1 0 3 1 2 3 1 1 1
Linux 0 3 1 2 0 1 0 0 0 2 1 2 1 1 4 2 3 1 0 2 1 1 1 1 1 1 2 0 1 2 5 0 1 3 2 5 3 1 3 0 2 1 2 0 0 1

Readme

Source
raw.​githubusercontent.​com

Sublime - React Create Component

A plugin for creating React Components in Sublime Text 2 and 3.

This plugin adds a context menu to Sublime's side bar that makes it simple to create a React Component in a parent folder. Simply give the component a name and answer the prompts, then a folder is created inside the parent with:

parent/
|-- ComponentName/
|---- index.js
|---- style.less

The stylesheet extension can be chosen from .css, .less, .scss, or .sass, and can optionally include *.module.* (for css-modules) automatically.

The index.js file can be a Functional or Class component and will contain some helpful skeleton code.

Installation

With Package Control: 1. Run “Package Control: Install Package” command 2. Find and install React Create Component plugin 3. Restart Sublime Text (if required)

Manually: 1. Clone or download this git repo into your packages folder (click Browse Packages to open this folder) 3. Restart Sublime Text (if required)

Usage

Whenever you need to create a new component, just right click on the base folder and select Create React Component. It will:

  1. Ask for a component type (select, then press ENTER)
  2. Ask for a stylesheet type (select, then press ENTER)
  3. Ask if you want CSS Modules enabled (select, then press ENTER)
  4. Ask for a component name (type, then press ENTER)
  5. Create a new folder for the component with the given name
    1. Add an index.js file with skeleton code
  6. Add a stylesheet based on the given preferences

More Info and Bug Tracking

You can get the latest code, make suggestions or report bugs at https://github.com/acsands13/sublime-react-create-component/issues.

Based off Python Create Package by curaloucura.