cloudfoundry / cloudfoundry/stratos
Extensions: Allow extensions to be published as separate packages
@vvaradhan is already working on this.
Since Jul 15, 2020.
- Dominant language
- TypeScript
- Stars
- 267
- Forks
- 137
- Avg merge
- 5h 14m
- Merged PRs (30d)
- 77
Description
GOAL: Allow an extension to be published to npm and then allow another user to npm install it into their Stratos and have it working.
Take a look at the branch ext-thin-app.
The goal is to have core as a separate package that we can publish to npm and that extensions developers can then use as a dependency when creating extensions.
At the moment, core provides the core as well as the app itself (take a look at the angular.json file) - you'll see at the code in the ext-thin-app branch that I've created a new application package.
Tasks:
- Review the code in
ext-thin-app - Get the
corepackage building as a separate library and demonstrate publishing it as an npm package - Create an extension that only references
@stratosui/coreand get this building as a library. You should then be able to publish this to npm - Create an angular schematic that can generate the thin application - use case here is a user wanting to create their own application using Stratos as a framework and a user wanting to build a Stratos extension in a new repository and needing an application that they can easily use to test it
- Ensure that the thin application is as thin as possible - the non-fork model will be:
- Install the Stratos devkit package to get the Stratos schematics and builders with
npm install @stratosui/devkit - Create a thin application with our schematic
ng generate @stratosui/devkit:application - Be able to run that application and get Stratos with no extensions
- Be able to add an extension easily with a schematic, e.g.
ng generate @stratosui/devkit:extension
- Install the Stratos devkit package to get the Stratos schematics and builders with
Note: In the non-fork model, the user is going to create a new application, so we want this to be as thin as we can, so as we upgrade things, we don't have to get the user to update their application each time.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.