-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor plugin to use new builders directory and break out utils.
- Loading branch information
1 parent
16259ac
commit c1899b3
Showing
11 changed files
with
49 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
'use strict'; | ||
|
||
// Modules | ||
const _ = require('lodash'); | ||
|
||
/* | ||
* Helper to get global deps | ||
* @TODO: this looks pretty testable? should services have libs? | ||
*/ | ||
module.exports = (steps, app, name, step = 'build_internal', front = false) => { | ||
const current = _.get(app, `config.services.${name}.${step}`, []); | ||
const add = (front) ? _.flatten([steps, current]) : _.flatten([current, steps]); | ||
_.set(app, `config.services.${name}.${step}`, _.uniq(add)); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
'use strict'; | ||
|
||
// Modules | ||
const _ = require('lodash'); | ||
|
||
/* | ||
* Helper to get global deps | ||
* @TODO: this looks pretty testable? should services have libs? | ||
*/ | ||
module.exports = (overrides = {}) => { | ||
const newOverrides = _.cloneDeep(overrides); | ||
if (_.has(newOverrides, 'image')) delete newOverrides.image; | ||
if (_.has(newOverrides, 'build')) delete newOverrides.build; | ||
return newOverrides; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
'use strict'; | ||
|
||
// Modules | ||
const _ = require('lodash'); | ||
|
||
/* | ||
* Helper to get global deps | ||
* @TODO: this looks pretty testable? should services have libs? | ||
*/ | ||
module.exports = (deps, pkger, prefix = []) => _(deps) | ||
.map((version, pkg) => _.flatten([prefix, pkger(pkg, version)])) | ||
.map(command => command.join(' ')) | ||
.value(); |