2.1.8 • Published 10 months ago

@simmalugnt-se/next-cli v2.1.8

Weekly downloads
-
License
ISC
Repository
-
Last release
10 months ago

sl-react-cli

Install

Install using npm

npm install git+ssh://git@github.com:simmalugnt-se/sl-react-cli.git -D

Files and file structure

All folders and files are created for you.

project
│   storyblok.config.js
│
└───lib / config / storyblok
                   │   BlokIndex.tsx
└───storyblok
│   │   Button.js
│   │   ...
│   
└───components
    │   Button.tsx
    │   ...
    │
    └───bloks
    │   Hero.tsx
    │   DynamicComponent.tsx    
    │   ...

Create a new Component

npx sl-create -c Button will create the following files:

  • components/Button.tsx which is the component file with some basic markup and typing for the components properties.

Create a new storyblok Blok

npx sl-create -b Hero will create the following files:

  • storyblok/Hero.js which is a migration file for setting up the blok in Storyblok. Read more here: https://github.com/maoberlehner/storyblok-migrate
  • components/bloks/Hero.tsx which is the component file with some basic markup and typing for the blok properties.
  • lib/config/storyblok/BlokIndex.tsx which is and indexfile that maps all the Storyblok bloks to React components.
  • components/BlokIndex.tsx which is and indexfile that maps all the Storyblok bloks to React components.

Create a new storyblok Post Type

npx sl-create -p Page will create the following files:

2.1.2

11 months ago

2.1.4

11 months ago

2.1.3

11 months ago

2.1.6

11 months ago

2.1.5

11 months ago

2.1.8

10 months ago

2.1.7

10 months ago

2.1.1

1 year ago

2.0.9

1 year ago

2.0.8

1 year ago

2.1.0

1 year ago

2.0.7

1 year ago

2.0.5

2 years ago

2.0.6

2 years ago

2.0.3

2 years ago

2.0.2

2 years ago

2.0.4

2 years ago

2.0.0

2 years ago

1.0.1

3 years ago

1.0.0

3 years ago