JSPM

@oriflame/lumos

4.1.16-alpha.59+e9771588
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 23
  • Score
    100M100P100Q128516F
  • License MIT

Centralized CLI for JavaScript and TypeScript dev tools.

Package Exports

  • @oriflame/lumos
  • @oriflame/lumos/lib/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@oriflame/lumos) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Lumos

Centralized CLI for JavaScript and TypeScript dev tools. Built on and powered by Beemo.

Usage

Prerequisites

  • package.json
  • install @oriflame/lumos

Setup initial project with this package:

npm init
npm install --save-dev @oriflame/lumos
npx lumos-setup

yarn:

yarn init
yarn add --dev @oriflame/lumos
npx lumos-setup

Scaffold dotfile

npx lumos scaffold project dotfiles

Create configs

npx lumos create-config [driver list]
npx lumos create-config eslint prettier

Running drivers

npx lumos <name of driver> [--cli options]
npx lumos eslint
npm lumos typescript --build --reference-workspaces

Supported drivers

Extra configs

Set drivers manually

{
  "lumos": {
    "drivers": ["babel", "eslint"]
  }
}

Supported settings

These setting are supported settings forwarded to the drivers, this settings affect configuration and behavior of the drivers.

export interface LumosSettings {
  buildFolder: string;
  coverage: number;
  docsFolder: string;
  env: LumosEnvSetting;
  graphql: boolean;
  library: boolean;
  future: boolean;
  node: boolean;
  react: boolean;
  nextjs: boolean;
  srcFolder: string;
  testsFolder: string;
  typesFolder: string;
  entryPoint?: string;
  publicPath?: string;
  root?: string;
  parallel?: boolean | number | string;
  testResultFileName?: string;
  emptyBabelConfig: boolean;
  allowJs: boolean;
  skipLibCheck: boolean;
  devServerContentBase?: string;
  moduleFederationConfig?: unknown;
  host?: string;
  enableSharedModules?: boolean;
  sharedModulesManifestPath?: string;
}

Default values

{
  buildFolder: 'lib',
  coverage: 75,
  docsFolder: 'docs',
  env: {},
  graphql: false,
  library: false,
  future: false,
  node: false,
  react: false,
  nextjs: false,
  testingLibrary: false,
  srcFolder: 'src',
  testsFolder: 'tests',
  typesFolder: 'types',
  emptyBabelConfig: false,
  allowJs: false,
  skipLibCheck: false,
  root: process.cwd(),
  parallel: true,
  testResultFileName: 'TEST-RESULTS.xml',
}

Edit this settings

in package json

{
  "lumos": {
    "settings": {
      "buildFolder": "lib",
      "coverage": 75
    }
  }
}

Modifying configs

Modify package.json

{
  "lumos": {
    "eslint": {
      // name of the driver
      "rules": {
        "import/prefer-default-export": "off"
      }
    }
  }
}

Create file in configs folder

Create javascript file inside this folder with name of driver. For example: configs/eslint.js

module.exports = {
  rules: {
    'import/prefer-default-export': 'off',
  },
};

Cli options

Babel

  • string[] - paths
  • extensions: string[] - file extensions
  • outDir: string - output directory override
  • esm: boolean - es modules compilation

Example:

lumos babel --extensions .ts,.js ./src --out-dir ./lib

Eslint

  • string[] - paths
  • ext: string[] - extension
  • color: boolean - enable color output

Example:

lumos eslint --ext .ts,.js ./src --color

Jest

  • colors: boolean - Enable color output
  • coverage: boolean - Enable code coverage

Example:

lumos jest --colors --coverage

Prettier

  • string[] - paths
  • write: boolean - Enable file write

Example:

lumos prettier --write ./src/**/*.{ts,tsx,js,jsx,scss,css,gql,graphql,yml,yaml,md}

Typescript

  • referenceWorkspaces: boolean - enable workspace references
  • emitDeclarationOnly: boolean - Only emit dts files

Example:

lumos typescript --referenceWorkspaces --emitDeclarationOnly

Webpack

  • colors: boolean - Enable color output
  • progress: boolean - Enable webpack progress log
  • bail: boolean -
  • parallel: number - Enable parallelism
  • buildFolder: string - Override build folder
  • entryPoint: string - Override entry point
  • sourceMaps: string - Enable source maps generation
  • analyze: string - Enable webpack analyze plugin

Example:

lumos webpack --colors --progress
lumos webpack build