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. If you have two local servers running on the same port it won't work. ![]() Switch to opn as it fixes some Linux issues. A couple requirements: Make sure you're not already starting up localhost 8000 somewhere else. 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. options are passed on to the serve-static module. Example from Gruntfile. The last base given will be the to become browse-able. I installed also Yeoman and it's using out of the box grunt-contrib-livereload package, but from what I understood it's using Node.js Connect server for serving client-side files, thus being separated from my Node.js application. 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 I installed also Yeoman and it's using out of the box grunt-contrib-livereload package, but from what I understood it's using Node.js Connect server for serving client-side files, thus being separated from my Node.js application.Įxample from Gruntfile.js generated by Yeoman: var lrSnippet = require('grunt-contrib-livereload/lib/utils').Grunt. ![]() Raw Gruntfile. How can I do this? (Preferably without running Node.js app in another port and client in another port, because of pathing and cross-domain issues) Example Gruntfile for grunt-contrib-watch with livereload. I have written an application in Node.js (with Express & socket.io) and I would like to use Grunt to compile my client-side stuff with livereload while developing and being connected to Node.js application.
0 Comments
Leave a Reply. |