Skip to content
This repository has been archived by the owner on Jun 8, 2021. It is now read-only.

feat(serve): add ignore options #115

Merged
merged 4 commits into from
Sep 5, 2018
Merged

Conversation

RomainLanz
Copy link
Member

Hey 馃憢

This PR add two things.

  1. Per default we don't watch the folder resources, this folder should only contain frontend stuff or compiled assets. There's no need to reboot the whole server when they change.

  2. It's adding the --ignore flag to the serve command. It let us set custom path to be ignored by nodemon.

How to use it?

> adonis serve --ignore="nuxt,myCustom,next"

This command will ignore the default ignored folder + nuxt, myCustom and next.

@coveralls
Copy link

coveralls commented Aug 18, 2018

Coverage Status

Coverage decreased (-0.08%) to 48.258% when pulling 9d5bf77 on RomainForks:develop into f29eb7f on adonisjs:develop.

Copy link
Member

@thetutlage thetutlage left a comment

Choose a reason for hiding this comment

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

Also, should be concat to existing ignore, or simply disregard them?

@@ -164,6 +165,19 @@ class Serve extends Command {
}

const nodemon = require('nodemon')
const foldersToIgnore = [
Copy link
Member

Choose a reason for hiding this comment

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

I believe, we can make it little bit more organized. Also their is no need to add * to user defined ignore values, since it removes the flexibility of defining custom blobs.

The following feels more approachable to me

['/tmp/*', '/resources/*', '/public/*'].concat(ignore || []).map((folder) => `${process.cwd()}/${folder}`)

Copy link
Member

@thetutlage thetutlage left a comment

Choose a reason for hiding this comment

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

Also, should be concat to existing ignore, or simply disregard them?

Copy link
Member

@thetutlage thetutlage left a comment

Choose a reason for hiding this comment

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

Also, should be concat to existing ignore, or simply disregard them?

@RomainLanz
Copy link
Member Author

I believe we should keep the default ignored folders and simply concat the value.

The requested change has been done. 馃憤

@vincentducorps
Copy link

up?

@thetutlage thetutlage merged commit 876d13e into adonisjs:develop Sep 5, 2018
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.

None yet

4 participants