mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-12-18 18:20:51 +00:00
7ef925fb97
It is probably not that critical to understand if "09/11/2016" refers to September 11th or November 9th. I still think it's worth looking for a documentation format that is easy to understand by an international developers community. My personal best practice is to use the ISO format. Change-Id: Ib209a8a1651970d74f82c188ae4b84d1a4eb534e
1.5 KiB
1.5 KiB
1. Frontend sources directory structure
Date: 2017-02-14
Status
Accepted
Context
With the addition of a frontend bundler, there are now assets that are the source, and assets that are for distribution.
Before, all assets were distribution ones stored in resources/
, just
a configurable convention used by the Reading Web team for using MediaWiki's
ResourceLoader.
In order to facilitate the CI checks and understanding where sources are and where compiled sources are, we need to chose two distinct paths for storing sources and distribution files.
Decision
After some discussion, because of ease of understanding to the wider development community and the good mapping between the name and what they contain, we chose to:
- Put unbundled frontend sources in
src/
. - Put bundled distribution files in
dist/
underresources/
inresources/dist/
. - Files directly distributed by ResourceLoader remain under
resources/*
to follow Reading Web Team's conventions around assets used by ResourceLoader.
Consequences
- Frontend sources will be under
src/
. - After
npm start
ornpm run build
the bundled sources will be underresources/dist
. - Jenkins will check in continuous integration that the sources under
src/
are actually compiled when commited underresources/dist
. - If the
src
path where to become inconvenient because we wanted to add other types of sources in it, we'll move the frontend assets tosrc/js
or something more specific.