0.7.0 • Published 25 days ago

@procore/hammer v0.7.0

Weekly downloads
-
License
SEE LICENSE IN LI...
Repository
github
Last release
25 days ago

@procore/hammer

The command interface, or facade, for all available tools in the toolchain.

Quick Start

Install @procore/hammer.

yarn add -D @procore/hammer

View the available commands.

yarn @procore/hammer --help

Run the desired the command.

yarn @procore/hammer lib:build

If the plugin that handles that command has not yet been installed into your project, you will be prompted whether you would like it installed automatically. Once the plugin has been installed, the command will be available to you!

Available Commands

(in progess)

Package NameDescription
app:buildBuilds a web application
app:cleanDeletes any files generated from the app:build command
app:startRuns the app:build in watch mode, applying changes as they are saved to the build and the browser
lib:buildBuilds a library for use as a npm package
lib:cleanDeletes any files generated from the lib:build command
lib:startRun the lib:build in watch mode, re-building the library as changes are saved
lint:codeRuns the configured code linter
lint:stylesRuns the the configured stylesheet linter
testRuns the configured test engine against the project's source code with the installed Test Plugin

Customization

Hammer can be customized via a configuration file in the current working directory. The configuration file should be named one of the following:

  • hammer.config.ts - TypeScript-formatted file
  • hammer.config.js - CommonJS or ECMAScript file
  • hammer.config.cjs - CommonJS file
  • hammer.config.mjs - ECMAScript file

The configuration file should have a single default export, and a key matching the package the your would like to customize.

// ESM/TypeScript file
export default {
  libTsup(config) {
    // customization for the @procore/hammer-lib-tsup package.
  },
  testJest(config) {
    // customization for the @procore/hammer-test-jest package.
  },
};
// CJS file
module.exports = {
  libTsup(config) {
    // customization for the @procore/hammer-lib-tsup package.
  },
  testJest(config) {
    // customization for the @procore/hammer-test-jest package.
  },
};

Refer to the docs for the respective package for how to customize the particular package.

NOTE: hammer has been designed with reasonable defaults for each wrapped tool. Reach for customization only when necessary!