ootb

0.1.38 • Public • Published

ootb

react out-of-the-box cli

Install

mkdir project && cd project
npm init -y
yarn add ootb

Config

Set scripts in package.json

  "scripts": {
    "init": "cp -rf ./node_modules/ootb/webpack.config.js ./ && cp -rf ./node_modules/ootb/.babelrc ./ && rm -rf dist && mkdir dist && cp -rf ./node_modules/ootb/index.html dist/index.html && mkdir src && mkdir src/req && cp -rf ./node_modules/ootb/src/index.js src/index.js",
    "html": "rm -rf dist && mkdir dist && cp -rf ./node_modules/ootb/index.html dist/index.html",
    "lib": "rm -rf lib && mkdir lib && cp -rf src/dev/css lib && babel src/dev -d lib",
    "build": "rm -rf dist && mkdir dist && cp -rf ./node_modules/ootb/index.html dist/index.html && webpack -p --optimize-minimize --progress --color",
    "start": "./node_modules/webpack-dev-server/bin/webpack-dev-server.js --open"
  },

Init

yarn run init

Run

yarn run start or yarn run build

User Image

div use backgroundImage

<div style={{ backgroundImage: `url(${require('req/a.png')})` }} />

img use src

<img src={require('req/a.png')}/>

Readme

Keywords

none

Package Sidebar

Install

npm i ootb

Weekly Downloads

2

Version

0.1.38

License

ISC

Last publish

Collaborators

  • ymblender