1 | # grunt-open
|
2 |
|
3 | Open urls and files from a grunt task
|
4 |
|
5 | ## Usage
|
6 |
|
7 | This is immediately useful as part of your task chain between `server` and `watch`
|
8 |
|
9 | ```js
|
10 | grunt.registerTask('default', 'server open watch');
|
11 | ```
|
12 |
|
13 | You can specify different configurations so that you can set up task chains like
|
14 |
|
15 | ```js
|
16 | grunt.registerTask('dev', 'server open:dev watch');
|
17 | grunt.registerTask('dev', 'build server open:build watch:build');
|
18 | ```
|
19 |
|
20 | ## Getting Started
|
21 | Install this grunt plugin next to your project's [Gruntfile][getting_started] with: `npm install grunt-open`
|
22 |
|
23 | ## Configuration
|
24 |
|
25 | This is a very simple task and takes only one configuration parameter
|
26 | that can be specified under two names, `url` or `file`. They both issue
|
27 | the same open command to open the destination with your system's default
|
28 | application, but are useful for readability.
|
29 |
|
30 | ```js
|
31 | grunt.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 |
|
45 | grunt.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
|
55 | In 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 |
|
63 | Copyright OneHealth Solutions, Inc
|
64 |
|
65 | Written by Jarrod Overson
|
66 |
|
67 | Licensed under the Apache 2.0 license.
|