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

Added warning when pages dir is not present #14

Merged
merged 3 commits into from
Oct 17, 2016
Merged

Conversation

impronunciable
Copy link
Contributor

Added warning when pages dir is not present and a special one if it exists as a sibling of the project root.

Please review the copy :)

if (await exists(join(dir, '..', 'pages'))) {
console.warn('> Pssst, there is a pages directory next to your project root. Next expects this to be under your project root directory.')
} else {
console.warn('> Couldn\'t find a pages directory. Please create one under the project root')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

`pages`

// Check if pages dir exists and warn if not
if (!await exists(join(dir, 'pages'))) {
if (await exists(join(dir, '..', 'pages'))) {
console.warn('> Pssst, there is a pages directory next to your project root. Next expects this to be under your project root directory.')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say:

> No `pages` directory found. Did you mean to run `next` in the parent (`../`) directory? 

@rauchg rauchg merged commit d9b1828 into master Oct 17, 2016
@rauchg rauchg deleted the add/pages-warn branch October 17, 2016 01:04
@lock lock bot locked as resolved and limited conversation to collaborators Jan 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants