(Translated by https://www.hiragana.jp/)
GitHub - pantsbuild/example-javascript: An example repo to demonstrate JavaScript support in Pants
Skip to content

An example repo to demonstrate JavaScript support in Pants

License

Notifications You must be signed in to change notification settings

pantsbuild/example-javascript

Repository files navigation

example-javascript

An example repository to demonstrate Pants's experimental JavaScript support.

Running Pants

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.

Examples

Try these out in this repo.

Determine dependencies

pants dependencies src/index.js
pants dependencies --transitive src/index.js

Lint and format

pants lint ::
pants fmt ::

Test

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.

Package

The example uses esbuild to package the source into a single file in the dist directory.

pants package ::

Generate lockfiles

pants generate-lockfiles ::

About

An example repo to demonstrate JavaScript support in Pants

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •