tiny-pilot / tiny-pilot/tinypilot

Manage frontend dependencies via npm / package.json

Open
#944 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
3.5k
Forks
291
PR merge metrics
No merged PRs in 30d

Description

Currently, our frontend dependencies all reside in app/static/third-party, and we use the naming pattern ./library-name/version/file.js.

That way, we are depending on pre-built script-type versions of the libraries, and have to dump them into the global namespace via <script src=""> tags.

Since we are using JS modules for our own JS code, it could be nicer to use module-type versions of the libraries, and have them automatically installed via npm from the package.json file.

It’s possible (and not uncommon) to check in the node_modules folder into the repository, to rule out the failure case of the npm servers being down at install time, or other leftpad-like shenanigans.

npm supports specifying the install location via the --prefix option, so we can install to app/static/node_modules, for example.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing app/static/third-party, the existing frontend <script src> usage, and the current JavaScript module setup. Define how package.json should manage those dependencies and whether they belong under app/static/node_modules; done means the frontend no longer relies on the current checked-in global-script layout and the chosen installation approach is reproducible.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
build-system, frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.