Skip to content
This repository has been archived by the owner on May 3, 2024. It is now read-only.

docs(recipes): update module deployment recipe #300

Merged
merged 13 commits into from
Sep 25, 2020

Conversation

infoxicator
Copy link
Contributor

Updating documentation to use the new Vercel-cli and explain in more detail how the deployment of modules should work

Description

Motivation and Context

How Has This Been Tested?

Types of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation (adding or updating documentation)
  • Dependency update

Checklist:

  • My change requires a change to the documentation and I have updated the documentation accordingly.
  • These changes should be applied to a maintenance branch.
  • This change requires cross browser checks.
  • Performance tests should be ran against the server prior to merging.
  • This change impacts caching for client browsers.
  • This change impacts HTTP headers.
  • This change adds additional environment variable requirements for One App users.
  • I have added the Apache 2.0 license header to any new files created.

What is the Impact to Developers Using One App?

@infoxicator infoxicator requested review from a team as code owners September 10, 2020 14:33
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Sep 10, 2020
@github-actions
Copy link
Contributor

github-actions bot commented Sep 10, 2020

📊 Bundle Size Report

file name size on disk gzip
app.js 276.2KB 82.4KB
runtime.js 15KB 5.4KB
vendors.js 117.4KB 36.4KB
app~vendors.js 425.2KB 111KB
service-worker-client.js 17KB 5.2KB
legacy/app.js 291.4KB 85.6KB
legacy/runtime.js 15KB 5.4KB
legacy/vendors.js 172.9KB 47.1KB
legacy/app~vendors.js 439.9KB 114.1KB
legacy/service-worker-client.js 17.5KB 5.4KB

Generated by 🚫 dangerJS against 5423708


[Now.sh](https://zeit.co/home) allows you to deploy statics such as your modules. We will accomplish this by using [GitHub Actions](https://github.com/features/actions).
1. Upload the contents of the `build` folder to your CDN of choice.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thoughts on calling this, publishing a module. and adding ad note "uploading to the CDN publishes/releases, similar to how you release a dependency. Updating a module map will tell one-app to consume that published/released module version."

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i agree on this, and create separate documentation on how to do this and a step by step on uploading to a cdn/using actions to achieve this

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JAdshead do you mean changing the name of the entire guide to be "Publising modules" or is this just for the "deployment overview" section?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed to Publishing modules


[Now.sh](https://zeit.co/home) allows you to deploy statics such as your modules. We will accomplish this by using [GitHub Actions](https://github.com/features/actions).
1. Upload the contents of the `build` folder to your CDN of choice.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we also recommend uploading the contents of a build folder to a folder matching the name of the module:

/module-name/[contents-of-build-including-version]

| -module-name
   └ [version]
        ├ [locale]
        |    └ *.locales
        ├ module-name.browser.js
        ├ module-name.legacy.browser.js
        ├ module-name.node.js
        └ ..

Copy link
Contributor Author

@infoxicator infoxicator Sep 11, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I used to have that structure in my original script, but guess for Vercel was removed because it looks like you can't upload more than 1 module to the same project/url and you cannot select a folder, so every module will have it's own CDN instance / url which is a pain. With Amazon S3 you can keep all your modules under the same url/project so it the folder is required there

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a note that vercel doesn't support multiple folders

JAdshead
JAdshead previously approved these changes Sep 22, 2020
# Publishing Modules

## 📖 Table of Contents
* [Overview](overview)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* [Overview](overview)
* [Overview](#overview)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added here 5423708

nellyk
nellyk previously approved these changes Sep 23, 2020
@infoxicator infoxicator merged commit 9abc1c4 into master Sep 25, 2020
@infoxicator infoxicator deleted the docs/module-deployments branch September 25, 2020 17:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants