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

seabird

v0.5.0

Published

Automation tools for the Vue ecosystem - alpha

Downloads

2

Readme

Overview

Seabird is a command line tool that adds automation for the Vue ecosystem. Its main functionality is to generate templates using ejs with either user supplied or default internal data.

Currently Seabird can only genterate Vue components and views, however, we are adding Vue-router modules, routes, Vuex modules, and vuex actions very soon.

Status

Alpha This project is currently in alpha phase.

Some features may break between releases, and others may be removed entirely. Look to the Feature Status section below to see which phase a current feature is in.

I am not currently accepting pull requests. However, if you'd like a feature added, please submit an issue in GitHub as a feature request.

Installation

To use Seabird in any directory be sure to install globally.

npm i seabird -g

You can use seabird or sea to call commands

Usage

Seabird is a command line tool that will either generate files from ejs templates or make insertions in files to complete its task. By default, files that are generated from templates use internal .ejs files and compile with default options and data parameters.

By creating a seabird.config.js file, you can override the default options, data, or even supply your own .ejs template to render. Seabird will use the data object in the config against either the default, or supplied template. However, if you define the data object with reserved JavaScript keywords as keys, the application will halt and the template will not compile.

Options Hierarchy

command defined > config defined > default

The above hierarchy allows you to override the default options with your own in the config, but still have the option to override your own settings on a per-command instance.

example:

searbird create vue component <file-path> [...options]

| Option | Default | Config | Neagatable Command | | ---------- |:-------:| ------ | -------------------| | --vuex-map | false | true | --no-vuex-map |

The above example shows that the default value of --vuex-map is false, and is not rendered to the template. The user has changed the default value to true in the config avoiding having to explicitly set the --vuex-map option in the command line. The user now has the ability to use the negatable option --no-vuex-map to explicitly set the option to false for each command.

The pattern illustrated above is possible in all commands that use a template when creating a file (component, view and module), however, this is not possible for insertions into existing files (action and route)

Commands

Commands are chained to make targeting the correct command easier.

For example, if you want to create a new Vue component you need to call the create command, with the vue subcommand, targeting the Vue library, and then the component subcommand along with the required <file-path> to create a Vue component

Example

seabird create vue component <file-path> [...options]

seabird create router module <file-path>

seabird config generate

Calling --help at any level of the command chain will output a description of the child commands and options.

Arguments

Almost all subcommands will have arguments that are either <required> or [optional]. Seabird will normally try to make assumptions or set defaults when optional arguments are not supplied. If <required> arguments are not supplied Seabird will abort the command.

seabird init [options]

seabird create <create-subcommand>

seabird config <config-subcommand>

seabird --help

| Command | Shorthand | Description | | ------------- |:------------:| --------------------------------------| | init | i | Initializes a new Vue project | | create | c | Generates ecosystem components | | config | | Generates or modifies config file |

Init | init

seabird init [options]

Initializing a new project is done with the init command. Seabird will prompt you with an option for initializing a project from a template or from new using the underlying Vue CLI.

Init Options

| Option | Shorthand | Description | | ------------------ |:-------------------:| ------------------------------------------| | --template | t | Download a project from a Git repo | | --new | n | Create a new project using Vue CLI | | --config | c | Creates a config file after app init |

To create a new project, Vue CLI will need to be installed on your machine. If Vue CLI is not installed you will be prompted to install it before continuing.

Create | create

seabird create <subcommand>

The create command is used for generating new components, Vuex and Vue Router modules, and new routes or state actions.

create Subcommands

seabird create vue <vue-subcommand>

seabird create vuex <vuex-subcommand>

seabird create router <router-subcommand>

| Command | Shorthand | Description | | ------------------ |:---------:| --------------------------------------------| | vue | | Generate Vue library files | | vuex | | Generate Vuex library files or actions | | router | | Generate Vue Router library files or routes |

create vue Subcommands

seabird create vue component <file-path> [...options]

seabird create vue view <file-path> [...options]

Subcommands

| Command | Shorthand | Description | | ------------------ |:---------:| --------------------------------------------| | component | | Generates a Vue component from a template | | view | | Generates a Vue view from a template |

component and view Options

| Option | Default | Description | | ------------------ |:-------:| ---------------------------------------------------------| | --vuex-map | false | Imports Vuex maps to file [mapState, mapActions ...] | | --hooks | false | Adds Vue lifecycle hooks to template | | --css-lang | css | Sets the style tag lang lang={css-lang} to style tag | | --scoped-styles | true | Adds | | --helpers | true | Generates a Vue view from a template |

Vue component and view components are created from the same default templates. If you wish to use your own template for either, you need to define the template in you config file.

create vuex Subcommands

seabird create vuex module <file-path> [...options]

seabird create vuex action <action-path>

Subcommands

| Command | Shorthand | Description | | ------------------ |:-------------------:| --------------------------------------------| | module | | Generates a Vuex module from a template | | action | | Generates a Vuex action in targeted module |

module Options

| Option | Default | Description | | ------------------ |:-------:| ---------------------------------------------------------| | (TDB) | -- | -- |

action Options

| Option | Default | Description | | ------------------ |:-------:| ---------------------------------------------------------| | (TDB) | -- | -- |

Feature Status

Init

seabird init [...options] - working

Create

seabird create vue component <file-path> [...options] - working

seabird create vue view <file-path> [...options] - working

seabird create vuex module <file-path> [...options] - working

seabird create vuex action <file-path> [...options] - in development

seabird create router module <file-path> [...options] - pending

seabird create router action <file-path> [...options] - pending

seabird create custom <template-name> <file-path> - pending

Config

seabird config generate - working

Eject

seabird eject templates - pending