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

mkreact

v1.1.5

Published

Starter package for writing an ES6 React app using Material-UI, Redux, Babel, Webpack and Express.

Downloads

5

Readme

mkreact

Starter package for writing an ES6 React app using Express for the back-end, SQLite3 for data persistence, Material-UI for front-end visuals, Redux for front-end data flow, Babel and Webpack for tooling/building, and Karma, Enzyme, Mocha, Sinon and Chai for quality assurance.

About mkreact

mkreact was created while I was learning React and found the setup process extremely tedious. This package is a complete project seeder for a React web-app, including a demo section with a todo list implementation that shows how data flows through the full stack, and basic tests to show how a React app can be tested.

Feel free to use it for your own projects or to learn about React using Redux.

Using mkreact

Overview

mkreact was not designed to be cloned and worked upon. Install it globally via: npm i mkreact -g

mkreact will install scripts in /usr/local/bin (sorry, Windows is not supported, fork this repo and add in Windows support if you really want it, will accept your pull request).

Navigate to your project and use the following command to seed a fresh project: cd ./my-project

Alternatively, create the directory and cd into it: mkdir new-project-folder; cd ./new-project-folder

In-built Scripts

Run mkreact to create your project.

Run npm install --development to start development work on it.

Run npm install when in CI/production environment.

Run npm start --development to start the server in development mode.

Run npm start --production to start the server in production mode.

Run npm build to create the bundled files using the inbuilt webpack configuration.

Run npm test to run tests using the inbuilt karma configuration.

Notes

In-built behaviour for development/production differs in that development loads a programatically generated master.js file (webpacked bundle) whereas production loads the master.js file from the /assets folder which needs to be built via npm build before it becomes available. See /configurations/webpack.js for more information on this.

Backend

Express

The Express framework is used on the back-end server to serve files and to specify an API for the React App to draw/send data to the data storage.

URL Link: https://expressjs.com/

Reference Links: [ https://expressjs.com/en/4x/api.html ]

SQLite

SQLite3 is the included database and you can swap it out when you are looking to scale. SQL Syntax is similar to MySQL/Postgres/OracleDB.

URL Link: https://www.sqlite.org/

Reference Links: [ https://github.com/mapbox/node-sqlite3/wiki/API ]

Frontend

ReactJS

A UI framework by Facebook that we will be using.

URL Link: https://facebook.github.io/react/

MaterialUI

A Material Design implementation for React.

URL Link: http://www.material-ui.com/#/

Redux

An improved version of Flux - and yes it's approved by the original conceivers of Flux.

URL Link: http://redux.js.org/

Tooling

Webpack

This packages all specified files into one master file (a bundle) that can be included on your webpage once built.

URL Link: https://webpack.github.io/

Reference Links: [ http://webpack.github.io/docs/ ]

WebpackDevMiddleware

A middleware implementation of the webpack-dev-server npm package. Allows us to run our main server and webpack tooling system within the same process.

URL Link: https://github.com/webpack/webpack-dev-middleware

Babel

This project assumes development in ES6 JavaScript and Babel is required to transpile the ES6 code into legacy browser compatible code.

URL Link: https://babeljs.io/

Quality Assurance

Karma

Karma is a test runner and this project's configuration pairs it with PhantomJS to render components.

URL Link: https://karma-runner.github.io/1.0/index.html

Enzyme

Enzyme is a component tester that allows us to mount React components for testing.

URL Link: http://airbnb.io/enzyme/

Mocha

Mocha is a test framework that implements a describe '/*feature*/' and it '/*does this*/' format of testing.

URL Link: https://mochajs.org/

Sinon

Sinon is used to access hidden properties of JavaScript objects.

URL Link: http://sinonjs.org/

Chai

Chai is a syntax formatter that allows us to write BDD tests where we can expect(SomeComponent.someValue).to.be.equal(SOME_EXPECTED_VALUE).

URL Link: http://chaijs.com/