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

@crestron/ch5-shell-utilities-cli

v2.11.1

Published

CH5 Shell Utilities CLI for command scripts

Downloads

2,104

Readme

CH5 Shell Utilities CLI

Archiving and distribution utilities from the ch5-utilities library wrapped as CLI commands.

Table of Contents

Background

The purpose of the library is to expose the ch5-shell-utilities archive and distribute functionality.

Setup

Build the library.

npm run build

Publish the ch5-shell-utilities-cli library for local usage.

npm link

Commands

npm run publish:local

After the initial setup, you can use this command to rebuild and publish changes in the library.

Developer

config.json

{ "command": "String: This is the command that is used in the terminal. Ex: create:project etc", "name": "String: This is the name of the command. Same as the command in most cases.", "aliases": "String Array: Represents the possible alias names for the commands like gen:p for generate:page", "usage": "[options]", "description": "String: Provide a description for the command", "options": [ { "key": "config", "description": "Config file required to create project", "type": "string", "default": "", "valueIfNotFound": "", "alias": [ "--config" ], "allowedValues": [], "allowedAliases": [], "validation": "fileAvailableAtLocation", "question": "CHECK_PROMPT_QUESTIONS.QUESTIONS.CONFIG_FILE", "isSpecialArgument": "Boolean: Indicates special arguments that are not passed parameters like help or verbose or config " } ], "backupFolder": "./dist/", "additionalHelp": true, "automatedTests": { "enable": true, "enableComponentDeleteAfterTest": true }, "allowedEnvironments": [ "dev", "prod" ] }

Testing Scripts

Please replace ${USERNAME} with your username on /Users/${USERNAME}/Downloads. This path should work for Windows and Mac.

  1. Create Project

1.1. Page-2

rm -rf * && ch5-shell-cli create:project --projectName 'shell-template' && cd shell-template && npm install && npm run gen:p -- --name 'page-2' -m Y && cd .. && mkdir tt1 && cd tt1 && ch5-shell-cli create:project --config /Users/${USERNAME}/Downloads/tt/shell-template/app/project-config.json && cd ..

1.2. Widget-2

rm -rf * && ch5-shell-cli create:project --projectName 'shell-template' && cd shell-template && npm install && npm run gen:w -- --name 'widget-2' && cd .. && mkdir tt1 && cd tt1 && ch5-shell-cli create:project --config /Users/${USERNAME}/Downloads/tt/shell-template/app/project-config.json && cd ..

  1. Update Project

2.1. Page-2

rm -rf * && ch5-shell-cli create:project --projectName 'shell-template' && cd shell-template && npm install && npm run gen:p -- --name 'page-2' -m Y && cd .. && mkdir tt1 && cd tt1 && ch5-shell-cli create:project --projectName 'shell-template' && cd 'shell-template' && ch5-shell-cli update:project --config /Users/${USERNAME}/Downloads/tt/shell-template/app/project-config.json && cd ..

2.2. Widget-2

rm -rf * && ch5-shell-cli create:project --projectName 'shell-template' && cd shell-template && npm install && npm run gen:w -- --name 'widget-2' && cd .. && mkdir tt1 && cd tt1 && ch5-shell-cli create:project --projectName 'shell-template' && cd 'shell-template' && ch5-shell-cli update:project --config /Users/${USERNAME}/Downloads/tt/shell-template/app/project-config.json && cd ..

Run a single spec file for testing

RUN A SINGLE SPEC Often we're in the test code making changes, and it's easy to make adjustments to what subset of tests you run from here as well. If I want to run a single describe() function, I can add a .only() to the function call, like this:

describe(function () { // these tests will be skipped }); describe.only(function () { // these tests will run }); You can stick the .only() on any describe, no matter if it's first or last in the list of specs.

RUN A SINGLE TEST Just as you can with describe, the tests can be specified to exclusively run if you attach .only() to the function call.

it.only(function () { // this test will run }); it(function () { // this test will be skipped }); Update 12 Oct 2015: The following note now does not apply. before, etc hooks are now verified to be run when running a single test.

Note! that by putting the .only() on a test, all other functions in the spec are skipped. This means that your before, beforeEach, after, and afterEach functions are not called. Sometimes it's hard to remember when that matters, so I usually end up running single specs instead of single tests.

SKIP SOMETHING If you want to run all the specs/tests that you have minus some subset, effectively commenting out these tests, you can add .skip() to either describe or it function calls.

REMEMBER TO REMOVE With the additions of the .only() or .skip() you are altering the actual code of your tests. This is great for your local development process. You'll need to be careful that you don't commit this change -- at least you usually won't want to. Otherwise, you CI process will be running a subset of your tests, just as you are locally, which is no bueno.

setup local

npm run setup:local