generate-react-ts-code-base

1.0.75 • Public • Published

Generating basic reactjs source code

router

  • This package was based on create-react-app package, it will generate the simple code base that contains:

    • redux toolkits
    • react router
    • dynamic layout
    • dynamic env
    • config axios
    • some useful hooks, helpers function
    • scoped style (SCSS, CSS)
    • ...
  • next feature

    • Command
      • generate:
        • router
        • page
        • component
        • thunk
        • saga
        • env
        • ...

Install this package as global

npm i -g generate-react-ts-code-base

// or

yarn global add generate-react-ts-code-base

Or install this package inside an exist reactjs project

npm i -s generate-react-ts-code-base

// or

yarn add generate-react-ts-code-base

Usuage

Create reactjs typescript project from zero (initial new react ts app)

  • Step 0: (prerequire)
    • create-react-app must installed before
    • this package (generate-react-ts-code-base) must installed as global
  • Step 1: move to any where you wanna create new react ts app
  • Step 2: press this command bellow
npx generate-react-ts-code-base

// or

npx ahihi

// or

yarn run generate-react-ts-code-base

// or
yarn run ahihi
  • ahihi is an alias of generate-react-ts-code-base

For example:

cd ~/Desktop
npx generate-react-ts-code-base

// or

cd ~/Desktop
npx ahihi

Add the code base and some configs to your exist react typescript app (this package only work in react typescript app)

  • Step 1: Move to your root react app
  • Step 2: Run this command bellow
npx generate-react-ts-code-base

// or

npx ahihi

For example:

cd ~/Desktop/my-react-ts-app
npx generate-react-ts-code-base

// or

cd ~/Desktop/my-react-ts-app
npx ahihi

Create scoped scss

  • Write your css in a file ends with .scoped.scss (scss & css are also supported)
  • For example: style.scoped.scss or style.scoped.css, ...

Change/Update env

  • Change localhost to your domain at ./public/env env folder
  • Use command to run a specific env env folder

Model & API

  • Write API request or all your models in services folder services

src/router

  • Config router (./src/router) router

src/layouts

  • Currently we have 3 layout demo at ./src/layouts

src/pages

  • Define page component

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.756latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.756
1.0.741
1.0.731
1.0.721
1.0.711
1.0.701
1.0.691
1.0.681
1.0.671
1.0.661
1.0.651
1.0.641
1.0.631
1.0.621
1.0.611
1.0.591
1.0.581
1.0.571
1.0.561
1.0.551
1.0.541
1.0.531
1.0.521
1.0.511
1.0.501
1.0.490
1.0.481
1.0.471
1.0.461
1.0.451
1.0.441
1.0.431
1.0.421
1.0.410
1.0.400
1.0.391
1.0.381
1.0.371
1.0.361
1.0.351
1.0.341
1.0.331
1.0.321
1.0.311
1.0.301
1.0.291
1.0.281
1.0.261
1.0.241
1.0.231
1.0.221
1.0.210
1.0.201
1.0.191
1.0.181
1.0.171
1.0.161
1.0.151
1.0.141
1.0.131
1.0.121
1.0.111
1.0.101
1.0.91
1.0.81
1.0.71
1.0.61
1.0.51
1.0.41
1.0.31
1.0.21
1.0.11
1.0.01

Package Sidebar

Install

npm i generate-react-ts-code-base

Weekly Downloads

74

Version

1.0.75

License

ISC

Unpacked Size

854 kB

Total Files

99

Last publish

Collaborators

  • trunghn