Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subsite support #674

Merged
merged 22 commits into from
Aug 19, 2019
Merged

Subsite support #674

merged 22 commits into from
Aug 19, 2019

Conversation

jpope19
Copy link
Contributor

@jpope19 jpope19 commented Jul 31, 2019

dependencies:

adds subsite support. allows for the following file structure inside of sites:

sites
    - site-name
        - subsites
            - subsite-name
                - media
                index.js
                bootstrap.yaml
                config.yaml
    index.js
    bootstrap.yaml
    config.yaml

required config for subsites:

  • protocol
  • path
  • host
  • port
  • assetPath

@coveralls
Copy link

coveralls commented Aug 6, 2019

Pull Request Test Coverage Report for Build 2392

  • 130 of 130 (100.0%) changed or added relevant lines in 7 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 2374: 0.0%
Covered Lines: 4145
Relevant Lines: 4145

💛 - Coveralls

lib/bootstrap.js Outdated Show resolved Hide resolved
lib/bootstrap.js Outdated Show resolved Hide resolved
lib/bootstrap.test.js Outdated Show resolved Hide resolved
lib/routes.js Outdated Show resolved Hide resolved
lib/routes.js Outdated Show resolved Hide resolved
Copy link
Contributor

@manuelurenah manuelurenah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🏄

lib/routes.js Outdated Show resolved Hide resolved
lib/services/sites.js Show resolved Hide resolved
_.mergeWith(controller, subsiteController, (par, sub) => {
if (Array.isArray(par) && Array.isArray(sub)) {
return par.concat(sub);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs to return par if sub is not an array for whatever reason?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be ok as is, tested with String params during dev

https://lodash.com/docs/4.17.15#mergeWith

If customizer returns undefined, merging is handled by the method instead. The customizer is invoked with six arguments:
(objValue, srcValue, key, object, source, stack).

Note: This method mutates object.

package.json Outdated Show resolved Hide resolved
lib/services/metadata.js Outdated Show resolved Hide resolved
lib/services/metadata.js Outdated Show resolved Hide resolved
@james-owen james-owen merged commit 29ee8ed into master Aug 19, 2019
@james-owen james-owen deleted the subsite-support branch August 19, 2019 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants