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

include() in pattern data only working on initial build #16

Open
alamowo opened this issue May 28, 2018 · 3 comments
Open

include() in pattern data only working on initial build #16

alamowo opened this issue May 28, 2018 · 3 comments

Comments

@alamowo
Copy link

alamowo commented May 28, 2018

Hi,

when working on a pattern in which I include another pattern using the [pattern].yml or [pattern].json file, it only works on the initial build of the pattern lab. When running php core/console --watch and i change that data file or simply some css that makes PL recompile to the public folder, I only get Array as output.

Then I have to quit the PL watch task an rerun it.

Example YAML:

mol_accordion_elements:
  '1':
    title: A File
    icon: 'icon_download'
    content:
      include():
        pattern: atoms-file
        with:
          file:
            filename: file.pdf
            filesize: 96KB
            permalink: http://test.com/file.pdf
        only: true
@aleksip
Copy link
Owner

aleksip commented May 29, 2018

Hi, thanks for reporting this! Unfortunately DTP does not work properly when using PL's --watch feature. I hope to find some time to investigate the problem in the near future, but meanwhile I suggest using something like Gulp to watch for changes and call PL's --generate.

One example of such a Gulp script (with additional Browsersync and Sass support) can be found here: https://github.com/aleksip/shila-drupal-theme/blob/dev/gulpfile.js

@alamowo
Copy link
Author

alamowo commented May 29, 2018

Hi,
that actually sounds like a solution to us. We were investigating the problem right now and assume that its related to this file: /pattern-lab/core/src/PatternLab/Console/Commands/ServerCommand.php.

On line 66 the watch command is build and it gets the hard coded option --no-procs which disables all plugins for that process. But i guess this happens in multiple locations. Cause it's not only related to the --server --with-watch command, but also to the --watch itself.

For now I'm gonna reconfigure webpack ;)

Thank you very much!

@aleksip
Copy link
Owner

aleksip commented May 29, 2018

Thanks, good to know! I had a suspicion the problem might be related to PL itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants