This is beta. Official release coming soon
Rockpack is a simple solution for creating React Application with Server Side Rendering, bundling, linting, testing.
Rockpack The main goal is to reduce project setup time from weeks to 5 minutes.
Rockpack will help if:
- Beginners. With the help of Rockpack, any newbie to React can deploy a project of any complexity in a few minutes, with configured webpack, eslint, jest, etc. Applications can be either regular Single Page or with a project structure, Server Side Render, etc.
- Large projects from scratch. Rockpack supports most of the webpack best practices configurations, eslint rules, jest, typescript and will work great even on large projects
- Startup. If you need to quickly check an idea without wasting time on unfolding and setting up the project.
- Library or React component. If you want to write a UMD library or React component, with support for the esm/cjs build as well as the minified version.
- Legacy projects or modular use. Rockpack is a modular platform, you can only use what you need. Please see every modules' readme.
Also, pay attention to module iSSR. This tiny module helps you to move your React application to Server-Side Rendering. Please see articles:
Working on many React projects, we are faced with the same type of routine tasks. We answer questions every time:
- How to set up an efficient build system with support for many formats and Typescript we need
- Which linter's rules should be on the project for comfortable work
- How to set up Jest that it works with Babel or Typescript
- How to make server-side rendering to work with existing solutions - Redux, Apollo and other
- How to set up Webpack for server-side rendering and get production ready artifact and cool dev server
Every time we spend weeks on these routine tasks.
Using Rockpack you can deploy your project in minutes and start writing really useful code.
Rockpack modules overview
Rockpack consists of modules. Let's consider them in more detail:
this is create-react-app on steroids. Supports the following types of applications:
- React CSR - React Client Side Render. Application skeleton in create-react-app style.
- React SSR Light Pack - React Server Side Render. Customized application for Server Side Render.
- Koa is being used for the server
- React SSR Full Pack - React Server Side Render. Application skeleton using best practices for project structure and a set of libraries
- Koa is being used for the server
- Library - Configured webpack to create UMD library, both React Component and Vanilla JS
All types of applications support:
- Import of many file formats. List of formats
- Image optimization, SVG Optimization
- Loading SVG files as React components
- CSS/SCSS/Less modules
- Babel or TS; TS support for CSS/SCSS/Less modules
- PostCSS Autoprefixer
- SEO Optimizations, React optimizations, Antd optimizations
- Support for settings via Dotenv and Dotenv safe
- Bundle Analyzer
- GraphQL support
Full list of features see here
Additionally, for each type of application, you can install:
- Configured ESLint with best practices rules @rockpack/codestyle
- Customized Jest with additions @rockpack/tester
This is React bundler (based on Webpack) using a set of necessary loaders, plugins and using the best practices out of the box.
@rockpack/compiler can help you with:
- Compile your React application (TS/Babel)
- Compile React Component or VanillaJS UMD library (TS/Babel)
- Nodejs backend (TS/Babel)
- Markup html files
- Compile isomorphic (Server-side rendering) application (TS/Babel)
- Bundle analyze (TS/Babel)
This is Jest with cool config, add-ons and fully compatible with TS / Babel.
This is an efficiently customized Eslint with many best practical rules and additions.
In order to get more detailed info please follow each module links.
Rockpack is completely free project. We are always open to collaboration and contributors.
The Rockpack project was inspired by:
Why do we need Rockpack...?
...if we have create-react-app or other?
- Rockpack provides a very easy way to get started with @rockpack/starter. Just one command allows you to set up your application with support for TypeScript, Jest, Eslint, SSR and more.
- Rockpack is very flexible. You can design the architecture as you like, use different libraries and solutions, for example, for state management.
- Rockpack doesn't add any magic. This is a set of best practices and libraries for automating the start of a project.
- Rockpack has the option of modular integration into legacy project.
- Rockpack has the ability to modify the webpack.config without "eject" with the ability to update Rockpack.
- Rockpack uses only existing modules and approaches and don't reinventing the wheel.
The MIT License
Copyright (c) Aleksandrov Sergey
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.