tarlepp / angular-sailsjs-boilerplate

'Boilerplate' for AngularJS + Sails.js
MIT License
307 stars 87 forks source link

Serving production without gulp #106

Open beaverusiv opened 8 years ago

beaverusiv commented 8 years ago

I am trying to set up my site to be served with nginx. Currently if I run gulp dist it works fine and I get a folder with a bunch of minified js and css, but there is no index.html or anything. Do I have to manually copy src/app/index.html and manually copy in the css/js file srcs?

My ngnix config so far:

server {
        listen 80;
        server_name portal.whatever.biz;
        root /var/sites/portal.whatever.biz/frontend/dist;
}
beaverusiv commented 8 years ago

Ok, so gulp dist was failing on importing Google Font and halting the script. I have fixed it by adding the option { processImportFrom: ['!fonts.googleapis.com'] } to g.minifyCss.

In order to do this I have split dist() into distCSS() and distJS(). If there is a more elegant way of changing line 353 in the gulpfile let me know and I'll do it that way. I'll submit a PR when I get a reply.