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

Sails Grunt file should not modify source view #9

Open
animedbz16 opened this issue Jun 6, 2016 · 1 comment
Open

Sails Grunt file should not modify source view #9

animedbz16 opened this issue Jun 6, 2016 · 1 comment

Comments

@animedbz16
Copy link

animedbz16 commented Jun 6, 2016

By default sails is configured to modify the source layout.ejs template, which is not only extremely annoying, but ends up that the file is committed over and over again just because of some dependancys that the sails grunt will automatically inject on sails lift.

The source file should not be modified for the following reasons:

  • Source files should not be modified except by user.
    • Makes git history on this file very confusing since it becomes riddled with commits to add/remove dependancies injected by grunt, which aren't necessary since these are modified on sails lift.
  • Switching branches in git extremely annoying since this file is always changed and part of the git repo so it needs to be stashed or reverted before switching branches.
  • I've seen cases where there have been merge conflicts on lines of dependancy injection from grunt.

These can all be resolved by implementing this dependancy injection in a way where the source is copied to .tmp and then grunt can inject/modifiy the layout.ejs file from there with dependancies.

Would likely need to review the sails www or the build tasks to ensure that these will also operate the same way.

See the following issue for more details:
balderdashy/sails#2007

@matthewwiesen
Copy link

Including @mikermcneil since this repository doesnt seem to be monitored and fortunately is one of the only ones that @sailsbot doesnt auto close.

Maybe this will be a non-issue with the coming of Sails 1.0, but I would hope that moving forward source files that are commited into the git repository are not modified by a task runner.

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

No branches or pull requests

2 participants