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

scavader

v0.0.8

Published

Some true magic about scaffolding a web [backend/front]-end application !

Downloads

5

Readme

Scavader

screenshot-demo

Some true magic about scaffolding a web [backend/front]-end application !

  • Create your own wizard to scaffold your project.
  • Use one of the built-in scaffold to generate your project (WIP)

What is it for ? Let's say that every time you start a new project on the same stack, you are doing the same things over and over again. Here is a usecase example:

  • Create a repository and cloning it
  • Generating the NPM package.json file with $ npm init
  • Removing some directories
  • Editing the titles
  • Removing some useless file
  • Removing some useless portion of codes
  • Installing other dependencies
  • Moving file around
  • Creating a new README.md and DOCS.md
  • ...

Why don't you write down those steps in a JSON file once and use it in Scavader each time you want to initialize a new projet ? You can configure this tool to ask you some custom questions and execute some custom commands.

Features

  • Nice command line interface
  • Easy wizard creation using JSON
  • Built-in scaffolds

Installation

npm install -g @scavader/scavader

or

npm install --save scavader (and adapt the commands futher with ./node_modules/.bin/scavader ...)

Getting started

Create a new scaffold

Initialize the scaffolding structure: scavader init. This will generate a scaffold wizard example where you can start working in.

  • Edit the ./scaffold/questions to customize your scaffold wizard.
  • Edit the ./scaffold/commands to customize what your scaffold should do.

Run your scaffold

  • Run your new scaffold wizard using: scavader run

Command Line Interface (CLI)

Run scavader without any arguments to see the help menu. By default, scavader will initialize and run using the ./scaffold folder name.

  • Scaffold from built-in project:

    $ scavader init [-p projectName] [-d directoryName]
    $ scavader run [-d directoryName]
  • Scaffold a specific built-in project (here the web-application project) and output to a specific directory:

    $ scavader init -p web-application -d myscavader 
    $ scavader run -d myscavader
  • Create a basic scaffold and run the wizard

    $ scavader init -d myscavader 
    $ scavader run -d myscavader
  • Run scaffold wizard using another set of questions (you can create other question(s) file(s) in the ./scaffold/questions directory and use the -q option to specify which one to use):

    $ scavader run -d myscavader -q secondary_questions

Example of usage in a script

Scavader = require("scavader")

// Question(s) file to use
const questionsFile = "questions";

// Example of scavader using the `./scaffold.example` folder and run the
// questions located in `./scaffold.example/questions/questions.js`
let scavader = new M.Scavader("./scaffold/", "Scavader");
scavader.run(questionsFile).then(result => {
  console.log(result);
});

Built-in projects (WIP)

  • basic: a basic example to demonstrate how scaffold are made.
  • simple-http: A simple and basic HTTP server with a single index.html file.
  • web-application: this will run a wizard asking you things about the server and client framework you want to use.
    • As of today: only lit-element (client side) and NodeJS + firebase (server side) are supported
  • More soon. This is not my priority right now. Therefore, some help would be appreciated

Create your own scaffold

Take a look at the ./projects/web-application/questions and ./projects/web-application/commands example that stands in this repository.

The question file is nothing more than a list of questions that have a specific format. Check the built in projects to have more insights. You should be aware that the type and choices fields are the same as in the Inquirer package. You can have all of them: input, number, confirm, list, rawlist, expand, checkbox, password, editor (as of 2020-03-06).

Demonstration and documentation

Go to the Scavader package directory (cd node_modules/scavader) or download a clone of the project from github.com and run npm install.

  • Run the demonstration: npm run demo
  • Launch the offline documentation: npm run doc

History

Scavader means Scaffolder-Invader, this tools was build to quickly scaffold my own projects.

Author and Contributor

Yves Lange