# components-builder

> Builds components

Latest version **1.0.0** (published 2016-02-04) · ISC license · 0 weekly downloads

## Install

```sh
npm install components-builder
pnpm add components-builder
yarn add components-builder
bun add components-builder
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2016-02-04 |
| First published | 2016-02-04 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 23 |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | healpay |

## Links

- npm: https://www.npmjs.com/package/components-builder
- npm.io page: https://npm.io/package/components-builder

## Dependencies (23)

- [q](https://npm.io/package/q.md) ^1.4.1
- [pg](https://npm.io/package/pg.md) ^4.4.3
- [gulp](https://npm.io/package/gulp.md) ^3.9.0
- [knex](https://npm.io/package/knex.md) ^0.9.0
- [yargs](https://npm.io/package/yargs.md) ^3.29.0
- [dotenv](https://npm.io/package/dotenv.md) ^1.2.0
- [babelify](https://npm.io/package/babelify.md) ^7.1.0
- [bluebird](https://npm.io/package/bluebird.md) ^3.0.3
- [reactify](https://npm.io/package/reactify.md) ^1.1.1
- [gulp-exec](https://npm.io/package/gulp-exec.md) ^2.1.2
- [gulp-gzip](https://npm.io/package/gulp-gzip.md) ^1.2.0
- [gulp-size](https://npm.io/package/gulp-size.md) ^2.0.0
- [node-uuid](https://npm.io/package/node-uuid.md) ^1.4.3
- [browserify](https://npm.io/package/browserify.md) ^12.0.1
- [gulp-rename](https://npm.io/package/gulp-rename.md) ^1.2.2
- [gulp-uglify](https://npm.io/package/gulp-uglify.md) ^1.4.2
- [run-sequence](https://npm.io/package/run-sequence.md) ^1.1.4
- [vinyl-buffer](https://npm.io/package/vinyl-buffer.md) ^1.0.0
- [gulp-s3-upload](https://npm.io/package/gulp-s3-upload.md) ^1.4.4
- [gulp-json-editor](https://npm.io/package/gulp-json-editor.md) ^2.2.1
- [babel-preset-react](https://npm.io/package/babel-preset-react.md) ^6.1.2
- [babel-preset-es2015](https://npm.io/package/babel-preset-es2015.md) ^6.1.2
- [vinyl-source-stream](https://npm.io/package/vinyl-source-stream.md) ^1.1.0

## Recent versions

- 1.0.0 (latest) — 2016-02-04

## README

## 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)
```

---
_Source: https://npm.io/package/components-builder · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
