generator-ko icon indicating copy to clipboard operation
generator-ko copied to clipboard

create gulp task serve the ./dist folder

Open luisrudge opened this issue 10 years ago • 5 comments

There's no way to run the generator and start developing, because there's no task to serve files, and watch for changes etc

luisrudge avatar Jan 17 '15 16:01 luisrudge

I think there is no need for that ! You can serve files from src folder while developing. ( requirejs dynamically loads other js files). When you are ready to deploy you app , run gulp and use the content of dist folder .

aminroosta avatar Jan 17 '15 17:01 aminroosta

I'm on windows and there's no easy way to serve a folder with static content. Plus, the way you described doesn't watch for file changes

luisrudge avatar Jan 17 '15 18:01 luisrudge

i'm on windows too. here is what i usually do, first of all i install a command line http server : npm install -g static-server then i go to the root of project cd path/to/project/folder and then static-server src/. there is no need to watch for file changes , simply refresh your browser and make sure that it does not cache the files (disable browser cache).

aminroosta avatar Jan 17 '15 20:01 aminroosta

Ah, nice. I didn't know about static-server. Thanks! Still, livereload is awesome and pretty much a standard for gulp/grunt tasks

luisrudge avatar Jan 18 '15 22:01 luisrudge

If you have python installed you can also just do python -m SimpleHTTPServer from the directory.

PetaPetaPeta avatar Jan 19 '15 08:01 PetaPetaPeta