How can the boilerplate for SailsJS model generation be changed
-
21-12-2019 - |
Question
I've tried changing the models.ejs file located in: node_modules/sails/bin/boilerplates/templates
Seems to ignore any change I make in there.
Solution
If you're doing sails generate model
, it's using the code in the globally installed Sails, so you'd have to change the template there. On OS X Sails installs globally to /usr/local/lib/node_modules/sails, but it may vary by system.
This is one of the reasons that Sails v0.10 moved to using separate generators rather than baked-in templates!
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow