because the preset-env didn't transpile various spread (...) operations
this adds all the preset-env config required to transform for Edge. interestingly, setting the target version for edge is not enough to transform them properly and seems like a bug in the loader.
Because:
* Currently fxa-settings imports SCSS into a Tailwind file, but outside of Create React App (which handles SCSS compilation in the React app itself) SCSS is not compiled.
This commit:
* Updates both Tailwind and Storybook's setup so that you can now compile down to CSS or SCSS depending on your needs, and ensure Storybook's SCSS loader picks it up
Because:
* Now that Tailwind is configured, we can style existing Settings components and the current layout.
This commit:
* Changes UnitRowWithImage to UnitRowWithAvatar because we likely will not reuse it
* Styles Modal, UnitRow, and UnitRowWithAvatar across mobile, tablet, & desktop
* Adds Modal, UnitRow, and UnitRowWithAvatar to Storybook
* Adds postcss-import and sets a convention for shared class styles with Tailwind with ctas.scss, UnitRow.scss, and .link-blue
* Modifies the shared close.svg
fixes#5394
fxa-shared is a mix of typescript and javascript. When we started using workspace:* references I converted all of our require paths for fxa-shared to remove the ../../ relative paths. In doing so I also changed some requires that looked like require('fxa-shared').l10n.localizeTimestamps to require('fxa-shared/l10n/localizeTimestamps'). The problem with that isn't immediately clear because in local development and CI it works fine because of ts-node/register. The problem is that localizeTimestamps is typescript and production doesn't use ts-node so it has no idea how to load it. Going through the object chain on require('fxa-shared') works because 'fxa-shared' resolves to the compiled 'dist/index.js'. The other way resolves to the source directory where there is no js file. Ok, so we should always do require('fxa-shared').whatever, well, no. There's currently cases where we have to go the other way. It's inconsistent, and we should fix it.
This commit fixes those require paths.
It also fixes a runtime path issue with our docker images. Our current production configuration expects each app to be located at /app, but now after switching to yarn most of our dependencies live two directories up from the app code, and the way that our internal dependencies, like fxa-shared, are accessed is via a relative symlink setup by yarn. So there's not room for these paths without changes. Instead of copying things like before, this change creates a root /fxa directory with the whole project and creates a symlink to /app for whichever service it's for.
To reduce duplication and encourage consistency in our
typescript builds this extracts most of the options
into two base configs, one for node and one for browsers.
Also, in order to better utilize workspaces the require
paths to fxa-shared and fxa-react were updated throughout.
Including fxa-circleci in the /packages folder was awkward
since it isn't part of the deployment and needed some special
handling in the test/build process.
This attempts to make that better.
This reduces the boilerplate when all your package
needs is to copy the contents of it's own directory to /app
and a pm2.config.js file exists
To allow more packages to use the default, /fxa-geodb and
/fxa-shared are included in the fxa-node base image.
Custom images can still be made by having a Dockerfile as before.
This adds a base node image and builder image so
that all our service images can share the same
common base, be smaller, and require less customization.
why: several reasons...
- to have a unified approach and pattern for:
- debugging
- fs watching for local dev
- running services in dev
- configuring services in dev
- to improve the initial clone and subsequent `npm ci` experience
- to make future work on tooling easier
1. renamed _scripts/*.sh to use kebab-case
2. linted _scripts with shellcheck
3. added _dev directory and moved pm2 json files there
4. added nps and package-scripts.js
- this allows us to do nice things like: `npm start debug firefox`
- I'd like to expand this further but it's a start
5. refactored the install scripts to make `npm install` nicer
6. renamed pm2 process names for easier control
- can use `pm2 logs auth` instead of the id