GithubHelp home page GithubHelp logo

bretsky / sublime-react-create-component Goto Github PK

View Code? Open in Web Editor NEW

This project forked from alexsands/sublime-react-create-component

0.0 0.0 0.0 7 KB

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

License: MIT License

Python 100.00%

sublime-react-create-component's Introduction

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)
  2. 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 6. 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.

sublime-react-create-component's People

Contributors

alexsands avatar bretsky 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.