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

scaffdog

v4.1.0

Published

scaffdog is Markdown driven scaffolding tool.

Downloads

153,177

Readme

scaffdog

scaffdog

asciicast

Multiple files can be output in a document, and flexible scaffolding is possible with a simple but powerful template syntax :dog2:

Documentation

Visit https://scaff.dog to view the full documentation.

Features

  • :pencil: Markdown driven
    • You can define a template with <h1> and code block.
    • It will be a Documetable template !
    • Define meta information with extended syntax using Front Matter.
  • :spiral_notepad: Intuitive template
    • It provides a simple yet powerful template engine inspired by ECMAScript and Go text/template.
    • Many built-in helper functions required to define templates are also provided.
  • :rocket: Ready to use
    • You can quickly start using $ scaffdog init.
    • Other useful commands are provided for immediate scaffolding.
  • :nail_care: Prettier Integration
    • Markdown works very well with Prettier, and the templates maintain beautiful code.
    • We also offer a Prettier Plugin for scaffdog's template engine.

Requirements

  • Node.js v18.0.0+

Getting Started

Installation

scaffdog can be installed globally, but we recommend installing it locally on the project.

$ npm install --save-dev scaffdog

Quick Start

In the following tutorial you can start using scaffdog immediately !

Setup

By default, it stores the document file and configuration file in the .scaffdog directory.

Creating directories, configuration file and initial documents can be done with the init subcommand.

$ npx scaffdog init

? Please enter a document name. component

Setup of scaffdog 🐶 is complete!

  ✔ .scaffdog/config.js
  ✔ .scaffdog/component.md

Now you can do scaffold by running `$ scaffdog generate`.

Please refer to the following documents and customize it.
https://scaff.dog/docs/templates

After running the command, the .scaffdog/component.md file should have been generated. Rewrite that file as follows:

---
name: 'component'
root: '.'
output: '.'
questions:
  name: 'Please enter a component name.'
---

# `{{ inputs.name | pascal }}/index.ts`

```typescript
export * from './{{ inputs.name }}';
```

# `{{ inputs.name | pascal }}/{{ inputs.name | pascal }}.tsx`

```typescript
export type Props = React.PropsWithChildren<{}>;

export const {{ inputs.name | pascal }}: React.FC<Props> = ({ children }) => {
  return (
    <div>{children}</div>
  );
};
```

Let's scaffold using the component document!

$ npx scaffdog generate

? Please select a document. component
ℹ Output destination directory: "."
? Please enter a component name. PrettyDog

🐶 Generated 2 files!

     ✔ PrettyDog/index.ts
     ✔ PrettyDog/PrettyDog.tsx

Congratulations :tada:

The first file was generated.

$ cat PrettyDog/index.ts
export * from './PrettyDog';

$ cat PrettyDog/PrettyDog.tsx
export type Props = React.PropsWithChildren<{}>;

export const PrettyDog: React.FC<Props> = ({ children }) => {
  return (
    <div>{children}</div>
  );
};

Check out our documentation site to customize your documentation :+1:

Migration

There are important changes in the major update.

See Migration Guide.

Contributing

See CONTRIBUTING.md.

CHANGELOG

See CHANGELOG.md.

License

MIT © wadackel

Thank you for reading!