0.1.21 • Published 7 months ago

g45-react v0.1.21

Weekly downloads
-
License
ISC
Repository
github
Last release
7 months ago

G45-REACT

This is a package to bundle react routes into an app.
Remove a lot of boilerplate and enable code reusability.
Easy to start your project and create a single page app with server side functionality.

npm install g45-react
or
npm install https://github.com/g45t345rt/g45-react/package

Setup project

Your app must return an array of react-router routes.
That's sit, the rest is handled for you.
Check the Demo project in /test folder.

Bundler

node ./node_modules/g45-react/bundler.js --type cf_worker --entry ./src/routes.js

The bundler can build from 3 variants.

  • index (simple index.html app with no SSR).
  • node_server (create node SSR app using express).
  • cf_worker (create SSR app for Cloudflare Workers).

The bundler will output in ./dist folder.

Lang

Add translation to your app.
The script will check all files in ./src and create a language dictionary that can be imported with useLang hook.

node ./node_modules/g45-react/lang-dict.js --src ./src --outfile ./lang/en.json

Other

Public folder

Create a /public folder will be copied in the /dist folder.

Use hooks

Check /hooks for helpers that gives you control on server request and data.

Use components

Check /components for generic components that can be useful for any project.

0.1.20

7 months ago

0.1.21

7 months ago

0.1.19

7 months ago

0.1.16

11 months ago

0.1.17

11 months ago

0.1.18

11 months ago

0.1.13

1 year ago

0.1.14

1 year ago

0.1.15

12 months ago

0.1.12

1 year ago

0.1.11

1 year ago

0.1.10

1 year ago

0.1.9

2 years ago

0.1.8

2 years ago

0.1.7

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago