You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- move dtslint (checkTypes) away from Gruntfile.js
(as it disturbs debugging `grunt`)
and call it directly as npm-script in travis-ci
- re-group task definition in Gruntfile.js
- use a multi-job travis build to
run linting, format, dtslint and tests
in parallel
- run only "npm test" on appveyor
- rename Grunt-tasks for be more descriptive
- SAUCE_USERNAME is not a secret variable anymore
it can be easily guessed anyway and the
[secure] value messes up with a lot of the
log output
- linting on commit disable during transition
Copy file name to clipboardexpand all lines: CONTRIBUTING.md
+31-9
Original file line number
Diff line number
Diff line change
@@ -12,15 +12,16 @@ Documentation issues on the handlebarsjs.com site should be reported on [handleb
12
12
13
13
## Branches
14
14
15
-
* The branch `4.x` contains the currently released version. Bugfixes should be made in this branch.
16
-
* The branch `master` contains the next version. A release date is not yet specified. Maintainers
15
+
- The branch `4.x` contains the currently released version. Bugfixes should be made in this branch.
16
+
- The branch `master` contains the next version. A release date is not yet specified. Maintainers
17
17
should merge the branch `4.x` into the master branch regularly.
18
18
19
19
## Pull Requests
20
20
21
21
We also accept [pull requests][pull-request]!
22
22
23
23
Generally we like to see pull requests that
24
+
24
25
- Maintain the existing code style
25
26
- 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)
26
27
- Have [good commit messages](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)
@@ -31,8 +32,8 @@ Generally we like to see pull requests that
31
32
32
33
To build Handlebars.js you'll need a few things installed.
33
34
34
-
* Node.js
35
-
*[Grunt](http://gruntjs.com/getting-started)
35
+
- Node.js
36
+
-[Grunt](http://gruntjs.com/getting-started)
36
37
37
38
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`.
38
39
@@ -51,22 +52,43 @@ If you notice any problems, please report them to the GitHub issue tracker at
51
52
##Running Tests
52
53
53
54
To run tests locally, first install all dependencies.
55
+
54
56
```sh
55
57
npm install
56
58
```
57
59
58
60
Clone the mustache specs into the spec/mustache folder.
Handlebars uses `eslint` to enforce best-practices and `prettier` to auto-format files.
77
+
We do linting and formatting in two phases:
78
+
79
+
- Committed files are linted and formatted in a pre-commit hook. In this stage eslint-errors are forbidden,
80
+
while warnings are allowed.
81
+
- The travis-ci job also lints all files and checks if they are formatted correctly. In this stage, warnings
82
+
are forbidden.
83
+
84
+
You can use the following scripts to make sure that the travis-job does not fail:
85
+
86
+
-**npm run lint** will run `eslint` and fail on warnings
87
+
-**npm run format** will run `prettier` on all files
88
+
-**npm run check-before-pull-request** will perform all most checks that travis does in its build-job, excluding the "integration-test".
89
+
-**npm run integration-test** will run integration tests (using old NodeJS versions and integrations with webpack, babel and so on)
90
+
These tests only work on a Linux-machine with `nvm` installed (for running tests in multiple versions of NodeJS).
91
+
70
92
## Ember testing
71
93
72
94
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.
@@ -83,7 +105,7 @@ npm test
83
105
84
106
## Releasing the latest version
85
107
86
-
*When releasing a previous version of Handlebars, please look into the CONTRIBUNG.md in the corresponding branch.*
108
+
_When releasing a previous version of Handlebars, please look into the CONTRIBUNG.md in the corresponding branch._
87
109
88
110
Handlebars utilizes the [release yeoman generator][generator-release] to perform most release tasks.
When everything is OK, 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.
0 commit comments