Git Product home page Git Product logo

dev-scripts-1's Introduction

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 .sfdevrc.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 .sfdevrc file. Look at the schema to see what options are available.

Config File Notes

tsconfig

The include section has to live in the repository's tsconfig file until there is a way to specify a base. We plan to remove this section when microsoft/TypeScript#25430 is fixed

dev-scripts-1's People

Contributors

cristiand391 avatar dependabot[bot] avatar iowillhoit avatar mdonnalley avatar mshanemc avatar svc-scm avatar vamsimundra avatar willieruemmele avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.