Docusaurus: About gitignore

Created on 24 Jan 2018  路  4Comments  路  Source: facebook/docusaurus

Hi, I have a question about .gitignore.
When I init my project, .gitignore in website/,but in this file, ignore list is website/yarn.lock,I think this should be yarn.lock. website/yarn.lock match file like this website/website/yarn.lock.

bug needs more information

All 4 comments

@balancelove Hi. I think there is a bug in the creation of the .gitignore when you run docusaurus-init. Is that what you ran to get that bad .gitignore file?

Hi, I have experienced the same problem.
I used [email protected] and got the following result:

$ docusaurus-init && cat website/.gitignore
Website folder created!

Installing latest version of Docusaurus in website.

yarn add v1.5.1
...
node_modules
.DS_Store
lib/core/metadata.js
lib/core/MetadataBlog.js
website/translated_docs
website/build/
website/yarn.lock
website/node_modules

website/i18n/*
!website/i18n/en.json

I think examples/basics/gitignore should be copied in a project root directory.

https://github.com/facebook/Docusaurus/blob/bee98053c87c05b2365562e46066833bd3d59879/lib/copy-examples.js#L166

This CWD specifies website, so .gitignore is copied in website.

Just confirmed this bug. Refer to the following screenshot

screen shot 2018-04-07 at 11 54 03 am

@yangshun, @yykamei - see #533 for a fix (I hope 馃槃)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

wgao19 picture wgao19  路  31Comments

t3573393 picture t3573393  路  25Comments

yangshun picture yangshun  路  70Comments

yangshun picture yangshun  路  51Comments

yanzhiwei147 picture yanzhiwei147  路  69Comments