-
Notifications
You must be signed in to change notification settings - Fork 122
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
[OC-49] Templates #525
Conversation
d7c1184
to
8f5f03d
Compare
9d0151d
to
69d3cf5
Compare
Please squash this on merge |
There was a problem hiding this 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
src/resources/index.js
Outdated
@@ -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' |
There was a problem hiding this comment.
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' } |
There was a problem hiding this comment.
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', () => { |
There was a problem hiding this comment.
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, () => { |
There was a problem hiding this comment.
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?
… -compiler modules
…f not already avail
Run it against our production sites/components and everything seemed to work correctly. |
Feature branch ready to be merged to master after
CC @mattiaerre @matteofigus