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

react-redux-webpack2-starterkit

v0.3.0

Published

Boilerplate for react-redux project with webpack 2 and tests

Downloads

30

Readme

Image of Yaktocat React redux boilerplate

Boilerplate for react-redux project with webpack 2 and tests

Detailed Documentation here

Quickstart: How to build and run Template?

(a) Prerequisites

Run the following commands to verify that you have the correct versions of Node and NPM installed:

node -v
npm -v

(b) Clone the Repository

git clone [email protected]:Faradey27/react-redux-webpack2-starterkit.git react-redux-webpack2-starterkit

(c) Install dependencies

cd react-redux-webpack2-starterkit
npm install

(d) Build web-ui and run

npm run testserver

after that open http://localhost:3001 also you can find files in react-redux-webpack2-starterkit/dist - this is production build of ui files, you can serve them or upload to some hosting(like github pages)

How to change server link? or analytic id without rebuild?

  1. open react-redux-webpack2-starterkit/dist/config/config.js
  2. change what you want
  3. do page refresh

Build and run with docker

(a) Install docker from https://www.docker.com/

(b) Go to root of project and build image

cd react-redux-webpack2-starterkit
docker build -t faradey27/react-redux-webpack2-starterkit .

(c) Run docker image

docker run -p 49160:3001 -d faradey27/react-redux-webpack2-starterkit

(d) Run docker image

Wait for 2-5 minutes and open http://0.0.0.0:49160

Questions

How to run development version of ui?

Do steps - a,b,c (from start of readme)
npm start

after running this command development version of web-ui will be availible on http://localhost:3002

Note: development version much more slower that production version

How to run unit tests for ui?

Do steps - a,b,c (from start of readme)
npm test

How to get unit tests coverage?

Do steps - a,b,c (from start of readme)
npm run test:coverage

How to run e2e tests(Unix based OS)?

Do steps - a,b,c (from start of readme)
npm run test:e2e

How to run e2e tests(Windows)?

Do steps - a,b,c (from start of readme)
npm run selenium - don't stop this process
open new tab enter next command and tests will start
npm run test:e2e

What about internalization?

Boilerplate internalization depend on:

To get all labels in po file you require to do steps a,b,c and run npm run createLocaleFiles after that you should go to react-redux-webpack2-starterkit/lang and find their .po files for each language, open each with po editor po-edit and add related labels for each language. After that npm run convertPOtoJson and after that npm run build your build will be in react-redux-webpack2-starterkit/dist with multilanguage support

Quickstart: Requirments for production deploy

  • Production server should return index.html file for each request
  • Production server should serve react-redux-webpack2-starterkit/dist folder

Quickstart: How to see something?

  • for npm run testserver use localhost:3001
  • for npm start use localhost:3002
  • for production use whatever you want

Quickstart: How to change api url or other configuration constants(like analytics)?

  1. go to react-redux-webpack2-starterkit/src/Constants/Api.js
  2. export const API_URL = 'http://10.2.3.103:8081'; - you will see this, it's api url, change it on whatewer you want and rebuild project(npm run build or npm start)

or, if you don't want to rebuild project

go to file react-redux-webpack2-starterkit/dist/config.js and change same constants, after that just refresh page with web-ui

Quickstart: Troubles

  • you always get 401 error or you see UNKNOWN_ERROR on ui or you can't login with right password - this is CORS problem or server is dead, to solve this you should check that you use last api server and write to server side guy or frondend side guy
  • 404 not found, 400, etc. - maybe some problems with users roles

Found an issue?

Go here

Browser support

  • Chrome 45 +
  • Firefox 42 +
  • Safari 9.1 +
  • IE 11 +
  • IE Edge
  • Opera 39 +
  • IOS Safari 9.1 +
  • Android Browser 4.4 +
  • Chrome for Android 45 +