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

Ewl 3345 pattern lab php to node #74

Closed
wants to merge 4 commits into from

Conversation

labbydev
Copy link
Contributor

@labbydev labbydev commented Apr 6, 2017

Change from PHP PatternLab to Node PatternLab with Twig engine

What's new

  • I have updated to the node version of PatternLab core using the upgrade instructions
  • I have followed the gulp update information
  • I was able to get around this issue by hacking the core that was specifically looking for the _00-head.mustache and _00-foot.mustache to look for the .twig versions

Major blockers

There are two exisiting errors that I cannot seem to find a way around:

TypeError: Cannot read property '0' of null
    at Object.findPartial (/Users/laurenbyrwa/Sites/AMA-style-guide/styleguide/node_modules/patternengine-node-twig/lib/engine_twig.js:75:61)
    at Object.findPartial (/Users/laurenbyrwa/Sites/AMA-style-guide/styleguide/node_modules/patternlab-node/core/lib/object_factory.js:150:24)
    at expandPartials (/Users/laurenbyrwa/Sites/AMA-style-guide/styleguide/node_modules/patternlab-node/core/lib/pattern_assembler.js:461:36)
    at decomposePattern (/Users/laurenbyrwa/Sites/AMA-style-guide/styleguide/node_modules/patternlab-node/core/lib/pattern_assembler.js:233:7)
    at processPatternRecursive (/Users/laurenbyrwa/Sites/AMA-style-guide/styleguide/node_modules/patternlab-node/core/lib/pattern_assembler.js:407:5)
    at Object.process_pattern_recursive (/Users/laurenbyrwa/Sites/AMA-style-guide/styleguide/node_modules/patternlab-node/core/lib/pattern_assembler.js:593:7)
    at /Users/laurenbyrwa/Sites/AMA-style-guide/styleguide/node_modules/patternlab-node/core/lib/patternlab.js:77:25
    at /Users/laurenbyrwa/Sites/AMA-style-guide/styleguide/node_modules/diveSync/diveSync.js:57:18
    at Array.some (native)
    at diveSync (/Users/laurenbyrwa/Sites/AMA-style-guide/styleguide/node_modules/diveSync/diveSync.js:33:17)

and

TypeError: Cannot read property 'replace' of undefined
    at style_html (/Users/laurenbyrwa/Sites/AMA-style-guide/styleguide/node_modules/patternlab-node/node_modules/js-beautify/js/lib/beautify-html.js:199:34)
    at exports.html_beautify (/Users/laurenbyrwa/Sites/AMA-style-guide/styleguide/node_modules/patternlab-node/node_modules/js-beautify/js/lib/beautify-html.js:1114:20)
    at Object.defaultFormatter (/Users/laurenbyrwa/Sites/AMA-style-guide/styleguide/node_modules/patternlab-node/core/lib/patternlab.js:323:44)
    at writePatternFiles (/Users/laurenbyrwa/Sites/AMA-style-guide/styleguide/node_modules/patternlab-node/core/lib/patternlab.js:343:59)
    at renderSinglePattern (/Users/laurenbyrwa/Sites/AMA-style-guide/styleguide/node_modules/patternlab-node/core/lib/patternlab.js:437:5)
    at patternsToBuild.forEach.pattern (/Users/laurenbyrwa/Sites/AMA-style-guide/styleguide/node_modules/patternlab-node/core/lib/patternlab.js:585:40)
    at Array.forEach (native)
    at buildPatterns (/Users/laurenbyrwa/Sites/AMA-style-guide/styleguide/node_modules/patternlab-node/core/lib/patternlab.js:585:21)
    at Object.build (/Users/laurenbyrwa/Sites/AMA-style-guide/styleguide/node_modules/patternlab-node/core/lib/patternlab.js:608:7)
    at build (/Users/laurenbyrwa/Sites/AMA-style-guide/styleguide/gulpfile.js:105:34)

@labbydev labbydev self-assigned this Apr 6, 2017
@labbydev
Copy link
Contributor Author

@froboy @mrspete I'd love to get another set of eyes on this to assist with the remaining issues. I'm happy to discuss tomorrow where I am current and how I got here.

@labbydev labbydev requested review from froboy and mrspete April 10, 2017 15:57
@labbydev
Copy link
Contributor Author

It looks like the node version of PatternLab is working to update the issue with the headers and the footers (pattern-lab/patternlab-node#611), but I think the errors above will still be persistent even once that is fixed.

@rpama rpama self-requested a review May 23, 2017 21:50
Copy link
Contributor

@rpama rpama left a comment

Choose a reason for hiding this comment

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

I think this was a great effort and agree with Avi it would be awesome if we could use the Node version of PatternLab, but as long as we need to use Twig, it seems we shouldn't move forward with this. The Pattern Node Twig Engine is considered experimental and seems not in a finished enough state for us to move forward at this time.

@deadarm
Copy link
Contributor

deadarm commented Jun 13, 2017

Closing based on @rpama 's review and comment above.

@deadarm deadarm closed this Jun 13, 2017
@froboy froboy deleted the EWL-3345-pattern-lab-php-to-node branch June 22, 2017 19:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants