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-personal-react-app

v2.0.4

Published

A thin wrapper around Facebook's create-react-app

Downloads

16

Readme

Create Personal React App

Build Status dependencies Status npm package npm package

A thin wrapper around Facebook's create-react-app inspired by @Chris Patty's blog post.

Create Personal React App works on macOS, Windows, and Linux.

Quick Overview

npm install -g create-personal-react-app
create-personal-react-app my-app
cd my-app
npm start

Then open http://localhost:3000/ to see your app. When you’re ready to deploy to production, create a minified bundle with npm run build.

Get Started Immediately

You don’t need to install or configure tools like Webpack or Babel. They are preconfigured and hidden so that you can focus on the code.

Just create a project, and you’re good to go.

Creating an App

You’ll need to have Node >= 6 on your local development machine (but it’s not required on the server). You can use nvm (macOS/Linux) or nvm-windows to easily switch Node versions between different projects.

To create a new app, just run the following command:

create-personal-react-app my-app

It will create a directory called my-app inside the current folder. Inside that directory, it will generate the initial project structure and install the transitive dependencies:

.
├── README.md
├── node_modules
├── package.json
├── package-lock.json
├── .editorconfig
├── .env
├── .env.dist
├── .env.prod
├── .env.stg
├── .eslintrc.json
├── .gitignore
├── .prettierrc
├── .sass-lint.yml
├── public
│   ├── favicon.ico
│   ├── index.html
│   └── manifest.json
└── src
    ├── app
    |   ├── core
    |   │   └── components
    |   │       ├── modules
    |   |       |   ├── MainContent
    |   |       |   |   ├── index.js
    |   |       |   |   ├── index.scss
    |   |       |   |   └── index.spec.js
    |   |       |   ├── MainHeader
    |   |       |   |   ├── index.js
    |   |       |   |   ├── index.scss
    |   |       |   |   └── index.spec.js
    |   │       |   └── MainNavigation
    |   |       |   |   ├── index.js
    |   |       |   |   ├── index.scss
    |   |       |   |   └── index.spec.js
    |   │       └── pages
    |   |           ├── Home
    |   |           |   ├── index.js
    |   |           |   └── index.spec.js
    |   │           └── NotFound
    |   |               ├── index.js
    |   |               └── index.spec.js
    |   ├── ui
    |   │   ├── actions
    |   │   |   ├── index.js
    |   |   |   └── index.spec.js
    |   │   ├── components
    |   │   |   └── modules
    |   |   |           ├── Loading
    |   |   |           |   ├── index.js
    |   |   |           |   ├── index.scss
    |   |   |           |   └── index.spec.js
    |   │   |           └── Snackbar
    |   |   |               ├── index.js
    |   |   |               ├── index.scss
    |   |   |               └── index.spec.js
    |   │   ├── constants
    |   |   |   └── actionTypes.js
    |   │   ├── reducers
    |   │   |   ├── loading
    |   |   │   |   ├── index.js
    |   |   |   |   └── index.spec.js
    |   │   |   ├── snackbar
    |   |   │   |   ├── index.js
    |   |   |   |   └── index.spec.js
    |   │   |   ├── index.js
    |   |   |   └── index.spec.js
    |   │   ├── sagas
    |   │   |   ├── index.js
    |   |   |   └── index.spec.js
    |   │   ├── selectors
    |   │   |   ├── index.js
    |   |   |   └── index.spec.js
    |   │   └── index.js
    |   ├── user
    |   │   ├── actions
    |   │   |   ├── index.js
    |   |   |   └── index.spec.js
    |   │   ├── api
    |   │   |   ├── index.js
    |   |   |   └── index.spec.js
    |   │   ├── components
    |   │   |   ├── modules
    |   │   |   |       └── UserTable
    |   |   |   |           ├── index.js
    |   |   |   |           ├── index.scss
    |   |   |   |           └── index.spec.js
    |   │   |   └── pages
    |   │   |           └── UserList
    |   |   |               ├── index.js
    |   |   |               └── index.spec.js
    |   │   ├── constants
    |   |   |   └── actionTypes.js
    |   │   ├── reducers
    |   │   |   ├── index.js
    |   |   |   └── index.spec.js
    |   │   ├── sagas
    |   │   |   ├── index.js
    |   |   |   └── index.spec.js
    |   │   ├── selectors
    |   │   |   ├── index.js
    |   |   |   └── index.spec.js
    |   │   └── index.js
    |   └── index.js
    ├── history
    │   └── index.js
    ├── images
    |   ├── closeicon.svg
    │   └── loader.gif
    ├── lib
    │   └── axios.js
    ├── reducers
    |   ├── index.js
    │   └── index.spec.js
    ├── sagas
    │   └── index.js
    ├── store
    |   ├── configureStore.js
    │   └── index.js
    ├── styles
    |   ├── _base.scss
    │   └── _utilities.scss
    ├── index.js
    ├── index.scss
    ├── serviceWorker.js
    └── setupTests.js

No configuration or complicated folder structures, just the files you need to build your app. Once the installation is done, you can open your project folder:

cd my-app

Inside the newly created project, you can run some built-in commands:

npm start

Runs the app in development mode. Open http://localhost:3000 to view it in the browser.

The page will automatically reload if you make changes to the code. You will see the build errors and lint warnings in the console.

npm test

Runs the test watcher in an interactive mode. By default, runs tests related to files changed since the last commit.

Read more about testing.

npm run build

Builds the app for production to the build folder. It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.

Your app is ready to be deployed.

Naming convention

  • Action Types

    • API related

      export const GET_POSTS_REQUEST = "GET_POSTS_REQUEST";
      export const GET_POSTS_SUCCESS = "GET_POSTS_SUCCESS";
      export const GET_POSTS_FAILURE = "GET_POSTS_FAILURE";
    • Others

      export const LOADING_REQUEST = "LOADING_REQUEST";
      export const LOADING_SHOW = "LOADING_SHOW";
      export const LOADING_HIDE = "LOADING_HIDE";
      export const USERNAME_CHANGE = "USERNAME_CHANGE";
  • Action Creators

    • API related

      export const doRequestGetPosts = () => ({});
      export const doSuccesGetPosts = () => ({});
      export const doFailureGetPosts = () => ({});
    • Others

      export const doRequestLogin = () => ({});
      export const doShowLogin = () => ({});
      export const doHideLogin = () => ({});
      export const doChangeusername = () => ({});
  • Sagas

    export function* handleChangeUsername() {}
    export function* handleRequestLogin() {}
    export function* handleRequestGetPosts() {}
  • Reducers

    const loadingReducer = (state = INITIAL_STATE, action) => {};
    const modalReducer = (state = INITIAL_STATE, action) => {};
    • Helpers

      const applyShowLoading = (state, action) => ({});
      const applyChangeUsername = (state, action) => ({});
    • Combined reducers

      const uiReducer = combineReducers({
        loading: loadingReducer,
        modal: modalReducer
      });
  • Selectors

    • Boolean

      export const isLoadingVisible = ({ ui }) => ui.loading.isVisible;
      export const hasPermission = ({ auth }) => auth.user.hasPermission;
    • Others

      export const getUsername = ({ auth }) => auth.user.username;
  • API

    export const requestGetPosts = () => {};
    export const requestCreatePost = payload => {};
    export const requestGetPost = postId => {};
    export const requestUpdatePost = (postId, payload) => {};
    export const requestDeletePost = postId => {};
  • mapDispatchToProps

    import { doRequestLogin } from "../actions/auth";
    import { doShowLoading } from "../actions/ui";
    
    const mapDispatchToProps = {
      onRequestLogin: doRequestLogin,
      onShowLoading: doShowLoading
    };
    
    export default connect(
      null,
      mapDispatchToProps
    )(Home);

Contribute

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Submit a pull request

License

Create Personal React App is open source software licensed as MIT.