Skip to main content

@rexlabs/plz-cli-templates

This package contains all the rexlabs internal plz-cli templates. They should be used instead of the public default ones, since they come with our prefered setups including all the private libraries we use but haven't open sourced yet.

How to use this packages

# Install plz globally
npm i -g @rexlabs/plz-cli

# Install globally
npm i -g @rexlabs/plz-cli-templates

# Set the templates as your new default templates
plz config templates.react-app "$(npm root -g)/@rexlabs/plz-cli-templates/react-app"
plz config templates.react-component "$(npm root -g)/@rexlabs/plz-cli-templates/react-component"
plz config templates.module "$(npm root -g)/@rexlabs/plz-cli-templates/module"

# Or short to set all available templates
plz use @rexlabs/plz-cli-templates

# You can always see your current config via
plz config --get

Templates

react-app

Standard template for React SPAs. It bootstraps the application following our current conventions, setting up core architechture such as Redux, model generator and whereabouts. This should enforce best practise from the get go.

react-component

Template for building react component libraries, coming with storybook setup.

module

Template for any non-react libraries.

react-website

⚠️ Experimental

Template for mostly static React websites, using the react-app project type in plz, adding a few adjustments to the setup and template to improve website DX, such as automated routing through file discovery, pre-rendering and favicon generation through webpack plugins, etc.