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