Nephrite Power Mace

    @morfeo/cli
    TypeScript icon, indicating that this package has built-in type declarations

    0.7.0 • Public • Published

    @morfeo/cli

    Morfeo logo

    A Command Line Interface to use morfeo, more details can be found here


    Documentation | API | Contributing | Discord


    Usage

    morfeo <command>
    
    Commands:
      morfeo build [name] [options]    build css styles based on your themes
      morfeo compose [name] [options]  compose morfeo style files into themes
    
    Options:
      --version  Show version number                                       [boolean]
      --help     Show help                                                 [boolean]

    Commands

    morfeo build

    build css styles based on your themes

    morfeo build [options]
    
    build css styles based on your themes
    
    Options:
          --version  Show version number                                   [boolean]
          --help     Show help                                             [boolean]
      -t, --theme                                                           [string]
      -n, --name     an identifier for the passed theme, for example "light", "dark"
                                                       [string] [default: "default"]
      -b, --build    the path where the generated css files will be placed  [string]
      -c, --config   the path to the configuration file
                                                     [string] [default: ".morfeorc"]
    
    Examples:
      simple              morfeo build
      with custom config  morfeo build --config="configurations/.morfeorc"
      custom options      morfeo build --theme="path/to/theme.ts" --name="light"

    See docs: morfeo build

    morfeo compose

    compose morfeo style files into themes

    morfeo compose [options]
    
    compose morfeo style files into themes
    
    Options:
          --version  Show version number                                   [boolean]
          --help     Show help                                             [boolean]
      -w, --watch    watch file changes                   [boolean] [default: false]
      -c, --config   the path to the configuration file
                                                     [string] [default: ".morfeorc"]
    
    Examples:
      simple  morfeo compose
      watch   morfeo compose --watch

    See docs: morfeo compose

    Configuration

    Global configuration could be specified in a file called by default .morfeorc.(js|json|ts), this file should export an object that follow this structure:

    type MorfeoConfig = {
      /**
       * the path where the generated css files will be placed
       */
      buildPath?: string;
      /**
       * An object where the key is the theme name and the value is the path to the theme.
       * @example
       * ```json
       * {
       *  "dark": "path/to/darkTheme",
       *  "light": "path/to/lightTheme",
       * }
       * ```
       */
      themes: Record<string, string>;
    };

    for example these formats are all valid configurations:

    // .morfeorc.ts
    export default {
      buildPath: './src/styles',
      themes: {
        light: './src/themes/lightTheme.ts',
        dark: './src/themes/darkTheme.ts',
      },
    };
    // .morfeorc.js
    module.exports = {
      buildPath: './src/styles',
      themes: {
        light: './src/themes/lightTheme.ts',
        dark: './src/themes/darkTheme.ts',
      },
    };
    // .morfeorc.json
    {
      "buildPath": "./src/styles",
      "themes": {
        "light": "./src/themes/lightTheme.ts",
        "dark": "./src/themes/darkTheme.ts",
      },
    };

    with the flag -c or --config you can specify a different path for the configuration, for example: morfeo build --config=src/configs/morfeo.config.ts

    Install

    npm i @morfeo/cli

    Homepage

    morfeo.dev

    DownloadsWeekly Downloads

    1

    Version

    0.7.0

    License

    MIT

    Unpacked Size

    78.3 kB

    Total Files

    89

    Last publish

    Collaborators

    • maurohertz