![]() ![]() v0.1.0 Work in progress, not yet officially released.v0.1.1rc5 Updating to work with grunt v0.4.0rc5.Changing in-development grunt/gruntplugin dependency versions from tilde version ranges to specific versions. v0.1.1rc6 Updating grunt/gruntplugin dependencies to rc6.v0.1.1 First official release for Grunt 0.4.0.v0.1.2 Ensure Gruntfile.js is included on npm.v0.3.0 Add ability to listen on system-assigned port.livereload option added to inject a livereload snippet into the page. debug option added to display debug logging like the -debug flag. Event emitted when server starts listening. v0.4.0 Fix logging of which server address.Added directory option to override browse-able directory. v0.4.1 Browse-able directory is the last item supplied to bases.v0.4.2 Un-normalize options.base as it should be a string or an array as the user has set.Make directory browseable when base is a string. v0.6.0 Open options.hostname if provided.Modified options.middleware to accept an array or a function. v0.7.1 Fixes issue with the '*' hostname option.v0.8.0 Update connect and connect-livereload.Add support for connect.static instance options. Switch to opn as it fixes some Linux issues. v1.0.0 Use predefined logger format with colored http status.v1.0.1 Fixed dependencies behind corporate proxy server.v1.0.2 Fixed http2 dependencies and stopped using the fork.Update all dependencies and switch to node-http2. Allow all configuration options of livereload to be passed through. To check our code, we add a linting check or perform various custom tests, everytime we build/serve our application. For example, to uglifiy & minify code files. options are passed on to the serve-static module. Grunt is a JavaScript Task Runner, which can be used to automate tasks, that we have to perform frequently while building an application. The last base given will be the to become browse-able. Defaults to the project Gruntfile's directory.Īrray of String (or Object) bases to serve multiple directories. The base (or root) directory from which files will be served. If open is set to true, the hostname setting will be used to generate the URL that is opened by the browser, defaulting to localhost if a wildcard hostname was specified. Setting it to '*', like ' 0.0.0.0', will make the server accessible from any local IPv4 address like '127.0.0.1' and the IP assigned to an ethernet or wireless interface (like '192.168.0.x' or '10.0.0.x'). The hostname on which the webserver can be accessed. ![]() You can use the special values 0 or '?' to use a system-assigned port. ![]() The task will fail if the specified port is already in use (unless useAvailablePort is set). The port on which the webserver will respond. This task was designed to be used in conjunction with another task that is run immediately afterwards, like the grunt-contrib-qunit plugin qunit task. This behavior can be changed with the keepalive option, and can be enabled ad-hoc by running the task like grunt connect:keepalive. Once grunt's tasks have completed, the web server stops. Note that this server only runs as long as grunt is running. Run this task with the grunt connect command. loadNpmTasks ( 'grunt-contrib-connect' ) Connect task Ignore gives you the possibility to ignore certain files or url's from being handled by connect-livereload. If you need liveReload on static html files, then place it before the static routes. In your connect or express application add this after the static and before the dynamic routes. grunt-contrib-connect or grunt-contrib-watch.Ĭonnect-livereload itself does not serve the livereload.js script. This middleware can be used with a LiveReload module e.g. Note: if you use this middleware, you should make sure to switch off the Browser LiveReload Extension if you have it installed. Install npm install connect-livereload -save-dev If you are happy with a browser plugin, then you don't need this middleware. Connect middleware for adding the livereload script to the response. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |