简体   繁体   English

使用Sails.js构建,我的客户端文件在哪里?

[英]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" “ sails生成了一个随时可部署的www目录,可用于需要API驱动的独立代码的所有各种地方”

When I look at www folder I dont see the HTML files. 当我查看www文件夹时,看不到HTML文件。

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. 如果您阅读位于“ tasks / register / buildProd.js”下的grunt任务builProd ,则可以意识到该任务实际上是在创建“ www ”文件夹的是“ copy:build”,该文件夹仅复制“ .tmp /公共”文件夹。

I assume sails uses the .ejs files located under ./views 我假设Sails使用位于./views下的.ejs文件

The served "website" is deployed to .tmp/public folder in sailsjs 0.10. 服务的“网站”部署到sailsjs 0.10中的.tmp / public文件夹。 The folder is automatically created out of the /assets "source" folder. 该文件夹是在/ assets“源”文件夹中自动创建的。 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. 也就是说,您将js / CSS / imgs / HTML模板文件放在/ assets文件夹中,它将被复制到/.tmp/public并从那里提供。 Additionally, it will compile less files, inject js and CSS files in the view layout. 此外,它将编译较少的文件,在视图布局中注入js和CSS文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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