Exclude node_modules by default #5210

Merged
merged 1 commit into from Sep 28, 2016

Projects

None yet

6 participants

@parkr
Member
parkr commented Aug 7, 2016

If no 'exclude' directive is specified, exclude node_modules by default.

https://twitter.com/mxstbr/status/761856359579185153

/cc @jekyll/build

@mxstbr
Contributor
mxstbr commented Aug 7, 2016

No way, this is awesome! 🙌 Glad to have inspired a positive change in Jekyll!

@envygeeks
Member

If this is gonna happen, can we please also do the same with vendor since it's also a sore spot?

@parkr
Member
parkr commented Aug 11, 2016

If this is gonna happen, can we please also do the same with vendor since it's also a sore spot?

@envygeeks That's a great idea!

I don't see why we should have defaults like this, people will only ask to make the list bigger. This doesn't affect people in normal usage of Jekyll so there's no need to have it as default, in my opinion.

@spudowiar So many people are using Gulp and Grunt to run Jekyll and confused when it takes like 30s to generate their site. Ultimately, it's a sad result of using NPM that you end up with 15,000 files in a node_modules directory. At least this way we don't unnecessarily slow builds – you basically never want this directory in your resulting site. 😄

@parkr parkr added this to the 3.3 milestone Aug 11, 2016
@ghost
ghost commented Aug 11, 2016

OK, I see your point. Well vendor and node_modules do seem like sane defaults, just make sure you document it! :)

@Strangehill
Contributor
Strangehill commented Aug 26, 2016 edited

Why not add vendor, gemfile, and gemfile.lock into _config.yml?

If no 'exclude' directive is specified, exclude node_modules by default.

will specifying an 'exclude' require node_modules be listed again? Maybe include this too in the exclude list in _config.yml

@Crunch09 Crunch09 referenced this pull request Sep 16, 2016
Merged

Exclude vendor by default #5361

1 of 1 task complete
@parkr parkr Exclude node_modules by default
If no 'exclude' directive is specified, exclude node_modules by default.

https://twitter.com/mxstbr/status/761856359579185153
b8f17b9
@parkr
Member
parkr commented Sep 16, 2016

This is ready for another round of LGTM's.

@envygeeks

LGTM. It'll solve a lot of user pains.

@parkr
Member
parkr commented Sep 28, 2016

@jekyllbot: merge +minor

@jekyllbot jekyllbot merged commit 9c197d9 into master Sep 28, 2016

1 of 3 checks passed

continuous-integration/appveyor/pr AppVeyor build failed
Details
jekyll/lgtm Awaiting approval from at least 2 maintainers.
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@jekyllbot jekyllbot deleted the node-must-die branch Sep 28, 2016
@arechsteiner
arechsteiner commented Oct 19, 2016 edited

@parkr: How to include node_modules now that this change has been released?

I've tried this in my _config.yml:

include: ["node_modules"]

However, the folder node_modules is still excluded.

I'm not very well-versed in Ruby but I think your commit actually forces node_modules to be excluded, instead of making it the default behavior that can be overridden by the user.

@mxstbr
Contributor
mxstbr commented Oct 19, 2016 edited

I think just setting exclude to nothing should work:

exclude: []
@arechsteiner

Thanks @mxstbr, this works. It's not very intuitive IMHO. Maybe this could be improved some time to honor the include directive and be in line with the documentation:

Include

Force inclusion of directories and/or files in the conversion. .htaccess is a good example since dotfiles are excluded by default.

That's definitely not what happens with this example.

@xueyouchao xueyouchao added a commit to xueyouchao/xueyouchao.github.io-hexo that referenced this pull request Nov 15, 2016
@xueyouchao xueyouchao add exclude[] due to jekyll/jekyll#5210 40555e5
@xueyouchao xueyouchao referenced this pull request in knksmith57/hexo-renderer-sass Dec 18, 2016
Closed

display wrong in github pages #16

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