-
Notifications
You must be signed in to change notification settings - Fork 88
pass constants FUNCTIONS_SRC and PUBLISH_DIR to nextOnNetlify #49
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
Conversation
5a23158
to
981d538
Compare
there's a "blocking" issue with this currently:
possible solutions:
|
package.json
Outdated
@@ -28,7 +28,7 @@ | |||
"cpx": "^1.5.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can move cpx
to devDependencies
expect(await pathExists(PUBLISH_DIR)).toBeTruthy() | ||
const nextOnNetlifyOptions = nextOnNetlify.mock.calls[0][0] | ||
expect(nextOnNetlifyOptions.functionsDir).toEqual(FUNCTIONS_SRC) | ||
expect(nextOnNetlifyOptions.publishDir).toEqual(PUBLISH_DIR) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good 👍
Should we call the "real" next-on-netlify
instead of mocking it? This would give a stronger confidence that the files are actually being copied to those directories. Generally speaking, this would be a stronger indicator that the plugin works as intended. What do you think? (Note: this would probably be better done in a separate PR)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, definitely. when i tried to call the "real" nextOnNetlify at first, i got errors due to the emptyDirSync stuff in the prev NoN version. now we can address this in a separate PR. here's an issue #53 :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for opening an issue for it! ❤️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your solution 2.
sounds good 👍 (as fixed in netlify/next-on-netlify#94)
I think this applies to the Functions directory too. If the user already has some Functions in their site, we don't want to remove them :)
981d538
to
c71248d
Compare
* Update actions * Run tests if labeled * Add NEXT_TEST_JOB * ignore scripts for faster install * Show test results in summary and fail action if errors
Fixes #43
wasn't quite sure how to replace the tests now that the manual copying is no longer a part of the plugin. making a note to add a specific test for this in next-on-netlify.