![]() Getting your server up and running at its most basic is very very simple and is just a case of calling a single method inside a gulp task. Just plonk the following somewhere near the top of the file. For example, if you wanted to compile SASS first, just add mix.sass('app.scss') before you call mix.livereload() and voila. It pairs nicely with elixir if you wanted to do any other frontend tasks. Including it in your gulpfile.js is the standard affair. LiveReload will watch for changes in your php, html (views), css, and js and automagically refresh your browser for you. You can grab the gulp-connect package and save it to your project's dev dependencies with the following: npm install gulp-connect -save-dev This means when we make a change to our files the changes will be reflected on every device we have the site open on. LiveReload.js What is LiveReload LiveReload is a tool for web developers and designers. It'll give us a nice little webserver complete with LiveReload. ![]() To serve our app we're going to be using a package called gulp-connect. I'll also assume you've already enabled html5Mode in AngularJS as that's just a single line in your module's config method. I'm going to assume you already have gulp installed, but if you don't take a look at their getting started guide. We can use it (along with another package) to serve our AngularJS app and get around the issues of testing locally. This will allow you to convert a legacy application so it uses Docker, Docker volumes, and docker-compose. ![]() However, this can present some issues when trying to test the site locally.Īnd, unless you've been living under a rock for the past year you've no doubt heard of gulp - that new task runner that the cool kids ditched Grunt for. How to Enable Live-reload on Docker-based Applications with Docker Volumes Erick Wendel In this post you'll learn how to configure a development environment with live-reload enabled. ![]() To make your AngularJS app feel a little nicer you've probably enabled html5Mode to remove the annoying hashbang from your URIs. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |