Skip to content

feat(cmf): allow bootstrap without settings#2110

Merged
jsomsanith-tlnd merged 3 commits intomasterfrom
jsomsanith/feat/cmf_settings_optional
Apr 1, 2019
Merged

feat(cmf): allow bootstrap without settings#2110
jsomsanith-tlnd merged 3 commits intomasterfrom
jsomsanith/feat/cmf_settings_optional

Conversation

@jsomsanith-tlnd
Copy link
Copy Markdown
Contributor

@jsomsanith-tlnd jsomsanith-tlnd commented Mar 22, 2019

What is the problem this PR is trying to solve?
Settings has been the heart of cmf since the beginning.
But we should allow to write app without injection everywhere.

What is the chosen solution to this problem?
cmf.bootstrap() doesn't fetch and dispatch settings if not settingsURL is provided

Please check if the PR fulfills these requirements

  • The PR commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features) And non reg done before need review
  • Docs have been added / updated (for bug fixes / features)
  • Related design / discussions / pages (not in jira), if any, are all linked or available in the PR

[x] This PR introduces a breaking change

cmf.bootstrap doesn't have a default settingsURL value anymore. Without settingsURL, no settings will be fetched.

To set back the previous behavior, you just need to pass the settingsURL

// before
cmf.bootstrap({
    // attributes without settingsURL
});

// after
cmf.bootstrap({
    settingsURL: '/settings.json'
});

@build-travis-ci
Copy link
Copy Markdown
Collaborator

:octocat: Demo is available here

@build-travis-ci
Copy link
Copy Markdown
Collaborator

:octocat: Demo is available here

@jsomsanith-tlnd jsomsanith-tlnd merged commit 35a2713 into master Apr 1, 2019
@jsomsanith-tlnd jsomsanith-tlnd deleted the jsomsanith/feat/cmf_settings_optional branch April 1, 2019 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants