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

fuspa-cli

v0.1.1

Published

Command line utility that creates a project structure for extension, using fuspa

Downloads

3

Readme

fuspa-cli

Command line utility that creates a project structure for a Single-Page-Application.

fuspa-cli is meant to help you create your next spa with ease! The created project structure is relying on fuspa to handle the spa-functionality, like dynamic rendering. For further documentation, see fuspa repository.

Usage

Install the package globally:

npm install fuspa-cli -g

Navigate to your desired folder, then create a new fuspa-project by running:

fuspa

See below for available options

CLI options

The following command line flags can configure

This generator can also be further configured with the following command line flags.

Optons:

    -V, --version               output the version number
    -N, --name [name]           Name of project (default: fuspa-starter)
    -f, --file [path]           Config file to use rather than cli-flags (default: fuspa.options.js)
    -e --engine [engine]        Set render engine (default: handlebars)
    -c --container [container]  DOM-id of element to append rendered html (default: container)
    -m --main [main]            Entry point of application (default: main.ts)
    -h, --help                  output usage information
  • --name dictates the folder in which the new fuspa-project will be created.
  • --file If a configuration file should be used rather than using command line flags
  • --engine render-engine to use. The default, and currently only render-engine supported at the moment is handlebars
  • --container A reference to a HTMLElement id (e.g. <div id="container"/>)
  • --main The filename of your desired entry-point file.

Configuration file

Use the current configuration file:

fuspa.options.js:

module.exports = {
    name: 'fuspa-starter',
    engine: 'handlebars',
    container: 'container',
    main: 'main.ts'
}

The equivalent cli-command:

fuspa --name fuspa-starter --engine handlebars --container container --main main.ts

Project structure:

fuspa-starter
  -- src
    -- app
      -- hbsHelpers.ts
      -- main.ts  
    -- styles
      -- main.scss
    -- views
      -- assemble
        -- <assemble related files>
      -- <render-engine folders>
  -- static
    -- fonts
    -- images
  --tasks
    -- <list of tasks>
  tsconfig.json
  package.json

The structure is meant to quickly get you started creating your own Single-Page-Application. The structure, tasks and configurations can be tweaked and extended, to make it fit your needs and requirements.

The default project show how to get started using fuspa.

API

Instead of installing fuspa-cli globally, an api is also provided.

npm install fuspa-cli --save-dev

Example usage:

import {SpaProject} from 'fuspa-cli';

const project = new SpaProject({
    engine: 'handlebars',
    container: 'container',
    name: 'fuspa-starter',
    mainFile: 'main.ts'
});

project.create();