Skip to content
This repository has been archived by the owner on Apr 26, 2019. It is now read-only.

The replace property is not mandatory anymore (#57) #86

Merged
merged 3 commits into from May 25, 2017
Merged

The replace property is not mandatory anymore (#57) #86

merged 3 commits into from May 25, 2017

Conversation

LasaleFamine
Copy link
Contributor

No description provided.

@mention-bot
Copy link

@LasaleFamine, thanks for your PR! By analyzing the history of the files in this pull request, we identified @StefanoMagrassi to be a potential reviewer.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.2%) to 98.182% when pulling 5ff2762 on LasaleFamine:fix/57-replace-no-mandatory into 61357d4 on contactlab:develop.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage increased (+0.2%) to 98.182% when pulling 5ff2762 on LasaleFamine:fix/57-replace-no-mandatory into 61357d4 on contactlab:develop.

return new Promise((resolve, reject) => {
try {
const changedCSS = replaceInFile.sync(optionCSS);
const changedJS = replaceInFile.sync(optionJS);
const changedCSS = replaceInFile.sync(optionCSS.files ? optionCSS : defaultOptions);
Copy link
Contributor

Choose a reason for hiding this comment

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

@LasaleFamine maybe you can use Ramda's merge method

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As discuss, we can introduce new logic (and libs) during the refactor.

const changedCSS = replaceInFile.sync(optionCSS);
const changedJS = replaceInFile.sync(optionJS);
const changedCSS = replaceInFile.sync(optionCSS.files ? optionCSS : defaultOptions);
const changedJS = replaceInFile.sync(optionJS.files ? optionJS : defaultOptions);
Copy link
Contributor

Choose a reason for hiding this comment

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

@LasaleFamine same as previous comment

@@ -115,6 +115,18 @@ test('replace() products correct output', async t => {
t.is(fileReplace, `<!DOCTYPE html><html><head>\n <meta charset=\"utf-8\">\n <title></title>\n\n \n <link rel=\"stylesheet\" href=\"/assets/style.css\">\n \n\n \n <script src=\"/assets/javascript.js\"></script>\n \n\n </head>\n <body>\n\n \n\n</body></html>`);
});

test('when running replace() the "replace" property of configuration is not mandatory', async t => {
const {tmpDir, webpackConfig} = t.context;
const config = hconf(tmpDir, ['FOLDERS', 'VULCANIZE_NO_JS', 'MANIFEST']);
Copy link
Contributor

Choose a reason for hiding this comment

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

@LasaleFamine maybe 'MANIFEST' configuration is useless here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Now should be correct.

@coveralls
Copy link

coveralls commented May 24, 2017

Coverage Status

Coverage increased (+0.2%) to 98.182% when pulling c12c88a on LasaleFamine:fix/57-replace-no-mandatory into 61357d4 on contactlab:develop.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants