Skip to content
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

Feat: customize reportDir #136

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open

Feat: customize reportDir #136

wants to merge 16 commits into from

Conversation

HOUCe
Copy link

@HOUCe HOUCe commented Nov 8, 2019

Hey guy, thanks for the great work of mochawesome-report-generator.

I noticed that in getFilename function, it returns with path.resolve(process.cwd(), reportDir, filename). I've made this PR to add a rootDir option which equals process.cwd() by default.

Thanks again and wait for your reply.

@adamgruber
Copy link
Owner

Not sure if this is really needed. You can specify a path relative to process.cwd() in the reportDir option. For example:

If your current directory is /myproject and you pass ../myreportdir as the reportDir option, your reports will be saved in a new directory at the same level as your project like below:

.
├── myproject
└── myreportdir
    ├── assets
    ├── mochawesome.json
    └── mochawesome.html

@HOUCe
Copy link
Author

HOUCe commented Nov 11, 2019

Yes, to specify a path relative can resolve the problem, but it will be not super neat in my case, like:

('../../../A/B/C', reportDir)

I've made the same PR for mochawesome-merge

Issue 31

Anyway, it is not a block, (if it is) just a little improvement by my side. You can close this if it is necessary from most use case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants