Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

sails.js v0.10 create new project --linker not working Gruntfile.js not used

With the default version of sails on npm (v.9?) --linker works ok i.e. creates /linker folder. I can copy js, css files to assets/linker/ and they appear in layout.ejs automatically.

I now have sails v0.10 installed both locally and globally. Using Node V0.10.25. I created a new sails project using:

sails new project_name --linker

but no /linker folder is created. I had to create /.tmp as it did not exist I had to create /.tmp/public/linker/ to put /js & /styles and add them manually into layout.ejs

I renamed Gruntfile.js and my program still works thus Gruntfile does nothing in the program.

like image 899
Mick Cullen Avatar asked Nov 30 '25 20:11

Mick Cullen


1 Answers

Sails v0.10 no longer uses the linker folder--it was just causing confusion. If you have the linker option enabled, then any assets under your assets folder will be copied over to your .tmp/public folder by Grunt when Sails is lifted. The public folder will be created by Grunt as necessary. The grunt-sync task will then keep the folders synced as long as the program is running.

Sails projects are not dependent on Grunt, so renaming the Gruntfile (or removing it completely) won't stop the program from working, but that doesn't mean it's not doing anything when it's there! To see what Grunt is up to, you can lift Sails with sails lift --verbose.

like image 94
sgress454 Avatar answered Dec 03 '25 13:12

sgress454



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!