@stoplight/scripts
TypeScript icon, indicating that this package has built-in type declarations

9.3.4 • Public • Published

@stoplight/scripts

Maintainability Test Coverage

Usage

Create a new library:

npx @stoplight/scripts create:lib

Commands

sl-scripts build

Build source code

USAGE
  $ sl-scripts build

OPTIONS
  --verbose  moar logs

EXAMPLE
  $ sl-scripts build

See code: dist/commands/build/index.ts

sl-scripts bundle

Bundle source code

USAGE
  $ sl-scripts bundle

OPTIONS
  --minify   minify output using terser
  --verbose  moar logs

EXAMPLE
  $ sl-scripts bundle

See code: dist/commands/bundle/index.ts

sl-scripts create:lib

Scaffold out a new library.

USAGE
  $ sl-scripts create:lib

EXAMPLE
  $ sl-scripts create:lib

See code: dist/commands/create/lib.ts

sl-scripts help [COMMAND]

display help for sl-scripts

USAGE
  $ sl-scripts help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI

See code: @oclif/plugin-help

sl-scripts release

Publish new src or docs release.

USAGE
  $ sl-scripts release

OPTIONS
  --verbose  moar logs

EXAMPLES
  $ sl-scripts release
  $ sl-scripts release:docs

See code: dist/commands/release/index.ts

sl-scripts release:docs

Push built docs to github pages.

USAGE
  $ sl-scripts release:docs

OPTIONS
  --dry-run  run the release process but do not publish
  --verbose  moar logs

EXAMPLE
  $ sl-scripts release:docs

See code: dist/commands/release/docs.ts

Overriding Configs

Jest

Simply create a jest.config.js file in the root of your project, and extend the default config. For example:

// ./jest.config.js
module.exports = {
  preset: "@stoplight/scripts",
};

TS

Simply create a tsconfig.json file in the root of your project, and extend the default config. For example:

// ./tsconfig.json
{
  "extends": "@stoplight/scripts/tsconfig.json",
  "include": ["src"],
  "compilerOptions": {
    "outDir": "dist"
  }
}

TSLint

Simply create a tslint.json file in the root of your project, and extend the default config. For example:

// ./tslint.json
{
  "extends": ["@stoplight/scripts/tslint.json"]
}

Semantic Release

Simply add a release property to your package.json file. For example:

// ./package.json
{
  // ... props
  "release": {
    "pkgRoot": "dist",
    "plugins": [
      "@semantic-release/commit-analyzer",
      "@semantic-release/release-notes-generator"
    ]
  }
  // ... props
}

Rollup

By default all dependencies and peerDependencies declared in your package.json will be treated as external deps during sl-scripts bundle. If you would like to always bundle a dep, list those deps in your package.json file like so:

{
  "name": "your-package",
  "version": "0.0.0",
  "rollup": {
    "bundleDeps": ["dep-1", "dep-2"]
  }
}

Readme

Keywords

none

Package Sidebar

Install

npm i @stoplight/scripts

Weekly Downloads

167

Version

9.3.4

License

Apache-2.0

Unpacked Size

108 kB

Total Files

87

Last publish

Collaborators

  • stoplight-devops