@salesforce/dev-scripts
A set of standard package.json scripts for Salesforce projects.
Last updated 3 months ago by jgrantham .
BSD-3-Clause · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @salesforce/dev-scripts 
SYNC missed versions from official npm registry.

Common scripts and hooks for Salesforce typescript projects

What is this?

A collection of commonly needed scripts and hooks used by Salesforce typescript projects. This helps to enforce consistency across and reduces the amount of time it takes to setup new projects. This also reduces the amount of needed configuration required for each project by using common configuration from @salesforce/dev-config by default.

When dev-packages is added as a dev dependency, it will automatically run on post-install to enforce the package.json has the right scripts, hooks, and dependencies. Use the .sfdx-dev.json to configure what is generated and controlled.

The common scripts that are added to each project include:

  • clean: cleans lib/, coverage/, and a host of other files that shouldn't be included in the repository; include all to also clean node_modules e.g. yarn clean or yarn clean-all
  • compile: compiles src/ to /lib using tsc e.g. yarn compile
  • lint: lints src/ using tslint e.g. yarn lint
  • test: runs tests using nyc and mocha e.g. yarn test
  • build: runs the clean, compile, lint, and test targets e.g. yarn build
  • docs: generates docs/ using typedoc e.g. yarn docs

The common hooks that are added to each project include:

  • commit-msg: verifies the commit message conforms to angular guidelines using commitlint.
  • pre-commit: runs prettier on staged files and yarn docs.
  • pre-push: runs yarn build.

Configuration

To configure what this generates and controls, create a .sfdx-dev.json. Look at the schema to see what options are available.

Current Tags

  • 0.4.2                                ...           latest (3 months ago)

19 Versions

  • 0.4.2                                ...           3 months ago
  • 0.4.1                                ...           9 months ago
  • 0.4.0                                ...           10 months ago
  • 0.3.14                                ...           a year ago
  • 0.3.13                                ...           a year ago
  • 0.3.12                                ...           a year ago
  • 0.3.11                                ...           a year ago
  • 0.3.10                                ...           a year ago
  • 0.3.9                                ...           a year ago
  • 0.3.8                                ...           a year ago
  • 0.3.7                                ...           2 years ago
  • 0.3.6                                ...           2 years ago
  • 0.3.5                                ...           2 years ago
  • 0.3.4                                ...           2 years ago
  • 0.3.3                                ...           2 years ago
  • 0.3.2                                ...           2 years ago
  • 0.3.1                                ...           2 years ago
  • 0.2.1                                ...           2 years ago
  • 0.2.0                                ...           2 years ago

Copyright 2014 - 2016 © taobao.org |