@architect/hydrate
Advanced tools
Comparing version 1.3.3-RC.3 to 1.4.0
{ | ||
"name": "@architect/hydrate", | ||
"version": "1.3.3-RC.3", | ||
"version": "1.4.0", | ||
"description": "Architect dependency hydrator and shared file manager", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -20,2 +20,5 @@ # `@architect/hydrate` [![Travis Build Status](https://travis-ci.com/architect/hydrate.svg?branch=master)](https://travis-ci.com/architect/hydrate) [![Appveyor Build Status](https://ci.appveyor.com/api/projects/status/1svykswtyce1k3u9/branch/master?svg=true)](https://ci.appveyor.com/project/ArchitectCI/hydrate/branch/master) [![codecov](https://codecov.io/gh/architect/hydrate/branch/master/graph/badge.svg)](https://codecov.io/gh/architect/hydrate) | ||
> Note: the process running `hydrate` must be the same as the root of the project it's hydrating. So if the project you're trying to `hydrate` is located locally at `/projects/myapp` and you're running `hydrate` from `/scripts/hydrate`, you'll need to ensure you `process.chdir('/projects/myapp')` prior to execution | ||
## `hydrate(options)` | ||
@@ -25,5 +28,3 @@ | ||
- `basepath`: What path hydrate should consider as the root for searching for | ||
functions to hydrate. Useful if you want to hydrate a subset of functions. | ||
Defaults to `src` in the current working directory. | ||
- `basepath`: What path hydrate should consider as the root for searching for functions to hydrate. Useful if you want to hydrate a subset of functions. Defaults to `src` in the current working directory. | ||
- `install`: If truthy, will invoke [`hydrate.install()`][install]. | ||
@@ -34,13 +35,11 @@ - `update`: If truthy, will invoke [`hydrate.update()`][update]. | ||
## `hydrate.install(basepath='src', callback)` | ||
Installs dependencies for all Functions found in the specified `basepath`. Invokes | ||
[`hydrate.shared()`][shared]. | ||
## `hydrate.install(options, callback)` | ||
Note that for the default value of `basepath='src'`, this means `install` will | ||
also hydrate shared folders like `src/shared` and `src/views`. | ||
Installs dependencies for all Functions found in the specified `basepath`. Invokes [`hydrate.shared()`][shared]. | ||
To ensure local development behavior is as close to `staging` and `production` | ||
as possible, `hydrate.install()` (and other hydrate functions) uses: | ||
Note that for the default value of `basepath='src'`, this means `install` will also hydrate shared folders like `src/shared` and `src/views`. | ||
To ensure local development behavior is as close to `staging` and `production` as possible, `hydrate.install()` (and other hydrate functions) uses: | ||
- **node.js**: `npm ci` if `package-lock.json` is present and `npm i` if not | ||
@@ -50,16 +49,11 @@ - **python**: `pip3 install` | ||
## `hydrate.update(basepath='src', callback)` | ||
Updates dependencies in all Functions found in the specified `basepath`. Invokes | ||
[`hydrate.shared()`][shared]. Note that this will only functionally differ from | ||
[`hydrate.install()`][install] if you use a lockfile like `package-lock.json` or | ||
`Gemfile.lock`. | ||
## `hydrate.update(options, callback)` | ||
Note that for the default value of `basepath='src'`, this means `update` will | ||
also update dependencies in shared folders like `src/shared` and `src/views`. | ||
Updates dependencies in all Functions found in the specified `basepath`. Invokes [`hydrate.shared()`][shared]. Note that this will only functionally differ from [`hydrate.install()`][install] if you use a lockfile like `package-lock.json` or `Gemfile.lock`. | ||
`update` is functionally almost identical to [`install`][install], | ||
except it will update dependencies to newer versions _if they exist_. This is | ||
done via: | ||
Note that for the default value of `basepath='src'`, this means `update` will also update dependencies in shared folders like `src/shared` and `src/views`. | ||
`update` is functionally almost identical to [`install`][install], except it will update dependencies to newer versions _if they exist_. This is done via: | ||
- **node.js**: `npm update` | ||
@@ -69,9 +63,11 @@ - **python**: `pip3 install -U --upgrade-strategy eager` | ||
## `hydrate.shared(callback)` | ||
## `hydrate.shared(options, callback)` | ||
Copies shared code (from `src/shared` and `src/views`) into all Functions. | ||
[shared]: #hydratesharedcallback | ||
[install]: #hydrateinstallbasepathsrc-callback | ||
[update]: #hydrateupdatebasepathsrc-callback | ||
[shared]: #hydratesharedoptions-callback | ||
[install]: #hydrateinstalloptions-callback | ||
[update]: #hydrateupdateoptions-callback | ||
[npm]: https://www.npmjs.com/package/@architect/hydrate |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
42586
0
69