Skip to content

Commit

Permalink
Added bump-year script.
Browse files Browse the repository at this point in the history
  • Loading branch information
przemyslaw-zan committed Jan 7, 2022
1 parent 4c79a97 commit f156132
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"homepage": "https://ckeditor.com/ckeditor-5",
"devDependencies": {
"@ckeditor/ckeditor5-dev-docs": "^26.0.0",
"@ckeditor/ckeditor5-dev-env": "^26.0.0",
"@ckeditor/ckeditor5-dev-env": "^27.4.0",
"chalk": "^4.1.2",
"eslint": "^7.32.0",
"eslint-config-ckeditor5": "^3.1.0",
Expand Down
40 changes: 40 additions & 0 deletions scripts/bump-year.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/usr/bin/env node

/**
* @license Copyright (c) 2020-2022, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md.
*/

/* eslint-env node */

/*

Usage:
node scripts/bump-year.js

And after reviewing the changes:
git commit -am "Internal: Bumped the year." && git push

*/

require( '@ckeditor/ckeditor5-dev-env' )
.bumpYear( {
cwd: process.cwd(),
globPatterns: [
{ // LICENSE.md, .eslintrc.js, etc.
pattern: '*',
options: {
dot: true
}
},
{
pattern: '!(coverage|.nyc_output)/**',
options: {
ignore: [
'**/templates/**'
]
}
}
],
initialYear: '2020'
} );

0 comments on commit f156132

Please sign in to comment.