Bug:Fix file validation issue
[vnfsdk/refrepo.git] / vnfmarket / src / main / webapp / vnfmarket / node_modules / handlebars / CONTRIBUTING.md
1 # How to Contribute
2
3 ## Reporting Issues
4
5 Please see our [FAQ](https://github.com/wycats/handlebars.js/blob/master/FAQ.md) for common issues that people run into.
6
7 Should you run into other issues with the project, please don't hesitate to let us know by filing an [issue][issue]! In general we are going to ask for an example of the problem failing, which can be as simple as a jsfiddle/jsbin/etc. We've put together a jsfiddle [template][jsfiddle] to ease this. (We will keep this link up to date as new releases occur, so feel free to check back here)
8
9 Pull requests containing only failing tests demonstrating the issue are welcomed and this also helps ensure that your issue won't regress in the future once it's fixed.
10
11 Documentation issues on the handlebarsjs.com site should be reported on [handlebars-site](https://github.com/wycats/handlebars-site).
12
13 ## Pull Requests
14
15 We also accept [pull requests][pull-request]!
16
17 Generally we like to see pull requests that
18 - Maintain the existing code style
19 - Are focused on a single change (i.e. avoid large refactoring or style adjustments in untouched code if not the primary goal of the pull request)
20 - Have [good commit messages](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)
21 - Have tests
22 - Don't significantly decrease the current code coverage (see coverage/lcov-report/index.html)
23
24 ## Building
25
26 To build Handlebars.js you'll need a few things installed.
27
28 * Node.js
29 * [Grunt](http://gruntjs.com/getting-started)
30
31 Before building, you need to make sure that the Git submodule `spec/mustache` is included (i.e. the directory `spec/mustache` should not be empty). To include it, if using Git version 1.6.5 or newer, use `git clone --recursive` rather than `git clone`. Or, if you already cloned without `--recursive`, use `git submodule update --init`.
32
33 Project dependencies may be installed via `npm install`.
34
35 To build Handlebars.js from scratch, you'll want to run `grunt`
36 in the root of the project. That will build Handlebars and output the
37 results to the dist/ folder. To re-run tests, run `grunt test` or `npm test`.
38 You can also run our set of benchmarks with `grunt bench`.
39
40 The `grunt dev` implements watching for tests and allows for in browser testing at `http://localhost:9999/spec/`.
41
42 If you notice any problems, please report them to the GitHub issue tracker at
43 [http://github.com/wycats/handlebars.js/issues](http://github.com/wycats/handlebars.js/issues).
44
45 ##Running Tests
46
47 To run tests locally, first install all dependencies.
48 ```sh
49 npm install
50 ```
51
52 Clone the mustache specs into the spec/mustache folder.
53 ```sh
54 cd spec
55 rm -r mustache
56 git clone https://github.com/mustache/spec.git mustache
57 ```
58
59 From the root directory, run the tests.
60 ```sh
61 npm test
62 ```
63
64 ## Ember testing
65
66 The current ember distribution should be tested as part of the handlebars release process. This requires building the `handlebars-source` gem locally and then executing the ember test script.
67
68 ```sh
69 npm link
70 grunt build release
71 cp dist/*.js $emberRepoDir/bower_components/handlebars/
72
73 cd $emberRepoDir
74 npm link handlebars
75 npm test
76 ```
77
78 ## Releasing
79
80 Handlebars utilizes the [release yeoman generator][generator-release] to perform most release tasks.
81
82 A full release may be completed with the following:
83
84 ```
85 yo release
86 npm publish
87 yo release:publish components handlebars.js dist/components/
88
89 cd dist/components/
90 gem build handlebars-source.gemspec
91 gem push handlebars-source-*.gem
92 ```
93
94 After this point the handlebars site needs to be updated to point to the new version numbers. The jsfiddle link should be updated to point to the most recent distribution for all instances in our documentation.
95
96 [generator-release]: https://github.com/walmartlabs/generator-release
97 [pull-request]: https://github.com/wycats/handlebars.js/pull/new/master
98 [issue]: https://github.com/wycats/handlebars.js/issues/new
99 [jsfiddle]: https://jsfiddle.net/9D88g/47/