|
@@ -1,24 +1,26 @@
|
|
|
Boilerplate for Git Repositories
|
|
Boilerplate for Git Repositories
|
|
|
================================
|
|
================================
|
|
|
|
|
|
|
|
-A boilerplate file structure to be used by git based projects. It contains most of the files expected to be inside
|
|
|
|
|
-CKEditor related repositories.
|
|
|
|
|
|
|
+A boilerplate file structure to be used by Git-based projects. It contains most of the files expected to be inside
|
|
|
|
|
+CKEditor-related repositories.
|
|
|
|
|
|
|
|
-This is for generic purposes, so it can be used by any project out there.
|
|
|
|
|
|
|
+The boilerplate is generic enough to be used by any project out there.
|
|
|
|
|
|
|
|
## Documentation Resources
|
|
## Documentation Resources
|
|
|
|
|
|
|
|
|
|
+The following section lists documentation-related files that should be available in the project.
|
|
|
|
|
+
|
|
|
### README.md
|
|
### README.md
|
|
|
|
|
|
|
|
-All projects must have a README.md file, which replaces this one.
|
|
|
|
|
|
|
+All projects must have a `README.md` file which replaces this one.
|
|
|
|
|
|
|
|
### LICENSE.md
|
|
### LICENSE.md
|
|
|
|
|
|
|
|
-Includes the default license terms used by most of CKEditor projects.
|
|
|
|
|
|
|
+Includes the default license terms used by most CKEditor projects.
|
|
|
|
|
|
|
|
### CONTRIBUTING.md
|
|
### CONTRIBUTING.md
|
|
|
|
|
|
|
|
-Describes the standard contribution process adopted by CKEditor projects.
|
|
|
|
|
|
|
+Describes the standard contribution process adopted for CKEditor projects.
|
|
|
|
|
|
|
|
### CHANGES.md
|
|
### CHANGES.md
|
|
|
|
|
|
|
@@ -26,85 +28,87 @@ A template for the changelog file.
|
|
|
|
|
|
|
|
## Developer Resources
|
|
## Developer Resources
|
|
|
|
|
|
|
|
|
|
+The following section lists developer-targeted files that should be available in the project.
|
|
|
|
|
+
|
|
|
### gruntfile.js
|
|
### gruntfile.js
|
|
|
|
|
|
|
|
-This is the [grunt](http://gruntjs.com/) configuration file. It exposes the following tasks:
|
|
|
|
|
|
|
+This is the [Grunt](http://gruntjs.com/) configuration file. It exposes the following tasks:
|
|
|
|
|
|
|
|
- * `grunt default`: Alias for `jshint:git` and `jscs:git` tasks.
|
|
|
|
|
- * `grunt githooks`: Installs a git pre-commit hook to run `grunt default`.
|
|
|
|
|
- * `grunt jscs`: JavaScript code style checker with [JSCS](https://github.com/jscs-dev/node-jscs).
|
|
|
|
|
- * `grunt jshint`: Validate JavaScript files with [JSHint](https://github.com/jshint/jshint).
|
|
|
|
|
|
|
+ * `grunt default` – Alias for `jshint:git` and `jscs:git` tasks.
|
|
|
|
|
+ * `grunt githooks` – Installs a Git pre-commit hook to run `grunt default`.
|
|
|
|
|
+ * `grunt jscs` – JavaScript code style checker with [JSCS](https://github.com/jscs-dev/node-jscs).
|
|
|
|
|
+ * `grunt jshint` – Validates JavaScript files with [JSHint](https://github.com/jshint/jshint).
|
|
|
|
|
|
|
|
-The `jscs:git` and `jshint:git` variations run the checks on files that will endup into the next `git commit` only. It's
|
|
|
|
|
|
|
+The `jscs:git` and `jshint:git` variations run the checks on files that will end up in the next `git commit` only. It's
|
|
|
therefore much faster.
|
|
therefore much faster.
|
|
|
|
|
|
|
|
-All grunt tasks are available inside the `dev/tasks` directory.
|
|
|
|
|
|
|
+All Grunt tasks are available inside the `dev/tasks` directory.
|
|
|
|
|
|
|
|
### package.json
|
|
### package.json
|
|
|
|
|
|
|
|
-The [npm configuration file](https://www.npmjs.org/doc/files/package.json.html), which describes the project and
|
|
|
|
|
-includes dependencies for node tools used in the project.
|
|
|
|
|
|
|
+The [npm configuration file](https://www.npmjs.org/doc/files/package.json.html) which describes the project and
|
|
|
|
|
+includes dependencies for Node tools used in the project.
|
|
|
|
|
|
|
|
-###.gitattributes
|
|
|
|
|
|
|
+### .gitattributes
|
|
|
|
|
|
|
|
-EOL and content type rules for git.
|
|
|
|
|
|
|
+EOL and content type rules for Git.
|
|
|
|
|
|
|
|
### .gitignore
|
|
### .gitignore
|
|
|
|
|
|
|
|
-The list of paths to be ignored by git. It also sets the list of paths to be ignored by the `jscs:git` and `jshint:git`
|
|
|
|
|
-grunt tasks.
|
|
|
|
|
|
|
+The list of paths to be ignored by Git. This file also sets the list of paths to be ignored by the `jscs:git` and `jshint:git`
|
|
|
|
|
+Grunt tasks.
|
|
|
|
|
|
|
|
### .editorconfig
|
|
### .editorconfig
|
|
|
|
|
|
|
|
Unified configurations for IDEs. See
|
|
Unified configurations for IDEs. See
|
|
|
[editorconfig.org](http://editorconfig.org/) for more information.
|
|
[editorconfig.org](http://editorconfig.org/) for more information.
|
|
|
|
|
|
|
|
-## Using this Repository
|
|
|
|
|
|
|
+## Using This Repository
|
|
|
|
|
|
|
|
This repository can be used as a starting point for new projects or to bring existing projects to a common pattern. It
|
|
This repository can be used as a starting point for new projects or to bring existing projects to a common pattern. It
|
|
|
-helps bringing a uniform form among different projects.
|
|
|
|
|
|
|
+helps to preserve uniformity across different projects.
|
|
|
|
|
|
|
|
-The following steps assume that you're located inside your local clone of the target repository.
|
|
|
|
|
|
|
+The following steps assume that you are located inside your local clone of the target repository.
|
|
|
|
|
|
|
|
-### 1. Enabling the Boilerplate into a Repository
|
|
|
|
|
|
|
+### 1. Enabling the Boilerplate in a Repository
|
|
|
|
|
|
|
|
```bash
|
|
```bash
|
|
|
git remote add boilerplate https://github.com/ckeditor/ckeditor-boilerplate.git
|
|
git remote add boilerplate https://github.com/ckeditor/ckeditor-boilerplate.git
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
-### 2. Injecting the Boilerplate into Your Repository
|
|
|
|
|
|
|
+### 2. Injecting the Boilerplate into a Repository
|
|
|
|
|
|
|
|
```bash
|
|
```bash
|
|
|
git fetch boilerplate
|
|
git fetch boilerplate
|
|
|
git merge boilerplate/master
|
|
git merge boilerplate/master
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
-If files are present in your repo, there may be the chance that the merge will cause conflicts. Generally it is
|
|
|
|
|
-straightforward to have them resolved.
|
|
|
|
|
|
|
+If any files are already present in your repository, there is a chance that the merge will cause conflicts. Generally it should
|
|
|
|
|
+be straightforward to resolve them.
|
|
|
|
|
|
|
|
### 3. Get Boilerplate Updates
|
|
### 3. Get Boilerplate Updates
|
|
|
|
|
|
|
|
-Just repeat "2".
|
|
|
|
|
|
|
+Just repeat step 2.
|
|
|
|
|
|
|
|
-## First Steps After Including the Boilerplate
|
|
|
|
|
|
|
+## First Steps after Including the Boilerplate
|
|
|
|
|
|
|
|
The boilerplate contains generic files, many of them serving as templates for your projects. The following are the
|
|
The boilerplate contains generic files, many of them serving as templates for your projects. The following are the
|
|
|
things to do once you incorporate it into your project.
|
|
things to do once you incorporate it into your project.
|
|
|
|
|
|
|
|
-Reviewing files content:
|
|
|
|
|
|
|
+Reviewing file content:
|
|
|
|
|
|
|
|
-1. **README.md**: replace this file with contents that describe your project.
|
|
|
|
|
-2. **CONTRIBUTING.md**: ensure that the contents of this file apply to your project.
|
|
|
|
|
-3. **LICENSE.md**:
|
|
|
|
|
|
|
+1. `README.md` – Replace this file with the content that describes your project.
|
|
|
|
|
+2. `CONTRIBUTING.md` – Ensure that the content of this file applies to your project.
|
|
|
|
|
+3. `LICENSE.md`:
|
|
|
* Replace the software name with your project name.
|
|
* Replace the software name with your project name.
|
|
|
* Check if the license option fits your project.
|
|
* Check if the license option fits your project.
|
|
|
- * Ensure that the whole file content is good for your project.
|
|
|
|
|
-4. **package.json**: fill all entries accordingly.
|
|
|
|
|
|
|
+ * Ensure that the entire content of this file is appropriate for your project.
|
|
|
|
|
+4. `package.json` – Fill all entries accordingly.
|
|
|
|
|
|
|
|
Assuming that `npm` and `grunt` are installed globally, run a few commands:
|
|
Assuming that `npm` and `grunt` are installed globally, run a few commands:
|
|
|
|
|
|
|
|
-1. `npm install`: download all project dependencies into node_modules.
|
|
|
|
|
-2. `grunt githooks`: (optional) if you want to have pre-commit linting enabled straight into your project.
|
|
|
|
|
|
|
+1. `npm install` – Downloads all project dependencies into `node_modules`.
|
|
|
|
|
+2. `grunt githooks`– (optional) If you want to have pre-commit linting enabled straight in your project.
|
|
|
|
|
|
|
|
## Boilerplate License
|
|
## Boilerplate License
|
|
|
|
|
|
|
@@ -112,5 +116,5 @@ Copyright (c) 2014 CKSource - Frederico Knabben
|
|
|
|
|
|
|
|
All boilerplate code is licensed under the terms of the [MIT license](http://opensource.org/licenses/MIT).
|
|
All boilerplate code is licensed under the terms of the [MIT license](http://opensource.org/licenses/MIT).
|
|
|
|
|
|
|
|
-Although `LICENSE.md` is available in this repository as a template for your project, it doesn't apply for the
|
|
|
|
|
|
|
+Although `LICENSE.md` is available in this repository as a template for your project, it does not apply to the
|
|
|
boilerplate project itself.
|
|
boilerplate project itself.
|