Giter VIP home page Giter VIP logo

react-npm-starter's Introduction

react-npm-starter

simplely use create-react-app to build npm library,we save webpack.config.js in config fold,and modify it with webpack.lib.js.if create-react-app updated,we only need to read webpack.config.js,and modify in webpack.lib.js
demo app created by create-react-app,npm start worked
we only change "npm build" to "npm build:web"

install webpack-cli and fork-ts-checker-webpack-plugin-alt

call npm install --save-dev webpack-cli call npm install --save-dev fork-ts-checker-webpack-plugin-alt [2019.3.20]we should install it so create-react-app could work

make npm packages with create-react-app

  1. npm run build build the library at react-npm-starter fold in src
  2. npm run go publish the library to npm
  3. npm run copy copy the build result to node_modules,so we could import some thing from 'react-npm-starter' and the app.js could work

demo app

src/index as entry point,it's the demo app we could use some scripts like create-react-app

  1. npm start start demo app in development mode
  2. npm run build:web build the demo app which start from src/index.js in production mode.

test for library and demo app

  1. npm run test

visual studio code

  1. at debug view,run "start" will debug demo app we must run npm start first,and could use ctrl+shift+B to run it
  2. at debug view,run "test" will debug test

react-npm-starter's People

Contributors

bidanjun avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.