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

Eleventy Dev Server - CLI and watch option #45

Open
jeromecoupe opened this issue Jan 20, 2023 · 0 comments
Open

Eleventy Dev Server - CLI and watch option #45

jeromecoupe opened this issue Jan 20, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@jeromecoupe
Copy link

jeromecoupe commented Jan 20, 2023

This is a clarification rather than an issue I guess

Testing Eleventy 2.0.0@beta and Eleventy Dev Server 1.0.0, particularly the watch option in conjunction with external NPM scripts for CSS and JS processing. Can I use the --watch flag with the CLI or is the --dir flag the intended method for now ?

Everything works smoothly by doing npx @11ty/eleventy --serve with a JS configuration and setServerOptions

eleventyConfig.setServerOptions({
  watch: ["./dist/assets/css/**/*.css", "./dist/assets/js/**/*.js"],
  port: 3000,
});

Things are working as well with the CLI using a global --dir=\"./dist/\" flag

In some contexts, it would be great to be able to use the --watch flag with an array of globs (to watch files that are not necessarily in a single folder). Is that possible now / could be implemented down the line ? Looked at the Eleventy Dev Server man page but didn't see a way to do it.

@zachleat zachleat added the enhancement New feature or request label Jan 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants