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

Template previews #5

Open
thomaswilburn opened this issue Jan 9, 2019 · 1 comment
Open

Template previews #5

thomaswilburn opened this issue Jan 9, 2019 · 1 comment

Comments

@thomaswilburn
Copy link
Contributor

The classic rig allows users to preview templates. The new rig, so far, does not, but it would be a nice thing to have. Unfortunately, there are some technical impediments to this, as a result of our new build processes:

  • Builds for HTML, JS, and CSS all assume that they're all in one local folder, but the uninstantiated templates are split across _base and their own folder, so we'll need a good way to tell all build processes to look in multiple locations.
  • The Google connection will need to know to load the templateSheet property instead of sheet from the manifest.
  • We need to be able to disable various UI characteristics on preview pages or (more likely) only show the embed page without the preview chrome.
@thomaswilburn
Copy link
Contributor Author

Some research on building against template and _base folders:

  • HTML: We control the logic for the HTML processing, there's no reason to think that we can't provide a list of folders used to resolve files (the code needs additional error handling anyway).
  • Less: The plugin has decent support for multiple include paths, and you can write resolution plugins (we do this in the interactive template to load styles from NPM).
  • JS: This is the most difficult of the three, since Browserify doesn't seem to support multiple baseDir locations. This might have to wait until we switch to something like RollUp, which probably has more flexibility in its resolution mechanism.

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

1 participant