@simmalugnt-se/next-cli
v2.1.8
Published
Simma Lugnt React CLI
Downloads
198
Readme
sl-react-cli
Install
Install using npm
npm install git+ssh://[email protected]: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-migratecomponents/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:
storyblok/Hero.js
which is a migration file for setting up the blok in Storyblok. Read more here: https://github.com/maoberlehner/storyblok-migrate