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

newtons-apple

v1.2.1

Published

Simple React CLI to generate boilerplate code for components

Downloads

18

Readme

NEWTON'S APPLE

GitHub package version npm npm GitHub issues CircleCI

NPM

Newton's Apple(NAPP) is a Command Line Interface(CLI) tool to simplify component creation for developers working on ReactJS projects. Running a simple command, it will create a file with the name you specify and generate the boilerplate code for a typical React component.

You can also configure default path's on where to save files created with NAPP. And soon NAPP will provide the ability to create other files commonly used with React (tests, Redux files, etc). Please read the docs thoroughly to learn more.


NAVIGATION


INSTALLATION

To install, first make sure you have Node installed. If you see a version number, you will be able to install Newton's Apple via NPM as below:

$ node -v
v8.9.4
$ npm install -g newtons-apple

HELP MENU

There are a lot of commands and options in NAPP and more are being added all the time, so it's understandable that you won't be able to remember them all off the top of your head. Hopefully, the in-app help menu will help you there. Simply use the -h or --help flag to see your various options:

$ napp -h

    Usage: napp [options] [command] <arg>

    Options:
        -v, --version  output the version number
        -h, --help     output usage information

    Commands:
        new [options] <component-name>  create new component in either current directory or provided path
        select                          select lifecycle methods to be included when creating components
        setup                           configure options for Newton's Apple
        config [options] [project]      view the options in your config file - including a project name will list the defaults for that project
        reset                           reset NAPP to default usage where it only creates files in current directory
$ napp new --help

    Usage: new [options] <component-name>

    create new component in either current directory or provided path

    Options:

        -d, --dumb       set component type to dumb, i.e. functional/stateless
        -a, --all        enable all methods
        -n, --none       disable all methods
        -c, --create     creates directories if they don't exist
        -o, --overwrite  overwrites file if it exists
        -t, --test       creates test file for new component
        -h, --help       output usage information

ISSUES

If you run into any issues using this tool, please first search the issues in the repo to make sure it has not already been reported. If you don't find anything, please feel free to open a new issue.


CONTRIBUTING

I welcome anyone who is interested to come help contribute on this project. The most important contribution you can make is to install and test the app. Please leave feedback on what you like, didn't like, any features you would like to see added, and create issues for any bugs you find!

If you would like to resolve any issues or add a feature yourself, please be sure to read the Code of Conduct and Contributing before submitting any pull requests.


UPCOMING FEATURES

I will try to keep an updated list here of features I plan to implement in this CLI.

  1. Add support for other test suites (Mocha, Jasmine, etc).
  2. Redux support (create boilerplate code for projects that use Redux).
  3. Add custom methods to be included in component creation.