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

[OC-49] Templates #525

Merged
merged 36 commits into from
Jul 21, 2017
Merged

[OC-49] Templates #525

merged 36 commits into from
Jul 21, 2017

Conversation

nickbalestra
Copy link
Contributor

@nickbalestra nickbalestra commented Jun 27, 2017

Feature branch ready to be merged to master after

@nickbalestra nickbalestra force-pushed the templates branch 2 times, most recently from d7c1184 to 8f5f03d Compare July 4, 2017 14:15
@nickbalestra nickbalestra changed the title Templates [OC-49] Templates Jul 5, 2017
@nickbalestra nickbalestra force-pushed the templates branch 3 times, most recently from 9d0151d to 69d3cf5 Compare July 20, 2017 10:36
@nickbalestra nickbalestra removed the wip label Jul 20, 2017
@nickbalestra
Copy link
Contributor Author

nickbalestra commented Jul 20, 2017

Please squash this on merge

Copy link
Member

@matteofigus matteofigus left a comment

Choose a reason for hiding this comment

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

Just a couple of changes and then we can merge after some more manual QA

@@ -121,7 +121,7 @@ module.exports = {
TEMPLATE_TYPE_NOT_VALID:
'the template is not valid. Allowed values are handlebars and jade',
TEMPLATE_DEP_MISSING:
'Template dependency missing. Run "$npm install --save {0}" to fix it.'
'Template dependency missing. To fix it run:\n\ncd {0} && npm install --save-dev {1}-compiler\n\n'
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we can just do npm install --save-dev {1}-compiler --prefix {0}. Perhaps reverting 0 with 1 for simplicity :D

before(() => {
const readJsonStub = sinon.stub();

readJsonStub.onFirstCall().returns({
oc: baseOcFragment('oc-template-react'),
dependencies: { 'oc-template-react': '1.2.3'}
devDependencies: { 'oc-template-react-compiler': '1.2.3' }
Copy link
Member

Choose a reason for hiding this comment

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

can we add here eslint as devDependency too? So we can test that is not added to the ones that need to be installed

it('should minify static resources', () => {
expect(packageStaticFilesStub.args[0][0].minify).to.eql(false);
});
describe('when component is not valid', () => {
Copy link
Member

Choose a reason for hiding this comment

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

When component parameters rename?

@@ -17,7 +17,7 @@ describe('utils : require-template', () => {

scenarios.forEach(scenario => {
it(scenario.name, () => {
Copy link
Member

Choose a reason for hiding this comment

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

Let's add another little scenario for compiler true|false?

@nickbalestra
Copy link
Contributor Author

nickbalestra commented Jul 21, 2017

Run it against our production sites/components and everything seemed to work correctly.
@matteofigus off to you for merging

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.

2 participants