UNPKG

1.58 kBMarkdownView Raw
1# grunt-open
2
3Open urls and files from a grunt task
4
5## Usage
6
7This is immediately useful as part of your task chain between `server` and `watch`
8
9```js
10grunt.registerTask('default', 'server open watch');
11```
12
13You can specify different configurations so that you can set up task chains like
14
15```js
16grunt.registerTask('dev', 'server open:dev watch');
17grunt.registerTask('dev', 'build server open:build watch:build');
18```
19
20## Getting Started
21Install this grunt plugin next to your project's [Gruntfile][getting_started] with: `npm install grunt-open`
22
23## Configuration
24
25This is a very simple task and takes only one configuration parameter
26that can be specified under two names, `url` or `file`. They both issue
27the same open command to open the destination with your system's default
28application, but are useful for readability.
29
30```js
31grunt.initConfig({
32 open : {
33 dev : {
34 url : 'http://127.0.0.1:8888/src'
35 },
36 google : {
37 url : 'http://google.com/'
38 },
39 file : {
40 file : '/etc/hosts'
41 }
42 }
43})
44
45grunt.loadNpmTasks('grunt-open');
46
47```
48
49[grunt]: https://github.com/gruntjs/grunt
50[getting_started]: https://github.com/cowboy/grunt/blob/master/docs/getting_started.md
51
52## Documentation
53
54## Contributing
55In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [grunt][grunt].
56
57## Release History
58
59 - 0.1.0 initial releas
60
61## License
62
63Copyright OneHealth Solutions, Inc
64
65Written by Jarrod Overson
66
67Licensed under the Apache 2.0 license.