Skip to content

Commit

Permalink
Fixes #2682
Browse files Browse the repository at this point in the history
  • Loading branch information
zachleat committed Dec 7, 2022
1 parent d0ab038 commit 7e477f2
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 40 deletions.
2 changes: 0 additions & 2 deletions cmd.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ try {
"dryrun",
"help",
"serve",
"passthroughall",
"incremental",
],
default: {
Expand Down Expand Up @@ -85,7 +84,6 @@ try {

elev.setDryRun(argv.dryrun);
elev.setIncrementalBuild(argv.incremental);
elev.setPassthroughAll(argv.passthroughall);
elev.setFormats(argv.formats);

if (argv.watch) {
Expand Down
11 changes: 0 additions & 11 deletions src/Eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,16 +228,6 @@ class Eleventy {
this.watchManager.incremental = !!isIncremental;
}

/**
* Updates the passthrough mode of Eleventy.
*
* @method
* @param {Boolean} isPassthroughAll - Shall Eleventy passthrough everything?
*/
setPassthroughAll(isPassthroughAll) {
this.isPassthroughAll = !!isPassthroughAll;
}

/**
* Updates the path prefix used in the config.
*
Expand Down Expand Up @@ -360,7 +350,6 @@ class Eleventy {
formats,
this.eleventyConfig
);
this.eleventyFiles.setPassthroughAll(this.isPassthroughAll);
this.eleventyFiles.setInput(this.inputDir, this.input);
this.eleventyFiles.setRunMode(this.runMode);
this.eleventyFiles.extensionMap = this.extensionMap;
Expand Down
14 changes: 1 addition & 13 deletions src/EleventyFiles.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ class EleventyFiles {

this.initConfig();

this.passthroughAll = false;

this.formats = formats;
this.eleventyIgnoreContent = false;

Expand Down Expand Up @@ -151,10 +149,6 @@ class EleventyFiles {
this.runMode = runMode;
}

setPassthroughAll(passthroughAll) {
this.passthroughAll = !!passthroughAll;
}

initPassthroughManager() {
let mgr = new TemplatePassthroughManager(this.eleventyConfig);
mgr.setInputDir(this.inputDir);
Expand Down Expand Up @@ -200,13 +194,7 @@ class EleventyFiles {
this.config.events.emit("eleventy.ignores", this.uniqueIgnores);
}

if (this.passthroughAll) {
this.normalizedTemplateGlobs = TemplateGlob.map([
TemplateGlob.normalizePath(this.input, "/**"),
]);
} else {
this.normalizedTemplateGlobs = this.templateGlobs;
}
this.normalizedTemplateGlobs = this.templateGlobs;
}

getIgnoreGlobs() {
Expand Down
14 changes: 0 additions & 14 deletions test/EleventyFilesTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -463,20 +463,6 @@ test("Glob Watcher Files with Config Passthroughs (no template formats)", async
]);
});

test("Glob Watcher Files with passthroughAll", async (t) => {
let eleventyConfig = new TemplateConfig();
let evf = new EleventyFiles(
"test/stubs",
"test/stubs/_site",
[],
eleventyConfig
);
evf.setPassthroughAll(true);
evf.init();

t.is((await evf.getFileGlobs())[0], "./test/stubs/**");
});

test("Test that negations are ignored (for now) PR#709, will change when #693 is implemented", async (t) => {
t.deepEqual(
EleventyFiles.normalizeIgnoreContent(
Expand Down

0 comments on commit 7e477f2

Please sign in to comment.