8
0
Piotrek Koszuliński 290489f90b Added configuration for CKEditor 5. 10 лет назад
..
dev 30eeb19d61 Use default .jscsrc and .jshintrc confing files. It means that if any subdirectory will contain config file it will be used. 10 лет назад
tests 290489f90b Added configuration for CKEditor 5. 10 лет назад
.editorconfig ce36f52243 Initialized .editorconfig. 11 лет назад
.gitattributes 3d03c81f06 Initialized .gitattributes 11 лет назад
.gitignore 973e18feb1 Fixed a typo in gitignore. 11 лет назад
.jscsrc da45ceec2f Merge branch 'master' into esnext 10 лет назад
.jshintrc da45ceec2f Merge branch 'master' into esnext 10 лет назад
CHANGES.md 168d81ef9a Minor changes in the changelog format (incl. periods after changelog entries, as a small reminder). 11 лет назад
CONTRIBUTING.md 8443f9e2de Added the full set of files, all still empty. 11 лет назад
LICENSE.md 8443f9e2de Added the full set of files, all still empty. 11 лет назад
README.md 7c333860be Mentioned the ckeditor5 branch in the documentation. 10 лет назад
gruntfile.js 67775568c0 The array will be shared by both tasks, so it may be extracted. 11 лет назад
package.json f8ed8be7cd Updated deps and started using the ^ semver range. 10 лет назад

README.md

Boilerplate for Git Repositories

devDependency Status

A boilerplate file structure to be used by Git-based projects. It contains most of the files expected to be inside CKEditor-related repositories.

The boilerplate is generic enough to be used by any project out there.

Presets

Currently there are two presets available:

  • For projects using ECMAScript 5 – the master branch,
  • For projects using ECMAScript 2015+ (ESNext) – the esnext branch.
  • For CKEditor 5 repositories – the ckeditor5 branch.

Documentation Resources

The following section lists documentation-related files that should be available in the project.

README.md

All projects must have a README.md file which replaces this one.

LICENSE.md

Includes the default license terms used by most CKEditor projects.

CONTRIBUTING.md

Describes the standard contribution process adopted for CKEditor projects.

CHANGES.md

A template for the changelog file.

Developer Resources

The following section lists developer-targeted files that should be available in the project.

gruntfile.js

This is the Grunt 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.
  • grunt jshint – Validates JavaScript files with JSHint.

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.

All Grunt tasks are available inside the dev/tasks directory.

package.json

The npm configuration file which describes the project and includes dependencies for Node tools used in the project.

.gitattributes

EOL and content type rules for Git.

.gitignore

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

Unified configurations for IDEs. See editorconfig.org for more information.

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 helps to preserve uniformity across different projects.

The following steps assume that you are located inside your local clone of the target repository.

1. Enabling the Boilerplate in a Repository

git remote add boilerplate https://github.com/ckeditor/ckeditor-boilerplate.git

2. Injecting the Boilerplate into a Repository

git fetch boilerplate
git merge boilerplate/master # or boilerplate/esnext

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

Just repeat step 2.

First Steps after Including the Boilerplate

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.

Reviewing file content:

  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.
    • Check if the license option fits your project.
    • 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:

  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.

Additional Directories

Other than the files available in this repository, it is expected that target projects will also contain the following directories:

  • /src/
    The source code of the project.

  • /build/
    If any build is created, it should be placed in this folder.

  • [module|group]/tests/
    The place for tests. Its final placement is per project. It can either stay in the project root or inside sub-directories that represent parts of the project, like modules or plugins.

Boilerplate License

Copyright (c) 2014 CKSource - Frederico Knabben

All boilerplate code is licensed under the terms of the MIT license.

Although LICENSE.md is available in this repository as a template for your project, it does not apply to the boilerplate project itself.