You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 23, 2020. It is now read-only.
Several commands are presented to manipulate global assets and import maps and a publish command is used to publish a podlets assets to the server (making use of globally published assets in the process)
Example: react
create an assets.json metafile and fill in the correct values
publish an esm version of react (16.8.6)
create an appropriate alias for react (^16)
add an entry to the global import map pointing react at ^16
publish the projects own assets
Metafile
The assets.json file.
Each project needs to have an assets.json file to describe various parameters
such as org, app and version. An assets.json file might perhaps look something
like the following:
This command takes the name and version of a package on npm, downloads it, creates a bundle of it that is
esm compatible if necessary and then uploads it to the cdn
I was thinking convention and that the publish command would just automatically create such a bundle as part of the publish process. We could make it a configurable field with a smart default though?
Workflow
Several commands are presented to manipulate global assets and import maps and a publish command is used to publish a podlets assets to the server (making use of globally published assets in the process)
Example:
react
react
at^16
Metafile
The assets.json file.
Each project needs to have an assets.json file to describe various parameters
such as org, app and version. An assets.json file might perhaps look something
like the following:
global publish
This command takes the name and version of a package on npm, downloads it, creates a bundle of it that is
esm compatible if necessary and then uploads it to the cdn
example:
asset-pipe global publish [email protected]
After running the above example, an esm compatible version of react 16.8.6 will be available at
/finn/react/16.8.6
global alias|tag
This command configures 302 redirects.
example:
asset-pipe global alias [email protected] ^1
After running the above example,
/finn/react/^1
will redirect to/finn/react/16.8.6
global map
This command can be used to manipulate the global import map file that is used in the publish command
(described below)
example:
asset-pipe global map react react@^1
After running the command above, all bare import references to react will point to the CDN at
<cdn>/finn/react/^1
publish
This command can be used to create a local bundle of assets with bare imports replaced based on a global import map file
and then uploaded to the cdn
example:
asset-pipe publish
After running the command above, the local assets will be available on the cdn at
<cdn>/finn/<app name>/<version>
The text was updated successfully, but these errors were encountered: