1.0.14-test • Published 1 year ago

js-work-cli v1.0.14-test

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

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

TemplateDescriptionHasMultipleFiles
plainPlain react file
pStateBuilt in useState sample in file
pEffectBuilt in useEffect sample in file
pRefBuilt in useRef sample in file
stefBuilt in useState and useEffect sample in file
stefrBuilt in useState, useEffect and useRef sample in file
httpServiceCustom Http Service (Sample API request provided)
zustandCustom Zustand Store
debounceDebounce Hook

Express Template

TemplateDescriptionHasMultipleFiles
eConfigExpress config file
mConfigMongoose config file
routesCustom Routes setting
schemaCustom Mongoose Schema
crudCustom 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

1.0.14-test

1 year ago

1.0.14-beta

1 year ago

1.0.13-beta

1 year ago

1.0.12-beta

1 year ago

1.0.11-beta

1 year ago

1.0.10-beta

1 year ago

1.0.9-beta

1 year ago

1.0.8-beta

1 year ago

1.0.7-beta

1 year ago

1.0.6-beta

1 year ago

1.0.5-beta

1 year ago

1.0.4-beta

1 year ago

1.0.3-beta

1 year ago

1.0.2-beta

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago