SteveSanderson / generator-ko

63 stars 39 forks source link

create gulp task serve the ./dist folder #7

Open luisrudge opened 9 years ago

luisrudge commented 9 years ago

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

aminroosta commented 9 years ago

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 .

luisrudge commented 9 years ago

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

aminroosta commented 9 years ago

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).

luisrudge commented 9 years ago

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

PetaPetaPeta commented 9 years ago

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