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

frontend-md-create-react-app

v1.3.0

Published

Generate simple documention for your create-react-app frontend code in seconds

Downloads

576

Readme

This was forked from https://github.com/animade/frontend-md and extended to work with directory structure created from create-react-app.

Generate simple documentation for your frontend code

Frontend.md

Frontend.md looks at your frontend source code and generates a markdown file (called, predictably, FRONTEND.md) outlining the folder/file structure together with any topline comments. It's not a complete documentation system or styleguide generator. Rather it's designed to be a very simple tool which you can use on new or existing projects to get a high level view of how the code is laid out.

Features

  • Portable - drop it into any frontend project and see what's going on
  • Easy setup - very little configuration required
  • Attractive - generates a nested view of folder structure (inspiration taken from sass-guidelin.es)
  • Automated - Parses comments in a file, pulls out the first one and adds it as a description
  • Readable - results are saved to a seperate Frontend.md markdown file in the root of your project

Below is a very simple example output for a create-react-app project. The file descriptions (i.e. "# App Structure" etc) are pulled automatically from the first comment in each file (look in test/source for examples).

Public

my-app/
|
|- public/
|  |- favicon.ico ____________________________ # -
|  |- index.html _____________________________ # -
|  |- manifest.json __________________________ # -

Src

my-app/
|
|- src/
|  |- App.css ________________________________ # -
|  |- App.js _________________________________ #
|  |- App.test.js ____________________________ #
|  |- index.css ______________________________ # -
|  |- index.js _______________________________ #
|  |- logo.svg _______________________________ # -
|  |- registerServiceWorker.js _______________ # In production, we register a service worker to serve assets from local cache.

Installation

Frontend.md is available via npm, so you'll need node installed. Once that's done, install with:

npm install frontend-md-create-react-app -g

Usage

In the root directory of your project name sure there is a package.json file with the following attributes:

{
  "frontend": {
    "name": "YOUR PROJECT NAME",
    "sources": [
      {
        "title": "Public Files",
        "path": "public"
      },
        "title": "Src Files",
        "path": "src",
        "excludeFolders": ["src/bootstrap"]
    ],
    "options": {
      "generateDate": false
    }

  }
}

Change the values above then generate your FRONTEND.md file by running frontend-md from the root of your project:

frontend-md

All being well, you'll see something like this:

✔ Found package.json...
✔ Found Public Files folder...
✔ Found Src Files folder...
✔ FRONTEND.md successfully created :-)

Bugs

This is a very simple project and is held together by bits of string and sticky tape in some places, so if you find bugs please create an issue. Also any contributions or feature suggestions are very gratefully received!

Limitations

Currently compatible with the following file extensions:

  • .sass
  • .less
  • .scss
  • .js

Testing

Run npm test which will run create-react-app my-app under the tests/ directory and generate /tests/FRONTEND.md.


Frontend Hound logo is courtesy of Tom Judd.