x/pkgsite: using npm packages for frontend development #43358
We're working to improve frontend development ergonomics for pkgsite. This is the first in a series of issues about our plans. Comment below with any feedback or suggestions related to this issue!
The Go team has taken a philosophical stance against ballooning dependencies (https://research.swtch.com/deps). As a result we’ve tried to minimize our use of npm packages with a general rule of not adding them.
A script will be added to the devtools directory that will install packages and run npm scripts from a node binary installed within a docker container. Installing and using these tools will be optional for contributors that only make changes to non-frontend code and we'll continue to check the distributable frontend assets into the repository.
The text was updated successfully, but these errors were encountered:
Installs dependencies for typescript and stylelint and adds scripts to package.json for linting code. The linter will ignore code in content/static for now. A new directory to be added, content/lib, will contain the typescript and unprocessed css files. For golang/go#43358 Change-Id: I6ee74665a99af8938df6f1ee675c8705fcce589c Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/280599 Reviewed-by: Jonathan Amsterdam <firstname.lastname@example.org> Reviewed-by: Julie Qiu <email@example.com> Trust: Jamal Carvalho <firstname.lastname@example.org>