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

js-work-cli

v1.0.14-test

Published

![Logo](https://mir-s3-cdn-cf.behance.net/project_modules/1400/74731f76965389.5c7945b0cfcc3.gif)

Downloads

23

Readme

Logo

JS Work-CLI

PRs Welcome

An easy-to-use JavaScript/TypeScript framework for generating custom files using CLI. NPM link here

Installation

npm i js-work-cli

Documentation

Currently, only two frameworks are supported (React and Express), but we plan to expand to include languages such as Svelte, Vue, and more.

When HasMultipleFiles is checked in the table below, simply designate the --fileName argument as an underscore (_). The --fileTypew argument consists only of two values: TS and JS

The scripts below are the arguments in the CLI

npx js-work-cli --framework --template --folderPath --fileName --fileType

React Templates

| Template | Description | HasMultipleFiles | | :---: | :--- | :---: | | plain | Plain react file | ⨉ | pState | Built in useState sample in file | ⨉ | pEffect | Built in useEffect sample in file | ⨉ | pRef | Built in useRef sample in file | ⨉ | stef | Built in useState and useEffect sample in file | ⨉ | stefr | Built in useState, useEffect and useRef sample in file | ⨉ | httpService | Custom Http Service (Sample API request provided) | ✓ | zustand | Custom Zustand Store | ⨉ | debounce | Debounce Hook | ⨉

Express Template

| Template | Description | HasMultipleFiles | | :---: | :--- | :---: | | eConfig | Express config file | ⨉ | mConfig | Mongoose config file | ⨉ | routes | Custom Routes setting | ⨉ | schema | Custom Mongoose Schema | ⨉ | crud | Custom CRUD (controller, schema, routes and interface provided) | ✓

Sample Usage

Express - Mongoose Config

npx js-work-cli express mConfig core/configurations mongoose.config ts

Result in folder view:

   - core (cli generated folder)
       - configurations (cli generated folder)
           - cronjob.config.ts (sample file)
           - express.config.ts (sample file)
           - moongose.config.ts (cli generated template file)
   - src (sample folder)
   - index.js (sample file)

React - HttpService

npx js-work-cli react httpService core/services _ ts

Result in folder view:

   - core (cli generated folder)
       - services (cli generated folder)
           - httpRequest (cli generated folder)
               - apiService (cli generated template file) // Sample usage of API
               - baseService (cli generated template file) // Custom HttpService using axios
   - pages (sample folder)
   - src (sample folder)
   - app.js (sample file)
   - app.css (sample file)
   - index.js (sample file)

Note: that the CLI Generated folder will only manifest itself if it is not currently active within your project directory. Therefore, it is imperative that you do not become confused when viewing the result folder above.

Supported Languages

  • React (Javascript and Typecript)
  • Express (Javascript and Typecript)

Soon to Support Languages

  • Vue
  • Svelte
  • More...

Demo

Demo