@11ty/eleventy-dev-server
Advanced tools
Comparing version 1.0.0-canary.2 to 1.0.0-canary.3
{ | ||
"name": "@11ty/eleventy-dev-server", | ||
"version": "1.0.0-canary.2", | ||
"version": "1.0.0-canary.3", | ||
"description": "A minimal, modern, generic, hot-reloading local web server to help web developers.", | ||
@@ -5,0 +5,0 @@ "main": "server.js", |
@@ -7,3 +7,3 @@ <p align="center"><img src="https://www.11ty.dev/img/logo-github.png" alt="eleventy Logo"></p> | ||
## ➡ [Documentation](https://www.11ty.dev/docs/) | ||
## ➡ [Documentation](https://www.11ty.dev/docs/watch-serve/#eleventy-dev-server) | ||
@@ -20,7 +20,8 @@ - Please star [Eleventy on GitHub](https://github.com/11ty/eleventy/)! | ||
This is bundled with @11ty/eleventy starting with Eleventy v2.0.0. | ||
You do not need to install this separately—it is bundled with `@11ty/eleventy` starting with Eleventy v2.0.0. | ||
That said, you can use it standalone! A CLI is also rumored, if you pester the author about it enough. | ||
That said, you can use it standalone! A [CLI is also rumored](https://github.com/11ty/eleventy-dev-server/issues/2), if you pester the author about it enough. | ||
``` | ||
# Unnecessary if you’re using this with Eleventy | ||
npm install @11ty/eleventy-dev-server | ||
@@ -27,0 +28,0 @@ ``` |
@@ -0,1 +1,2 @@ | ||
const pkg = require("./package.json"); | ||
const path = require("path"); | ||
@@ -22,2 +23,4 @@ const fs = require("fs"); | ||
https: {}, // `key` and `cert`, required for http/2 and https | ||
domdiff: true, // Use morphdom to apply DOM diffing delta updates to HTML | ||
showVersion: false, // Whether or not to show the server version on the command line. | ||
@@ -36,3 +39,3 @@ pathPrefix: "/", // May be overridden by Eleventy, adds a virtual base directory to your project | ||
let [name] = args; | ||
// TODO what if previously cached server has new/different dir or options | ||
@@ -71,2 +74,4 @@ if (!serverCache[name]) { | ||
computedPath = decodeURIComponent(computedPath); | ||
// Check that the file is in the output path (error if folks try use `..` in the filepath) | ||
@@ -391,3 +396,3 @@ let absComputedPath = TemplatePath.absolutePath(computedPath); | ||
this.logger.info(`Server at ${hostsStr}${this._serverProtocol}//localhost:${port}${this.options.pathPrefix} `); | ||
this.logger.info(`Server at ${hostsStr}${this._serverProtocol}//localhost:${port}${this.options.pathPrefix}${this.options.showVersion ? ` (v${pkg.version})` : ""}`); | ||
}); | ||
@@ -481,2 +486,6 @@ | ||
.filter(entry => { | ||
if(!this.options.domdiff) { | ||
// Don’t include any files if the dom diffing option is disabled | ||
return false; | ||
} | ||
// Filter to only include watched templates that were updated | ||
@@ -483,0 +492,0 @@ return (files || []).includes(entry.inputPath); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25912
662
35