Exclude node_modules by default
If no 'exclude' directive is specified, exclude node_modules by default. https://twitter.com/mxstbr/status/761856359579185153
This commit is contained in:
parent
562ffe7a3f
commit
b8f17b9034
|
@ -17,7 +17,7 @@ module Jekyll
|
||||||
# Handling Reading
|
# Handling Reading
|
||||||
"safe" => false,
|
"safe" => false,
|
||||||
"include" => [".htaccess"],
|
"include" => [".htaccess"],
|
||||||
"exclude" => ["vendor"],
|
"exclude" => %w(node_modules vendor),
|
||||||
"keep_files" => [".git", ".svn"],
|
"keep_files" => [".git", ".svn"],
|
||||||
"encoding" => "utf-8",
|
"encoding" => "utf-8",
|
||||||
"markdown_ext" => "markdown,mkdown,mkdn,mkd,md",
|
"markdown_ext" => "markdown,mkdown,mkdn,mkd,md",
|
||||||
|
|
|
@ -594,7 +594,7 @@ collections:
|
||||||
# Handling Reading
|
# Handling Reading
|
||||||
safe: false
|
safe: false
|
||||||
include: [".htaccess"]
|
include: [".htaccess"]
|
||||||
exclude: ["vendor"]
|
exclude: ["node_modules", "vendor"]
|
||||||
keep_files: [".git", ".svn"]
|
keep_files: [".git", ".svn"]
|
||||||
encoding: "utf-8"
|
encoding: "utf-8"
|
||||||
markdown_ext: "markdown,mkdown,mkdn,mkd,md"
|
markdown_ext: "markdown,mkdown,mkdn,mkd,md"
|
||||||
|
|
|
@ -48,6 +48,12 @@ class TestConfiguration < JekyllUnitTest
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context "the defaults" do
|
||||||
|
should "exclude node_modules" do
|
||||||
|
assert_includes Configuration.from({})["exclude"], "node_modules"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
context "#add_default_collections" do
|
context "#add_default_collections" do
|
||||||
should "no-op if collections is nil" do
|
should "no-op if collections is nil" do
|
||||||
result = Configuration[{ "collections" => nil }].add_default_collections
|
result = Configuration[{ "collections" => nil }].add_default_collections
|
||||||
|
|
Loading…
Reference in New Issue