New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code in docs directory can be deleted by yarn #969

Closed
edoloughlin opened this Issue Nov 9, 2017 · 5 comments

Comments

Projects
None yet
3 participants
@edoloughlin

edoloughlin commented Nov 9, 2017

See yarnpkg/yarn#4882

If you do a yarn autoclean --init in your project it creates a .yarnclean file with a 'docs' entry. It seems mathjs depends on code in a docs directory so it doesn't work if you install using yarn with the default .yarnclean file.

@josdejong

This comment has been minimized.

Owner

josdejong commented Nov 12, 2017

I responeded in yarnpkg/yarn#4882

See also: #809

@josdejong

This comment has been minimized.

Owner

josdejong commented Nov 12, 2017

How does mathjs depend on the code in the docs folder? Can you clarify? As far as I can see mathjs works fine when the docs folder is deleted

@joris-calvat

This comment has been minimized.

joris-calvat commented Dec 11, 2017

I have the same issue
Yarn clean the folders probably cause it cannot find it. In fact when you look at this exemple. It uses relative paths for the directories attribute
https://registry.npmjs.org/npm/latest
I suggest to replace

"directories": {
"doc": "docs",
"example": "examples",
"lib": "lib",
"test": "test"
}
by
"directories": {
"doc": "./docs",
"example": "./examples",
"lib": "./lib",
"test": "./test"
}

@josdejong

This comment has been minimized.

Owner

josdejong commented Dec 16, 2017

I'm not sure if that works but I've changed the paths to relative paths which is a good idea in general.

In order to be pragmatic, I've renamed the internal folder docs to embeddedDocs so mathjs should not give issues with yarn autoclean. (next version is not not yet released)

@josdejong josdejong closed this in 316cb87 Dec 16, 2017

@josdejong

This comment has been minimized.

Owner

josdejong commented Dec 16, 2017

This should be fixed now in v3.18.0, @edoloughlin or @joris-calvat can you double check whether there are still issues with yarn autoclean?

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