npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

create-react-redux-app-structure

v4.6.0

Published

create react redux app structure with build configurations

Downloads

138

Readme

Create React Redux App Structure Twitter URL

MIT Licence codecov Build Status npm version

Create React + Redux app structure with build configurations.

What can I find here?

  • Express, Cors
  • React + Redux, ES6, async/await
  • Web Components (Custom Elements) integration
  • React Router
  • Internationalization
  • SASS
  • PostCSS (autoprefixer), so you do not need -webkit, -moz or other prefixes
  • Build script configuration Development, Staging, Production with CDN, cache-busting support
  • Build script to bundle JS, CSS, with sourcemaps
  • Unit tests Jest, Enzyme
  • E2E Cypress tests
  • ESLint
  • Ghooks (pre-commit with unit tests and eslint validation)
  • Code Coverage (https://codecov.io)
  • Travis CI runs Unit and E2E tests and report to codecov

Quick Start

Create React + Redux app structure works on macOS, Windows, and Linux. If something doesn’t work, please file an issue.

npm

npm i -g create-react-redux-app-structure

yarn

yarn add global create-react-redux-app-structure

create-react-redux-app-structure my-app
cd my-app/
npm run fast-start

http://localhost:8080/ will be opened automatically.

When you are ready to deploy to staging/production please see Build Scripts section.

Getting Started

You will need to have Node >= 6 on your local development machine and Yarn installed.

Install it once globally:

npm

npm i -g create-react-redux-app-structure

yarn

yarn add global create-react-redux-app-structure

Patience, please. It takes time, most of it is spent installing npm packages.

Creating an App

To create a new app, run:

create-react-redux-app-structure my-app
cd my-app/

It will create a directory called my-app inside the current folder.

Prepare config.json for build configurations

For running builds you need to have config.json in app/ folder. So you can create new one or rename app/config.json.example.

Inside that file:

  • PATHS is used in Grunt and Gulp tasks
  • assetHost CDN path for each build
  • serverHost is used for running e2e Cypress tests

Installation

npm install or yarn install

You can run npm run fast-start script, it will install all npm packages, run dev build, server and open http://localhost:8080/

Run build script

Have a look at Build Scripts section

Run server

node index.js or npm run server

Then open http://localhost:8080/ to see test weather app :)

Build scripts

Development - npm run dev or yarn run dev

Production - npm run prod or yarn run prod

Staging - npm run staging or yarn run staging

Tests

Unit - npm run test or yarn run test

Unit with watch - npm run test:watch or yarn run test:watch

E2E - npm run e2e or yarn run e2e

Coverage is here - app/tests/tests/coverage/Icon-report/index.html

Automation tests

Let's imagine that for automation tests we need to get access to the Redux store. We can do that by adding to the window object property with reference to the store. For e.g. in app.jsx file. Automation tests run only in staging, so for production build we remove them out by Grunt task strip_code

/* staging-code */
window.store = store;
/* end-staging-code */

Tips

Kill all node processes:

  • MacOS sudo killall -9 node
  • Windows (cmd) taskkill /f /im node.exe

Detailed description about features and approaches

Contributing

I would love to have your help.

If you have an idea how to improve or found an issue please read the Contributions Guidelines before submitting a PR. Thanks!

License

MIT © Vasyl Stokolosa