components-builder

1.0.0 • Public • Published

Components structure

-> /portal
  -> /pay - not decided yet if it's an independent npm module or not
  -> /wallet
-> /other-top-level-modules
  -> /other-modules

Builder

Calling gulpfile from root passing an specific domain, will generate a new distribution, and also release to s3/cloudfront if wanted.

Build Process

$ gulp build --domain=xyz
> select module, package_json from packages where module = 'portal';
> builds dist, pull modules from package.json
> pulls settings from the domain, puts on dist's package.json

Example: AWS_CLIENT_KEY=xx AWS_CLIENT_SECRET=yyy AWS_BUCKET=cdn.healpay.com DATABASE_URL=postgres://get_from_heroku?ssl=true gulp --domain=healpay-portal.dev

insert into packages (fqdn_path, module, package_json) values ('healpay-platform.dev','portal', '{"name":"Healpay portal","version":"0.0.1","description":"not yet","author":"healpay","license":"ISC","dependencies":["core", "pay"]}');

Release

Platform will render a index template, which will render the latest released index.js for that domain. Platform will fetch the correct index.js it'll render based on the versions table. That way, we can control/rollback versions based on versions/cloudfront if needed.

$ gulp release domain=xyz
> attach a uuid timestamp to file name
> upload do S3
> Cloudfront
> Insert new release information on the versions table
> happy users

Packages

Where the dependencies of a top level are documented

Table
- domain
- package_json

Versions

When builder releases a version, it will created the a record on the table below.

Table
- domain
- module
- uuid_version
- created_at
- user (user who triggered the version - might be good to have this info)

Readme

Keywords

none

Package Sidebar

Install

npm i components-builder

Weekly Downloads

1

Version

1.0.0

License

ISC

Last publish

Collaborators

  • healpay