简体   繁体   中英

Using Sails.js build, where are my client side files?

From website:

"sails build spits out a ready-to-deploy www directory for use in all of the sorts of places where you need indepenedent, API-driven front-end code"

When I look at www folder I dont see the HTML files.

If you read the grunt task builProd located under "tasks/register/buildProd.js" , you can realize that the task is actually creating the " www " folder is "copy:build", which only copy everything inside the ".tmp/public" folder.

I assume sails uses the .ejs files located under ./views

The served "website" is deployed to .tmp/public folder in sailsjs 0.10. The folder is automatically created out of the /assets "source" folder. That is, you put your js/CSS/imgs/HTML template files in the /assets folder and it will be copied to /.tmp/public and served from there. Additionally, it will compile less files, inject js and CSS files in the view layout.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM