Граф коммитов

16 Коммитов

Автор SHA1 Сообщение Дата
Danny Coates 3266e312db
fix(edge): fxa failed on Edge
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.
2020-07-29 17:53:56 -07:00
Danny Coates f6aff29419
fix(docker): added openssl to fxa-node docker image. fixes #5669 2020-06-25 16:02:15 -07:00
Jared Hirsch 20a0acf8b0
chore(docs): Replace 'master' with 'main' throughout
Certain references to 'master' haven't been removed yet, see
issue #5698, issue #5699, issue #5700 for more complex followups.
2020-06-25 13:44:28 -07:00
Jody Heavener e6fafda68b
feat(storybook): allow Tailwind scss compilation support
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
2020-06-08 09:57:09 -04:00
Lauren Zugai d22db34b48
style(settings): UnitRow, UnitRowWithAvatar, & Modal styles + Storybook, allow postcss imports
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
2020-06-02 16:57:20 -05:00
Danny Coates 21fe09b720
fix(build): fix paths to fxa-shared
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.
2020-05-28 19:07:52 -07:00
Danny Coates e565285b7e
refactor(tsconfig): consolidate common tsconfig options
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.
2020-05-26 12:18:51 -07:00
Danny Coates cc595fc2b4
chore(format): mass reformat with prettier 2 and single config 2020-05-24 10:51:57 -07:00
Jody Heavener 9e1104c05e
refactor(lint-staged): replace sass-lint with stylelint
remove sass-lint from all packages
2020-05-21 21:25:48 -04:00
Danny Coates 81575019a9
refactor(packages): use workspace references 2020-05-21 10:57:21 -07:00
Danny Coates 0725d8ee4f
fix(docker): add graphicsmagick to base node image
fixes #5194
2020-05-04 10:18:46 -07:00
Danny Coates b88a0e2cff
refactor(fxa-circleci): moved fxa-circleci image source
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.
2020-04-30 17:04:51 -07:00
Danny Coates 4dd0b00076
feat(build): add a default dockerfile template to build.sh
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.
2020-04-23 07:40:31 -07:00
Danny Coates d4da8a3606
feat(docker): created fxa-builder docker image
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.
2020-04-22 16:27:22 -07:00
Danny Coates 3a054dfc3f
refactor(pm2): restructure our pm2 configs
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
2020-04-14 14:38:38 -07:00
Danny Coates a4b3996349
refactor(npm-scripts): refactored npm scripts for better ergonomics
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
2020-04-13 16:17:36 -07:00