Skip to content

Eleventy Dev Server - CLI and watch option #45

Description

@jeromecoupe

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestneeds-votesA feature request on the backlog that needs upvotes or downvotes. Remove this label when resolved.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions