ve-react-cli
TypeScript icon, indicating that this package has built-in type declarations

1.5.5 • Public • Published

ve-react-cli

The ve stands for Visiba Engineering. The entire thing is a play on one of our company motto, "we act" -> "ve React". Clever uh? Okey, it was a bit silly.

A modern React toolkit with primary focus on TypeScript.

Getting started

Installation

Install ve-react-cli globally:

$ npm install -g ve-react-cli
 
# or with Yarn 
$ yarn global add ve-react-cli --prefix /usr/local

Creating a new application

After it's been installed globally, we can create a new application with it.

$ ve new my-project
cd my-project/
$ yarn install

Commands

List of available ve commands.

Global

  • new application: new {name of application}

Local

  • development: dev {options}
  • production: build {options}
  • run production: start {options}

Optional

  • override default port (default: 8000): -p, --port
  • override default input (default: ./src): -i, --input
  • override default output (default: ./dist): -o, --output

Plugins

For advanced customization, plugins can be made to alter each build configuration.

Plugins can be created by adding an .verc.js file in the root directory.

// .verc.js
const { createPlugin } = require('ve-react-cli');
 
const myPlugin = () => createPlugin({
  modifyBabelRc: (babelrc) => {    
    return babelrc;
  },
  modifyWebpackDev: (webpack) => {
    return webpack;
  },
  modifyWebpackProd: (webpack) => {
    return webpack;
  },
});
 
module.exports = {
  plugins: [myPlugin()],
};

Provide Babel config for third party

To expose the Babel config for modules that might need it, e.g. Jest.

// babel.config.js
const { getBabelConfig } = require('ve-react-cli');
 
module.exports = getBabelConfig();

License

This project is licensed under the MIT License - see the LICENSE file for details.

Readme

Keywords

none

Package Sidebar

Install

npm i ve-react-cli

Weekly Downloads

62

Version

1.5.5

License

MIT

Unpacked Size

377 kB

Total Files

46

Last publish

Collaborators

  • emilnordling