Giter VIP home page Giter VIP logo

respa's Introduction

respa v0.1.12

NPM version NPM downloads

Respa is a React/Redux based SPA framework, which has already made the hard choices for you and you can keep your code base extremely clean.

The document is WIP, you can refer to the demo, we'll add more examples later. To run the demo:

respa$ cd demo
demo$ yarn install
demo$ yarn respa
demo$ yarn respa dist # build for production

If you're interested in this project please tell me: [email protected]

TODO list

We aim to make respa a production-ready scaffold, maybe more than a scaffold. We'll use it internally before a public release (or never); you're welcome to give it a try and let us know your ideas.

  • React + Redux + webpack
  • Choose from react/preact, less/sass, style-loader/extract-text-plugin by installing in guest app
  • Support global (theme) css styles along with component styles using css-module with BEM classnames
  • Postcss-loader with guest config
  • Action generator to avoid action name conflicts and to reduce bundle size
  • Generate root reducer from a tree like reducer definition
  • Configurable view loader for react component code splitting
  • Latest react-router and history api integration (But I don't like it, might use another solution for this)
  • Rewrite this whole thing using typescript, and let guest app to choose which version (typescript/esm) to build from
  • I18n solution
  • Unit test solution
  • Docs and project site

Respa Project Structure

Asuming that webapp is your code base root. These files are used by respa framework:

webapp/src/
├── index.html   -> the index page template.
├── preboot.js   -> An optional pre-boot script, before the react app is loaded, e.g. login redirect, pre-load user info or app config, etc.
├── actions/     -> all actions created using `respa/createAction`
├── reducers/
│   └── index.js -> export the pre-defined reducer tree.
└── views/
    └── index.js -> the App container including Routes.

Use Respa

Respa must be installed locally in order to make dependencies available.

webapp$ yarn add respa

To start the hot reload dev server:

webapp$ yarn respa # or npx

To build for production:

webapp$ yarn respa build
# or
webapp$ yarn respa dist

respa's People

Contributors

bestmike007 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  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.