UNPKG

4.26 kBMarkdownView Raw
1CKEditor 5 development environment tasks
2========================================
3
4Tasks used during development of [CKEditor 5](https://ckeditor.com).
5
6More information about development tools packages can be found at the following URL: <https://github.com/ckeditor/ckeditor5-dev>.
7
8## Release tools
9
10### Usage
11
12```
13npm i --save-dev @ckeditor/ckeditor5-dev-env
14```
15
16Then create a script that run tasks:
17
18```js
19// scripts/changelog-self.js: Generate changelog for the current package.
20require( '@ckeditor/ckeditor5-dev-env' ).generateChangelogForSinglePackage();
21```
22
23```js
24// scripts/changelog-repos.js: Generate changelog for all dependencies (repository using multiple repositories).
25require( '@ckeditor/ckeditor5-dev-env' ).generateChangelogForSubRepositories( /* options */ );
26```
27
28```js
29// scripts/changelog-packages.js: Generate changelog for all packages (repository contains multiple packages).
30require( '@ckeditor/ckeditor5-dev-env' ).generateChangelogForSubPackages( /* options */ );
31```
32
33```js
34// scripts/release-self.js: Create release for the current package.
35require( '@ckeditor/ckeditor5-dev-env' ).releaseRepository();
36```
37
38```js
39// scripts/release-bump-versions.js: Validates and updates version for all packages (includes the package found in options.cwd)
40require( '@ckeditor/ckeditor5-dev-env' ).bumpVersions( /* options */ );
41```
42
43```js
44// scripts/release-packages.js: Publish all changes.
45require( '@ckeditor/ckeditor5-dev-env' ).releaseSubRepositories( /* options */ );
46```
47
48### Generating changelog
49
50This tool can generate a changelog file based on commits in the repository. It can also propose what should be the next release version (according to [SemVer](http://semver.org)).
51
52Read more about the [git commit message convention](https://github.com/ckeditor/ckeditor5-design/wiki/Git-commit-message-convention) implemented by this tool.
53
54### Creating a release for multiple repositories
55
56**Note:** Before running the bumping versions task you need to generate the changelog for changes in the version to be released.
57
58The process implemented by the tool:
59
601. Read a new release version from the changelog (the last header),
611. Filter out packages which won't be released (no changes or dependencies has not changed),
621. Update new versions of packages in `package.json` for all released packages,
631. Commit these changes as `Release: vX.Y.Z.`,
641. Create a tag `vX.Y.Z`.
65
66### Publishing changes
67
68**Note:** Before publishing changes you need to bump versions in all dependencies.
69
70The process implemented by the tool:
71
721. Compares versions released on NPM and GitHub. Based on that, the tool know what should be published. You can call the same script multiple times and nothing wrong happens.
731. If choose publish on NPM: the tool publish changes on NPM.
741. If choose publish on GitHub: the tool creates a [GitHub release](https://help.github.com/articles/creating-releases/). Notes for the release are taken from the changelog.
751. If nothing was selected: the tool does nothing. No publish, no push, no creating releases.
76
77## Translation tools
78
79Available tasks:
80- `collect` - Collects translation strings ( from `t()` calls ) and stores them in ckeditor5/build/.transifex directory.
81- `upload` - Uploads translations to the Transifex from collected files.
82- `download` - Downloads translations from the Transifex for each package and language.
83
84### Usage
85
86```
87npm i --save-dev @ckeditor/ckeditor5-dev-env
88```
89
90Then use `ckeditor5-dev-env-translations` command:
91
92```
93# directly from command line:
94node ./node_modules/bin/ckeditor5-dev-env-translations collect
95
96# using npx:
97npx ckeditor5-dev-env-translations collect
98```
99
100Or add to `package.json` scripts:
101
102```
103{
104 "scripts": {
105 "translations:collect": "ckeditor5-dev-env-translations collect",
106 "translations:download": "ckeditor5-dev-env-translations download",
107 "translations:upload": "ckeditor5-dev-env-translations upload"
108 }
109}
110```
111
112## Changelog
113
114See the [`CHANGELOG.md`](https://github.com/ckeditor/ckeditor5-dev/blob/master/packages/ckeditor5-dev-env/CHANGELOG.md) file.
115
116## License
117
118Licensed under the terms of [GNU General Public License Version 2 or later](http://www.gnu.org/licenses/gpl.html). For full details about the license, please check the `LICENSE.md` file.