DJUST Command Line Interface (CLI)

Version: 0.0.1

The DJUST CLI is a command-line tool that provides various commands for managing themes and components for the DJUST client.

Available Commands

  • version (v): Output the version number.
  • create-theme: Create a new theme for the DJUST Client.
  • override (o, overwrite): Allows you to override a theme component. The overridden component will appear in the project and can be edited.
  • override-assets (oa, overwrite-assets): Allows you to override theme assets. The overridden asset will appear in the project and can be edited.
  • override-components (oc, overwrite-components): Allows you to override theme components. The overridden component will appear in the project and can be edited.
  • override-modules (om, overwrite-modules): Allows you to override DJUST modules. The overridden component will appear in the project and can be edited.
  • override-pages (op, overwrite-pages): Allows you to override theme pages. The overridden asset will appear in the project and can be edited.
  • help (h): Display documentation or help for DJUST. [Additional information needed for a specific explanation]

Please note that some commands lack descriptions, and additional context may be required for a more accurate explanation.

Example: Overriding a Component DJ-Button with DJUST CLI

Step 1: Execute the Command

Execute the djust oc command in the terminal.

Step 2: Select a Theme

The DJUST CLI will prompt you to select a theme to override. Use the arrow keys to navigate the options and press Enter to select a theme.

# djust oc
? Which theme you'd like to override: …
    ❯ Theme-1
    Theme-2
    Theme-3
    Theme-4
    Theme-5
    Theme-6
    Create New Theme

Step 3: Choose the Component

After selecting a theme, the CLI will present a list of components available in that theme. You can use autocompletion or the arrow keys to search and select the component you want to override. Press Enter after making your selection.

# djust oc
✔ Which theme you'd like to override: · Theme-1
? Type or select Component to override …
/atoms/DjAlert/DjAlert.vue
/atoms/DjBadge/DjBadge.vue
/atoms/DjBreadCrumb/DjBreadCrumb.vue
/atoms/DjButton/Button.stories.js
/atoms/DjButton/DjBtn.vue
/atoms/DjButton/DjButton.vue
/atoms/DjCarouselArrows/DjCarouselArrows.vue
/atoms/DjCheckbox/DjCheckbox.vue
/atoms/DjFacetValue/DjFacetValue.vue
/atoms/DjIcon/DjIcon.vue

Step 4: Component Override

The DJUST CLI will perform the necessary operations to override the chosen component. The overridden component will appear in your project directory, ready to be edited and customized according to your needs.

# djust oc
✔ Which theme you'd like to override: · Theme-1
✔ Type or select Component to override · /atoms/DjButton/DjButton.vue
[CLI > override] Component overrided. You can edit it in themes/Theme-1/components/atoms/DjButton/DjButton.vue