Git Product home page Git Product logo

component-creation-nextjs's Introduction

Make Component For NextJS & Styled-Components

This project was created to make a simple CLI that can automagically create the necessary files and folders as well export a new component for NextJS usuing styled components.

This was made entirely in Python with no dependencies.

Installation

To install just run the install.sh file.
Or run the following pip installl -e /path/to/directory

Usage

To use Make Component, simply type mkcomponent and pass two parameters. The first parameter is the name of the component. The second is the name of the Styled Component. The Styled Component and Component cannot be the same name as it will cause issues in your JS file.

Example

mkcomponent slider wrapper

Here we are making a slider component and we will call the parent Styled Component wrapper.

Issues & Fixes

If the mkcomponent command is not working, you may need to type python -m mkcomponent However, if you would like to make it work without the prefix, you can edit your .bashrc file and create a alias.

Example

Edit the file with nano ~/.bashrc

At the bottom of the file add alias mkcomponent='python -m mkcomponent'

This will allow the component to work with just mkcomponent everytime.

component-creation-nextjs's People

Watchers

 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.