mediacurrent / theme_generator_8

Yeoman generator for Drupal Themes - lets you quickly set up a Drupal 8 theme with sensible defaults and best practices.
MIT License
100 stars 25 forks source link

Problem serving pattern lab #50

Closed chreeas closed 4 years ago

chreeas commented 4 years ago

Hello, first off, thanks for providing this theme generator!

I'm just having one issue with viewing the styleguide in the browser. Running gulp patternlab:serve returns an error which says Task never defined: patternlab:serve. The patternlab documentation simply says that the node version of PL ships with a node server, but it seems to be missing from this instance when created with the theme generator.

I am able to access the style guide by entering the full path to the pattern lab index.html file (/themes/custom/my_theme/patternlab/index.html), but if I refresh I get a 404 error which makes testing a bit difficult.

Is there something I missed in the initial setup? The documentation doesn't mention how to handle the pattern lab node server.

thanks in advance for any info.

zhawkins commented 4 years ago

👋 Take a look at the readme that was created within your theme. It should list the npm tasks to run. We don't ever call gulp directly but use npm scripts instead.

After you npm install, you should be able to fire up the local server with npm run watch. Hope this helps!

chreeas commented 4 years ago

Ahh that did it. Thanks!