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

@socialcare/generator-app

v1.3.6

Published

A generator that scaffolds out social care web apps, routes, components, and action / reducers.

Downloads

38

Readme

@socialcare/generator-app

A generator that scaffolds out code for social care web apps. Includes helpful generator for setting up a template app.

Installation

First, install Yeoman using npm (we assume you have pre-installed node.js version >=8.3 <9.0).

npm install -g yo
npm install -g @socialcare/generator-app

Generating a web app

This will scaffold out an isomorphic app with all the files needed to get up and running.

  1. cd into your projects directory.
  2. Run the yeoman SocialCare app generator and follow the onscreen prompts.
$ yo @socialcare/app

The generator will copy all the files needed for a new SocialCare app and will also run npm install. When the instillation is complete you're ready to run the app.

$ npm start

Created files

.
├── /public/        <-- icons, cross domain policies
├── /src/           <-- All the application code
│   ├── /actions/
│   ├── /components/
│   ├── /constants/
│   ├── /core/
│   ├── /css/
│   ├── /public/
│   ├── /reducers/
│   ├── /routes/
│   ├── /store/
│   ├── client.js
│   ├── config.js
│   ├── config.test.js
│   └── server.js
├── /test/          <-- Helpers for testing
│   ├── README.md
│   └── test-helpers.js
├── /tools/         <-- All the build tooling stuff
│   ├── /lib/
│   ├── build.js
│   ├── bundle.js
│   ├── clean.js
│   ├── copy.js
│   ├── deploy.js
│   ├── postcss.config.js
│   ├── README.md
│   ├── render.js
│   ├── run.js
│   ├── runServer.js
│   ├── start.js
│   └── webpack.config.js
├── .babelrc.js
├── .editorconfig
├── .eslintrc.js
├── .flowconfig
├── .gitattributes
├── .gitignore
├── .stylelintrc.js
├── .travis.yml
├── Dockerfile
├── jest.config.js
├── package.json
└── README.md

Generating a route

This will create a route that will work with the sc-ui- app structure initially generated by this package. The route generator will add a folder with an index, component, and css file in the routes directory. It will also add an entry for the new route in the route/index.js file.

The generator will do its best but it's not perfect. It's important that you check the created files for correctness.

  1. CD into the app you want to create a route on.
  2. Run the yeoman SocialCare app generator with :route
$ yo @socialcare/app:route
  1. Follow the prompts

Created files

.
└── /src/
    └── /routes/
        ├── /{base path + route name kabab cased}/
        │   ├── {route name Pascal cased}.js
        │   ├── styles.css
        │   └── index.js
        └── index.js <-- Updated with new route info

Generating a component

This will create a component that will work with the sc-ui- app structure initially generated by this package. The component generator will add a folder with the component, test, and css file in the components directory.

The generator will do its best but it's not perfect. It's important that you check the created files for correctness.

  1. CD into the app you want to create a component in.
  2. Run the yeoman SocialCare app generator with :component
$ yo @socialcare/app:component
  1. Follow the prompts

Created files

.
└── /src/
    └── /components/
        └── /{base path + route name kabab cased}/
            ├── {component name Pascal cased}.js
            ├── {component name Pascal cased}.test.js
            └── styles.css

Generating an action / reducer

This will create an action and reducer* that will work with the sc-ui- app structure initially generated by this package. The action generator will add a files to the src/action and src/reducers folders it will also create constants for these actions.

The generator will do its best but it's not perfect. It's important that you check the created files for correctness.

  1. CD into the app you want to create a component in.
  2. Run the yeoman SocialCare app generator with :action
$ yo @socialcare/app:action
  1. Follow the prompts

touched files

.
└── /src/
    ├── /constants/
    │   └── index.js <-- updated
    ├── /actions/
    │   ├── {action name Pascal cased}.js
    │   ├── {action name Pascal cased}.test.js
    │   └── index.js <-- updated
    └── /reducers/
        ├── {action name Pascal cased}.js
        ├── {action name Pascal cased}-error.js*
        ├── {action name Pascal cased}-status.js*
        ├── {action name Pascal cased}.test.js
        └── index.js <-- updated

(*) Notes files that may be created under some conditions.

License

© Social Care