pattern-library / generator-pattern-library

Yeoman Generator creating Pattern Libraries
4 stars 4 forks source link

adding html template gives error #3

Open rebmullin opened 9 years ago

rebmullin commented 9 years ago

@scottnath @e2tha-e - When i try to add an html pattern, i see the following error message:

Error: 1 at formatError (/usr/local/lib/node_modules/gulp/bin/gulp.js:169:10) at Gulp.<anonymous> (/usr/local/lib/node_modules/gulp/bin/gulp.js:195:15) at Gulp.emit (events.js:129:20) at Gulp.Orchestrator._emitTaskDone (/Users/rebeccamullin/Desktop/gen2/node_modules/gulp/node_modules/orchestrator/index.js:264:8) at /Users/rebeccamullin/Desktop/gen2/node_modules/gulp/node_modules/orchestrator/index.js:275:23 at finish (/Users/rebeccamullin/Desktop/gen2/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:21:8) at ChildProcess.cb (/Users/rebeccamullin/Desktop/gen2/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:29:3) at ChildProcess.emit (events.js:110:17) at maybeClose (child_process.js:1015:16) at Socket.<anonymous> (child_process.js:1183:11)

If i try to (gulp) rebuild and serve, I see the following:

Error: 1 at formatError (/usr/local/lib/node_modules/gulp/bin/gulp.js:169:10) at Gulp.<anonymous> (/usr/local/lib/node_modules/gulp/bin/gulp.js:195:15) at Gulp.emit (events.js:129:20) at Gulp.Orchestrator._emitTaskDone (/Users/rebeccamullin/Desktop/gen2/node_modules/gulp/node_modules/orchestrator/index.js:264:8) at /Users/rebeccamullin/Desktop/gen2/node_modules/gulp/node_modules/orchestrator/index.js:275:23 at finish (/Users/rebeccamullin/Desktop/gen2/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:21:8) at ChildProcess.cb (/Users/rebeccamullin/Desktop/gen2/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:29:3) at ChildProcess.emit (events.js:110:17) at maybeClose (child_process.js:1015:16) at Socket.<anonymous> (child_process.js:1183:11) [12:54:30] Error in plugin 'run-sequence' Message: An error occured in task 'patternlab-build-public'.

scottnath commented 9 years ago

@rebmullin cc: @e2tha-e @sergesemashko @conortm @gvorbeck @beynya @nikkiana

This is due to the new version of pattern lab twig (0.6.11) not allowing a mix of html and twig templates.

Our options include:

  1. add a BOOLEAN config option to pattern-library-utilities that would determine import of non-"default template engine" (configuration.templateEngine) patterns into the system (defualt template engine is currently twig)
  2. search to see if there is a flag in Pattern Lab (twig version) that allows a mix of html and twig templates

I think we should do both.

volunteer(s)?

rebmullin commented 9 years ago

@scottnath - it seems even with the default/original PL version, you can't add straight up html files -their default is mustache. I believe if we only give the twig option as a template option since you can just add html w/o any twig syntax in this file type, this could be a solution..?

As far as importing, if that’s a concern, from another source - maybe we can just convert the file extension to twig so it’s compatible with this...

does this make sense? what do you think?

scottnath commented 9 years ago

@rebmullin thank you for looking into that.

I'll change the default to only import twig templates. That should fix the plab issue.

rebmullin commented 9 years ago

@scottnath - and yeh still think that would be good to have to have option of importing/setting up twig version or default/mustache PL version..