0.1.1 • Published 3 years ago

@flexagon/fdvue-cli v0.1.1

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

fdvue-cli

An NPM utility to maintain fdvue UI configuration

Prerequisites

  • NPM must be installed

Installing

npm install -g @flexagon/fdvue-cli

Usage

As this project is in its infancy, these commands are subject to expand and change.

Utility should always be run from the fdui application root. I.E the folder with the nuxt.config.js. The command generates configuration according to the standards set by the project to help maintain consistency and increase developer productivity.

fdvue <command> <subcommand> [options]

A utility to maintain configuration for Tempest UI

Commands:
  fdvue generate <type>  Create common components for FlexDeploy Vue UI
                                                                    [aliases: g]

Options:
  --help     Show help                                                 [boolean]
  --version  Show version number                                       [boolean]

Generate

fdvue generate <type>

Create common components for FlexDeploy Vue UI

Commands:
  fdvue g component <namepath>  Create a common component in the /components
                                directory                           [aliases: c]
  fdvue g page <namepath>       Create a routable page component in the /pages
                                directory                           [aliases: p]
  fdvue g type <namepath>       Create a type model in the model/types directory
                                                                    [aliases: t]

Options:
  --help     Show help                                                 [boolean]
  --version  Show version number                                       [boolean]

Generate - Component

fdvue g component <namepath>

Create a common component in the /components directory

Positionals:
  namepath  The name/path of the component to create. To create in a subfolder
            specify that here. For example folder1/myComp             [required]

Options:
      --help         Show help                                         [boolean]
      --version      Show version number                               [boolean]
  -d, --skip-types   Skip the adding of a Vue component type interface being
                     added to the components.d.ts file.
  -t, --skip-tests   Forgo creation of the spec.ts file for automated testing
  -p, --skip-prefix  Dont prefix components and component specs with Fd. This
                     should rarely be used.

Examples:
  fdvue g c myComponent                     Creates /components/my-component/FdM
                                            yComponent.vue
                                            and /components/my-component/FdMyCom
                                            ponent.spec.ts

  fdvue generate c forms/app-input          Creates /components/forms/app-input/
  --skip-tests                              FdAppInput.vue

  fdvue generate component testing          Creates
  --skip-prefix                             /components/testing/Testing.vue
                                            and
                                            /components/testing/Testing.spec.ts

Generate - Page

fdvue g page <namepath>

Create a routable page component in the /pages directory

Positionals:
  namepath  The name/path of the page to create. The name/path should match the
            route, for example tasks/approval                         [required]

Options:
      --help        Show help                                          [boolean]
      --version     Show version number                                [boolean]
  -s, --skip-store  Should the store module creation be skipped. Only relevant
                    for page creation

Examples:
  fdvue g p sandbox            Creates /pages/sandbox/index.vue
                               /pages/sandbox/components/SandboxDisplay.vue
                               Registered to the route /sandbox.
                               Both components interact with a local private
                               store module.

  fdvue g p tasks/approval -s  Creates /pages/tasks/approval/index.vue
                               /pages/tasks/approval/components/ApprovalDisplay.
                               vue
                               Registered to the route /tasks/approval.
                               Both components interact with a local composition
                               function.

Generate - Type

fdvue g type <namepath>

Create a type model in the model/types directory

Positionals:
  namepath  The name/path of the type model to create. By default it will be
            created in model/types                                    [required]

Options:
      --help     Show help                                             [boolean]
      --version  Show version number                                   [boolean]
  -g, --global   Create the type globally in the model/types folder

Examples:
  fdvue g t api -g                  Creates /model/types/api.d.ts
                                    This type is registered globally in eslint.

  fdvue g t api --global            Creates /model/types/api.d.ts
                                    This type is registered globally in eslint.

  fdvue g t /pages/sandbox/sandbox  Creates /pages/sandbox/sandbox.d.ts
                                    This type is registered globally in eslint.

Contributing

Fork https://github.com/flexdeploy/fdvue-cli.git and create a pull request with the changes

OS Support

  • Windows
0.1.1

3 years ago

0.1.0

3 years ago