Skip to content

RBB 2024 update #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 25 additions & 4 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,14 +1,35 @@
{
"env": {
"browser": true
"browser": true,
"node": true,
"es6": true
},
"parser": "babel-eslint",
"parser": "@babel/eslint-parser",
"extends": [
"eslint:recommended",
"plugin:react/recommended"
],
"rules": {
"no-console": 0,
"no-undef":0
"no-console": 0,
"no-undef": 0
},
"overrides": [
{
"files": ["src/index.js"],
"rules": {
"react/no-deprecated": "off"
}
}
],
"parserOptions": {
"requireConfigFile": false,
"babelOptions": {
"presets": ["@babel/preset-env", "@babel/preset-react"]
}
},
"settings": {
"react": {
"version": "detect"
}
}
}
36 changes: 36 additions & 0 deletions .github/workflows/code-quality-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Code Quality Checks

on:
pull_request:
branches:
- master

jobs:
code_quality_checks:
name: Code Quality Checks
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 20.x

- name: Install dependencies
run: npm ci

- name: Run lint
run: npm run lint

- name: Run tests
run: npm test

- name: Upload coverage report
if: success()
uses: actions/upload-artifact@v3
with:
name: coverage
path: coverage/lcov-report
84 changes: 49 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,51 +1,65 @@
<img src="http://qwebdev.ro/media/rbb/thumb.png" data-canonical-src="http://qwebdev.ro/media/rbb/thumb.png" width="100%" />
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.
## About

### Getting started
You can also check out the official page of the boilerplate [Here](https://rbb.qdev.tech).
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.

#### Installation and development mode
---

##### 2024 Update

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.

All deprecated libraries have been updated, and those no longer supported have been replaced with alternatives that offer long-term support.

Compatibility with the latest versions of Node.js, npm, and operating systems has also been improved.

## Getting Started

You can also check out the official page of the boilerplate [here](https://rbb.qdev.tech).

#### Installation and Development Mode

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

### Creating a Production Build

#### Creating production build

* `npm run clean-dist` _Cleans build directory_
* `npm run prebuild` _Cleans build directory and runs Lint plus Tests_
* `npm run build` _Generates production build_
* `npm run analyze-bundle` _Analyze bundle size and it's libraries_
* `npm run clean-dist` - _Cleans the build directory_
* `npm run prebuild` - _Cleans the build directory and runs linting and tests_
* `npm run build` - _Generates the production build_
* `npm run analyze-bundle` - _Analyzes bundle size and its libraries_

### Linting and Tests

#### Linting and Tests
* `npm lint` or `npm lint:watch`
* `npm run lint` or `npm run lint:watch`
* `npm run test`

### Technologies

Slingshot offers a rich development experience using the following technologies:

| **Tech** | **Description** |
|----------|-------
| [React](https://facebook.github.io/react/) | Fast, composable client-side components. |
| [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. |
| [react-bootstrap](https://react-bootstrap.github.io/) | React Bootstrap UI kit for React Js. |
| [APISauce](https://github.com/infinitered/apisauce) | Axios Based API wrapper for mapping your app's backend. |
| [React Router](https://github.com/reactjs/react-router) | A complete routing library for React |
| [Babel](http://babeljs.io) | Compiles ES6 to ES5. Enjoy the new version of JavaScript today. |
| [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). |
| [Browsersync](https://www.browsersync.io/) | Lightweight development HTTP server that supports synchronized testing and debugging on multiple devices. |
| [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. |
| [TrackJS](https://trackjs.com/) | JavaScript error tracking. |
| [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. |
| [SASS](http://sass-lang.com/) | Compiled CSS styles with variables, functions, and more. ||
| [PostCSS](https://github.com/postcss/postcss) | Transform styles with JS plugins. Used to autoprefix CSS |
| [Editor Config](http://editorconfig.org) | Enforce consistent editor settings (spaces vs tabs, etc). |)
| [npm Scripts](https://docs.npmjs.com/misc/scripts)| Glues all this together in a handy automated build. |
## Technologies

Under the hood, the kit is powered by:

| **Tech** | **Description** |
|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [React](https://facebook.github.io/react/) | Fast, composable client-side components. |
| [react-bootstrap](https://react-bootstrap.github.io/) | React Bootstrap UI kit for React.js. |
| [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. |
| [APISauce](https://github.com/infinitered/apisauce) | Axios-based API wrapper for mapping your app's backend. |
| [React Router](https://github.com/reactjs/react-router) | A complete routing library for React. |
| [Babel](http://babeljs.io) | Compiles code to any desired presets. |
| [Webpack](https://webpack.js.org) | Bundles npm packages and our JS into a single file. Includes hot reloading. |
| [Browsersync](https://www.browsersync.io/) | Lightweight development HTTP server that supports synchronized testing and debugging on multiple devices. |
| [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. |
| [TrackJS](https://trackjs.com/) | JavaScript error tracking. |
| [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. |
| [SASS](http://sass-lang.com/) | Compiled CSS styles with variables, functions, and more. |
| [PostCSS](https://github.com/postcss/postcss) | Transforms styles with JS plugins. Used to autoprefix CSS. |
| [EditorConfig](http://editorconfig.org) | Enforces consistent editor settings (spaces vs tabs, etc). |
| [npm Scripts](https://docs.npmjs.com/misc/scripts) | Glues all this together in a handy automated build. |

## Contributing

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

---

Check out our website at [Qdev](https://qdev.tech) and our code marketplace at [Alkanyx](https://alkanyx.com) for more cool stuff.
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.
43 changes: 43 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// babel.config.js
module.exports = function(api) {
api.cache(false);
return {
"env": {
"development": {
"presets": [
"@babel/preset-env",
"@babel/preset-react"
],
"plugins": [
"react-refresh/babel"
]
},
"production": {
"presets": [
[
"@babel/preset-env",
{
"modules": false,
"targets": {
"ie": 9
},
"useBuiltIns": "entry",
"corejs": 3
}
],
"@babel/preset-react"
],
"plugins": [
"@babel/plugin-transform-react-constant-elements",
"babel-plugin-transform-react-remove-prop-types"
]
},
"test": {
"presets": [
"@babel/preset-env",
"@babel/preset-react"
]
}
}
};
};
12 changes: 12 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// jest.config.js
module.exports = {
moduleNameMapper: {
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/tools/assetsTransformer.js",
"\\.(css|scss|sass)$": "<rootDir>/tools/assetsTransformer.js"
},
setupFilesAfterEnv: ["@testing-library/jest-dom/extend-expect"],
testEnvironment: "jsdom",
testEnvironmentOptions: {
url: "http://localhost"
}
};
Loading
Loading