Skip to content

Commit a92fa8b

Browse files
committed
RBB 2024 update
* Updated all libraries to ~latest, supported and secure libraries * Replaced any un-mantained/archived libraries with modern counterparts * Improved node, npm and operating systems compatibility
1 parent 8ad4f24 commit a92fa8b

40 files changed

+25022
-857
lines changed

.eslintrc

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,35 @@
11
{
22
"env": {
3-
"browser": true
3+
"browser": true,
4+
"node": true,
5+
"es6": true
46
},
5-
"parser": "babel-eslint",
7+
"parser": "@babel/eslint-parser",
68
"extends": [
79
"eslint:recommended",
810
"plugin:react/recommended"
911
],
1012
"rules": {
11-
"no-console": 0,
12-
"no-undef":0
13+
"no-console": 0,
14+
"no-undef": 0
15+
},
16+
"overrides": [
17+
{
18+
"files": ["src/index.js"],
19+
"rules": {
20+
"react/no-deprecated": "off"
21+
}
22+
}
23+
],
24+
"parserOptions": {
25+
"requireConfigFile": false,
26+
"babelOptions": {
27+
"presets": ["@babel/preset-env", "@babel/preset-react"]
28+
}
29+
},
30+
"settings": {
31+
"react": {
32+
"version": "detect"
1333
}
34+
}
1435
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Code Quality Checks
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
8+
jobs:
9+
code_quality_checks:
10+
name: Code Quality Checks
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v3
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v3
19+
with:
20+
node-version: 20.x
21+
22+
- name: Install dependencies
23+
run: npm ci
24+
25+
- name: Run lint
26+
run: npm run lint
27+
28+
- name: Run tests
29+
run: npm test
30+
31+
- name: Upload coverage report
32+
if: success()
33+
uses: actions/upload-artifact@v3
34+
with:
35+
name: coverage
36+
path: coverage/lcov-report

README.md

Lines changed: 49 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,65 @@
1-
<img src="http://qwebdev.ro/media/rbb/thumb.png" data-canonical-src="http://qwebdev.ro/media/rbb/thumb.png" width="100%" />
2-
A ready to go React js boilerplate, backed by latest techs and tools to get your React projects on feet in no time. The boilerplate includes basic API call example and UI elements usage example.
1+
## About
32

4-
### Getting started
5-
You can also check out the official page of the boilerplate [Here](https://rbb.qdev.tech).
3+
A ready-to-go, production ready React.js boilerplate, backed by reliant technologies and tools to get your React projects up and running in no time. The boilerplate includes basic examples of API calls and UI elements usage.
64

7-
#### Installation and development mode
5+
---
6+
7+
##### 2024 Update
8+
9+
While researching different frameworks and tools to assist with building new SPAs, I realized that this older boilerplate had some neat development and production tools that facilitate fast development.
10+
11+
All deprecated libraries have been updated, and those no longer supported have been replaced with alternatives that offer long-term support.
12+
13+
Compatibility with the latest versions of Node.js, npm, and operating systems has also been improved.
14+
15+
## Getting Started
16+
17+
You can also check out the official page of the boilerplate [here](https://rbb.qdev.tech).
18+
19+
#### Installation and Development Mode
820

921
* `git clone https://github.com/theqdev/react-big-bang`
1022
* `npm run setup` or `npm install`
1123
* `npm start`
1224

25+
### Creating a Production Build
1326

14-
#### Creating production build
15-
16-
* `npm run clean-dist` _Cleans build directory_
17-
* `npm run prebuild` _Cleans build directory and runs Lint plus Tests_
18-
* `npm run build` _Generates production build_
19-
* `npm run analyze-bundle` _Analyze bundle size and it's libraries_
27+
* `npm run clean-dist` - _Cleans the build directory_
28+
* `npm run prebuild` - _Cleans the build directory and runs linting and tests_
29+
* `npm run build` - _Generates the production build_
30+
* `npm run analyze-bundle` - _Analyzes bundle size and its libraries_
2031

32+
### Linting and Tests
2133

22-
#### Linting and Tests
23-
* `npm lint` or `npm lint:watch`
34+
* `npm run lint` or `npm run lint:watch`
2435
* `npm run test`
2536

26-
### Technologies
27-
28-
Slingshot offers a rich development experience using the following technologies:
29-
30-
| **Tech** | **Description** |
31-
|----------|-------
32-
| [React](https://facebook.github.io/react/) | Fast, composable client-side components. |
33-
| [Redux](http://redux.js.org) - [Redux Sauce](https://github.com/infinitered/reduxsauce) - [Redux Saga](https://github.com/redux-saga/redux-saga) | Clean and modern implementation of Redux. Enforces unidirectional data flows and immutable, hot reloadable store that supports time-travel debugging. |
34-
| [react-bootstrap](https://react-bootstrap.github.io/) | React Bootstrap UI kit for React Js. |
35-
| [APISauce](https://github.com/infinitered/apisauce) | Axios Based API wrapper for mapping your app's backend. |
36-
| [React Router](https://github.com/reactjs/react-router) | A complete routing library for React |
37-
| [Babel](http://babeljs.io) | Compiles ES6 to ES5. Enjoy the new version of JavaScript today. |
38-
| [Webpack](https://webpack.js.org) | Bundles npm packages and our JS into a single file. Includes hot reloading via [react-transform-hmr](https://www.npmjs.com/package/react-transform-hmr). |
39-
| [Browsersync](https://www.browsersync.io/) | Lightweight development HTTP server that supports synchronized testing and debugging on multiple devices. |
40-
| [Jest](https://facebook.github.io/jest/) | Automated tests with built-in expect assertions and [Enzyme](https://github.com/airbnb/enzyme) for DOM testing without a browser using Node. |
41-
| [TrackJS](https://trackjs.com/) | JavaScript error tracking. |
42-
| [ESLint](http://eslint.org/)| Lint JS. Reports syntax and style issues. Using [eslint-plugin-react](https://github.com/yannickcr/eslint-plugin-react) for additional React specific linting rules. |
43-
| [SASS](http://sass-lang.com/) | Compiled CSS styles with variables, functions, and more. ||
44-
| [PostCSS](https://github.com/postcss/postcss) | Transform styles with JS plugins. Used to autoprefix CSS |
45-
| [Editor Config](http://editorconfig.org) | Enforce consistent editor settings (spaces vs tabs, etc). |)
46-
| [npm Scripts](https://docs.npmjs.com/misc/scripts)| Glues all this together in a handy automated build. |
37+
## Technologies
38+
39+
Under the hood, the kit is powered by:
40+
41+
| **Tech** | **Description** |
42+
|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
43+
| [React](https://facebook.github.io/react/) | Fast, composable client-side components. |
44+
| [react-bootstrap](https://react-bootstrap.github.io/) | React Bootstrap UI kit for React.js. |
45+
| [Redux](http://redux.js.org) - [Redux Sauce](https://github.com/infinitered/reduxsauce) - [Redux Saga](https://github.com/redux-saga/redux-saga) | Redux store implementation. Enforces unidirectional data flows and an immutable, hot-reloadable store that supports time-travel debugging. |
46+
| [APISauce](https://github.com/infinitered/apisauce) | Axios-based API wrapper for mapping your app's backend. |
47+
| [React Router](https://github.com/reactjs/react-router) | A complete routing library for React. |
48+
| [Babel](http://babeljs.io) | Compiles code to any desired presets. |
49+
| [Webpack](https://webpack.js.org) | Bundles npm packages and our JS into a single file. Includes hot reloading. |
50+
| [Browsersync](https://www.browsersync.io/) | Lightweight development HTTP server that supports synchronized testing and debugging on multiple devices. |
51+
| [Jest](https://facebook.github.io/jest/) | Automated tests with built-in expect assertions and react-testing-library for DOM testing without a browser using Node. |
52+
| [TrackJS](https://trackjs.com/) | JavaScript error tracking. |
53+
| [ESLint](http://eslint.org/) | Lint JS. Reports syntax and style issues. Using [eslint-plugin-react](https://github.com/yannickcr/eslint-plugin-react) for additional React-specific linting rules. |
54+
| [SASS](http://sass-lang.com/) | Compiled CSS styles with variables, functions, and more. |
55+
| [PostCSS](https://github.com/postcss/postcss) | Transforms styles with JS plugins. Used to autoprefix CSS. |
56+
| [EditorConfig](http://editorconfig.org) | Enforces consistent editor settings (spaces vs tabs, etc). |
57+
| [npm Scripts](https://docs.npmjs.com/misc/scripts) | Glues all this together in a handy automated build. |
58+
59+
## Contributing
4760

61+
If you ever end up using this and find a fix or an improvement, don't hesitate to open a [PR of your changes](https://docs.github.com/en/get-started/exploring-projects-on-github/contributing-to-a-project).
4862

4963
---
5064

51-
Check out our website at [Qdev](https://qdev.tech) and our code marketplace at [Alkanyx](https://alkanyx.com) for more cool stuff.
65+
Check out our website at [Qdev](https://qdev.tech) and our other projects at [Envato Market](https://codecanyon.net/user/ic0de) for more cool stuff.

babel.config.js

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
// babel.config.js
2+
module.exports = function(api) {
3+
api.cache(false);
4+
return {
5+
"env": {
6+
"development": {
7+
"presets": [
8+
"@babel/preset-env",
9+
"@babel/preset-react"
10+
],
11+
"plugins": [
12+
"react-refresh/babel"
13+
]
14+
},
15+
"production": {
16+
"presets": [
17+
[
18+
"@babel/preset-env",
19+
{
20+
"modules": false,
21+
"targets": {
22+
"ie": 9
23+
},
24+
"useBuiltIns": "entry",
25+
"corejs": 3
26+
}
27+
],
28+
"@babel/preset-react"
29+
],
30+
"plugins": [
31+
"@babel/plugin-transform-react-constant-elements",
32+
"babel-plugin-transform-react-remove-prop-types"
33+
]
34+
},
35+
"test": {
36+
"presets": [
37+
"@babel/preset-env",
38+
"@babel/preset-react"
39+
]
40+
}
41+
}
42+
};
43+
};

jest.config.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// jest.config.js
2+
module.exports = {
3+
moduleNameMapper: {
4+
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/tools/assetsTransformer.js",
5+
"\\.(css|scss|sass)$": "<rootDir>/tools/assetsTransformer.js"
6+
},
7+
setupFilesAfterEnv: ["@testing-library/jest-dom/extend-expect"],
8+
testEnvironment: "jsdom",
9+
testEnvironmentOptions: {
10+
url: "http://localhost"
11+
}
12+
};

0 commit comments

Comments
 (0)