An example repository to demonstrate Pants's experimental JavaScript support.
You run Pants goals using the pants
launcher binary, which will bootstrap the
version of Pants configured for this repo if necessary.
See here for how to install the pants
binary.
Try these out in this repo.
pants dependencies src/index.js
pants dependencies --transitive src/index.js
pants lint ::
pants fmt ::
pants test ::
pants test --use-coverage ::
The example is configured to use Jest as the test runner via package.json
"scripts.test" key.
Mocha is also supported by the Javascript backend.
The example uses esbuild to package the source into a single file in the dist
directory.
pants package ::
pants generate-lockfiles ::