The command interface, or facade, for all available tools in the toolchain.
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!
(in progess)
Package Name | Description |
---|---|
app:build |
Builds a web application |
app:clean |
Deletes any files generated from the app:build command |
app:start |
Runs the app:build in watch mode, applying changes as they are saved to the build and the browser |
lib:build |
Builds a library for use as a npm package |
lib:clean |
Deletes any files generated from the lib:build command |
lib:start |
Run the lib:build in watch mode, re-building the library as changes are saved |
lint:code |
Runs the configured code linter |
lint:styles |
Runs the the configured stylesheet linter |
test |
Runs the configured test engine against the project's source code with the installed Test Plugin |
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!