Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Travis CI User committed Jan 11, 2018
1 parent 8882f38 commit b279e7e
Show file tree
Hide file tree
Showing 26 changed files with 324 additions and 80 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md.
*/

Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Software License Agreement
==========================

**CKEditor 5**https://github.com/ckeditor/ckeditor5 <br>
Copyright (c) 2003-2017, [CKSource](http://cksource.com) Frederico Knabben. All rights reserved.
Copyright (c) 2003-2018, [CKSource](http://cksource.com) Frederico Knabben. All rights reserved.

Licensed under the terms of any of the following licenses at your choice:

Expand Down
2 changes: 1 addition & 1 deletion docs/_snippets/build-classic-source.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md.
*/

Expand Down
2 changes: 1 addition & 1 deletion docs/_snippets/examples/balloon-editor.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md.
*/

Expand Down
2 changes: 1 addition & 1 deletion docs/_snippets/examples/classic-editor-short.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md.
*/

Expand Down
2 changes: 1 addition & 1 deletion docs/_snippets/examples/classic-editor.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md.
*/

Expand Down
2 changes: 1 addition & 1 deletion docs/_snippets/examples/inline-editor.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md.
*/

Expand Down
2 changes: 1 addition & 1 deletion docs/_snippets/features/read-only.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md.
*/

Expand Down
2 changes: 1 addition & 1 deletion docs/_snippets/features/ui-language.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md.
*/

Expand Down
2 changes: 1 addition & 1 deletion docs/assets/snippet-styles.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
* Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
*/

.ck-editor {
Expand Down
2 changes: 1 addition & 1 deletion docs/builds/guides/support/license-and-legal.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ order: 20

The following legal notices apply to CKEditor 5 Builds and all software from the CKEditor 5 Ecosystem included with it.

Copyright (c) 2003-2017, CKSource Frederico Knabben. All rights reserved.
Copyright (c) 2003-2018, CKSource Frederico Knabben. All rights reserved.

Licensed under the terms of any of the following licenses at your choice:

Expand Down
13 changes: 4 additions & 9 deletions docs/framework/guides/contributing/development-environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Finally, link them:
lerna bootstrap
```

Running Lerna may take a while because it installs all package dependencies.
Running Lerna may take a while because it installs all package dependencies. It will also warn you about circular dependencies between packages which you can ignore.

Now, all CKEditor packages (except the [dev tools](https://github.com/ckeditor/ckeditor5-dev)) should be cross-symlinked:

Expand Down Expand Up @@ -139,7 +139,7 @@ Lerna does pretty complicated things on already complicated npm ecosystem. If yo

* Look for `npm-debug.log` files in the main package and subpackages. They may point to an obvious issue like a typo in some `package.json`.
* Sometimes repeating `lerna bootstrap` may help.
* If nothing else works, do `lerna clean && npm i && lerna bootstrap`. Mind that without running `npm i` first, `lerna bootstrap` may fail with some meaningless errors (at least it happened to us).
* If nothing else works, do `lerna clean && lerna bootstrap`.

### Final word about mgit and Lerna

Expand Down Expand Up @@ -177,13 +177,7 @@ You can read more about the {@link framework/guides/contributing/testing-environ

## Generating documentation

In order to generate the documentation, you first need to install optional dependencies, such as our documentation generator [Umberto](https://www.npmjs.com/package/umberto). In order to do that run:

```bash
npm run install-optional-dependencies
```

Then you can run the `docs` task:
To build the documentation you need to run the `docs` task:

```bash
npm run docs
Expand All @@ -195,6 +189,7 @@ This task accepts two arguments which can speed up the process:

* `--skip-api` &ndash; Skips building API docs (which takes the majority of the total time).
* `--skip-snippets` &ndash; Skips building live snippets.
* `--skip-validation` &ndash; Skips the final links validation.

Note: These arguments must be passed after additional `--`: `npm run docs -- --skip-api`.

Expand Down
2 changes: 1 addition & 1 deletion docs/framework/guides/support/license-and-legal.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ order: 20

The following legal notices apply to CKEditor 5 Framework and all software from the CKEditor 5 Ecosystem included with it.

Copyright (c) 2003-2017, CKSource Frederico Knabben. All rights reserved.
Copyright (c) 2003-2018, CKSource Frederico Knabben. All rights reserved.

Licensed under the terms of any of the following licenses at your choice:

Expand Down
2 changes: 1 addition & 1 deletion docs/umberto.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"path": "docs",
"observablesdocs": "module:utils/observablemixin~ObservableMixin",
"scripts": {
"snippet-adapter": "../scripts/docs/snippet-adapter/snippetadapter",
"snippet-adapter": "../scripts/docs/snippetadapter",
"import-path": "../scripts/docs/getrealimportpath"
},
"docsearch": {
Expand Down
62 changes: 31 additions & 31 deletions mgit.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,36 @@
"packages": "packages/",
"packagesPrefix": "@ckeditor/ckeditor5-",
"dependencies": {
"@ckeditor/ckeditor5-adapter-ckfinder": "ckeditor/ckeditor5-adapter-ckfinder#5fe1c11",
"@ckeditor/ckeditor5-alignment": "ckeditor/ckeditor5-alignment#cdd4fab",
"@ckeditor/ckeditor5-autoformat": "ckeditor/ckeditor5-autoformat#05452ea",
"@ckeditor/ckeditor5-basic-styles": "ckeditor/ckeditor5-basic-styles#c7f9bf4",
"@ckeditor/ckeditor5-block-quote": "ckeditor/ckeditor5-block-quote#cb93002",
"@ckeditor/ckeditor5-build-balloon": "ckeditor/ckeditor5-build-balloon#a034aa7",
"@ckeditor/ckeditor5-build-classic": "ckeditor/ckeditor5-build-classic#f89699a",
"@ckeditor/ckeditor5-build-inline": "ckeditor/ckeditor5-build-inline#1008c75",
"@ckeditor/ckeditor5-clipboard": "ckeditor/ckeditor5-clipboard#3dc7821",
"@ckeditor/ckeditor5-cloudservices": "ckeditor/ckeditor5-cloudservices#902a8a5",
"@ckeditor/ckeditor5-core": "ckeditor/ckeditor5-core#5a2031e",
"@ckeditor/ckeditor5-easy-image": "ckeditor/ckeditor5-easy-image#ab35ac8",
"@ckeditor/ckeditor5-editor-balloon": "ckeditor/ckeditor5-editor-balloon#0625d55",
"@ckeditor/ckeditor5-editor-classic": "ckeditor/ckeditor5-editor-classic#1429888",
"@ckeditor/ckeditor5-editor-inline": "ckeditor/ckeditor5-editor-inline#fbff397",
"@ckeditor/ckeditor5-engine": "ckeditor/ckeditor5-engine#6c388dd",
"@ckeditor/ckeditor5-enter": "ckeditor/ckeditor5-enter#e87848e",
"@ckeditor/ckeditor5-essentials": "ckeditor/ckeditor5-essentials#b43cb36",
"@ckeditor/ckeditor5-heading": "ckeditor/ckeditor5-heading#74bed89",
"@ckeditor/ckeditor5-image": "ckeditor/ckeditor5-image#fd8ad90",
"@ckeditor/ckeditor5-link": "ckeditor/ckeditor5-link#39fd8e3",
"@ckeditor/ckeditor5-list": "ckeditor/ckeditor5-list#a2395fb",
"@ckeditor/ckeditor5-markdown-gfm": "ckeditor/ckeditor5-markdown-gfm#86aa6c4",
"@ckeditor/ckeditor5-paragraph": "ckeditor/ckeditor5-paragraph#943f814",
"@ckeditor/ckeditor5-theme-lark": "ckeditor/ckeditor5-theme-lark#df71ee9",
"@ckeditor/ckeditor5-typing": "ckeditor/ckeditor5-typing#30def35",
"@ckeditor/ckeditor5-ui": "ckeditor/ckeditor5-ui#d0a0a29",
"@ckeditor/ckeditor5-undo": "ckeditor/ckeditor5-undo#a301ec5",
"@ckeditor/ckeditor5-upload": "ckeditor/ckeditor5-upload#d231ea6",
"@ckeditor/ckeditor5-utils": "ckeditor/ckeditor5-utils#6e0d063",
"@ckeditor/ckeditor5-widget": "ckeditor/ckeditor5-widget#36c0a4d"
"@ckeditor/ckeditor5-adapter-ckfinder": "ckeditor/ckeditor5-adapter-ckfinder#c6b6aa8",
"@ckeditor/ckeditor5-alignment": "ckeditor/ckeditor5-alignment#fb99a20",
"@ckeditor/ckeditor5-autoformat": "ckeditor/ckeditor5-autoformat#2d83221",
"@ckeditor/ckeditor5-basic-styles": "ckeditor/ckeditor5-basic-styles#46ac689",
"@ckeditor/ckeditor5-block-quote": "ckeditor/ckeditor5-block-quote#0ca03d3",
"@ckeditor/ckeditor5-build-balloon": "ckeditor/ckeditor5-build-balloon#847bfb4",
"@ckeditor/ckeditor5-build-classic": "ckeditor/ckeditor5-build-classic#3a83efc",
"@ckeditor/ckeditor5-build-inline": "ckeditor/ckeditor5-build-inline#8d96e9b",
"@ckeditor/ckeditor5-clipboard": "ckeditor/ckeditor5-clipboard#5a4ff71",
"@ckeditor/ckeditor5-cloudservices": "ckeditor/ckeditor5-cloudservices#a61bb9c",
"@ckeditor/ckeditor5-core": "ckeditor/ckeditor5-core#912570d",
"@ckeditor/ckeditor5-easy-image": "ckeditor/ckeditor5-easy-image#56be557",
"@ckeditor/ckeditor5-editor-balloon": "ckeditor/ckeditor5-editor-balloon#0571a6f",
"@ckeditor/ckeditor5-editor-classic": "ckeditor/ckeditor5-editor-classic#81c1a43",
"@ckeditor/ckeditor5-editor-inline": "ckeditor/ckeditor5-editor-inline#614f18d",
"@ckeditor/ckeditor5-engine": "ckeditor/ckeditor5-engine#f56bddf",
"@ckeditor/ckeditor5-enter": "ckeditor/ckeditor5-enter#aa48455",
"@ckeditor/ckeditor5-essentials": "ckeditor/ckeditor5-essentials#3455d2d",
"@ckeditor/ckeditor5-heading": "ckeditor/ckeditor5-heading#f6c4d0d",
"@ckeditor/ckeditor5-image": "ckeditor/ckeditor5-image#b2e4439",
"@ckeditor/ckeditor5-link": "ckeditor/ckeditor5-link#61fec81",
"@ckeditor/ckeditor5-list": "ckeditor/ckeditor5-list#835dc55",
"@ckeditor/ckeditor5-markdown-gfm": "ckeditor/ckeditor5-markdown-gfm#bd26844",
"@ckeditor/ckeditor5-paragraph": "ckeditor/ckeditor5-paragraph#0343075",
"@ckeditor/ckeditor5-theme-lark": "ckeditor/ckeditor5-theme-lark#57d07e6",
"@ckeditor/ckeditor5-typing": "ckeditor/ckeditor5-typing#8a4c498",
"@ckeditor/ckeditor5-ui": "ckeditor/ckeditor5-ui#099b58d",
"@ckeditor/ckeditor5-undo": "ckeditor/ckeditor5-undo#325a684",
"@ckeditor/ckeditor5-upload": "ckeditor/ckeditor5-upload#08e9d09",
"@ckeditor/ckeditor5-utils": "ckeditor/ckeditor5-utils#1a91750",
"@ckeditor/ckeditor5-widget": "ckeditor/ckeditor5-widget#7bd4eb4"
}
}
21 changes: 16 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,25 @@
},
"devDependencies": {
"@ckeditor/ckeditor5-dev-docs": "^8.0.0",
"@ckeditor/ckeditor5-dev-env": "^8.0.4",
"@ckeditor/ckeditor5-dev-tests": "^10.0.0",
"@ckeditor/ckeditor5-dev-webpack-plugin": "^3.0.4",
"babel-minify-webpack-plugin": "^0.2.0",
"eslint": "^4.8.0",
"eslint-config-ckeditor5": "^1.0.7",
"extract-text-webpack-plugin": "^3.0.2",
"glob": "^7.1.2",
"husky": "^0.14.3",
"lint-staged": "^4.2.3",
"lerna": "^2.2.0",
"mgit2": "^0.7.2"
"lint-staged": "^4.2.3",
"mgit2": "^0.7.2",
"minimatch": "^3.0.4",
"postcss-loader": "^2.0.10",
"raw-loader": "^0.5.1",
"style-loader": "^0.19.1",
"umberto": "^0.3.46",
"webpack": "^3.10.0",
"webpack-sources": "^1.1.0"
},
"engines": {
"node": ">=6.0.0",
Expand All @@ -74,14 +86,13 @@
"test:manual": "node --max_old_space_size=4096 node_modules/@ckeditor/ckeditor5-dev-tests/bin/test-manual.js",
"docs": "node ./scripts/docs/build-docs.js",
"docs:api": "node ./scripts/docs/build-api-docs.js",
"docs:build-and-publish": "node ./scripts/docs/build-and-publish.js",
"translations:collect": "ckeditor5-dev-env-translations collect",
"translations:download": "ckeditor5-dev-env-translations download",
"translations:upload": "ckeditor5-dev-env-translations upload",
"changelog": "node ./scripts/release/changelog.js",
"release:dependencies": "node ./scripts/release/release-dependencies.js",
"install-optional-dependencies": "sh ./scripts/install-optional-dependencies.sh",
"switch-to-dev-dev": "sh ./scripts/switch-to-dev-dev.sh",
"build-and-publish-docs": "node ./scripts/docs/build-and-publish.js"
"switch-to-dev-dev": "sh ./scripts/switch-to-dev-dev.sh"
},
"lint-staged": {
"**/*.js": [
Expand Down
70 changes: 70 additions & 0 deletions scripts/bump-year.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
#!/usr/bin/env node

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

/* eslint-env node */

/*
Usage:
mgit exec 'node ../../scripts/bump-year.js'
node scripts/bump-year.js
Full command to update the entire project:
git pull && mgit update && mgit exec 'node ../../scripts/bump-year.js' && node scripts/bump-year.js
And after reviewing the changes:
mgit exec 'git commit -am "Internal: Bumped the year. [skip ci]" && git push' && git commit -am "Internal: Bumped the year." && git push
*/

const glob = require( 'glob' );
const minimatch = require( 'minimatch' );
const fs = require( 'fs' );

const includeDotFiles = {
dot: true
};

glob( '!(build|coverage|node_modules|packages)/**', updateYear );

// LICENSE.md, .eslintrc.js, etc.
glob( '*', includeDotFiles, updateYear );

function updateYear( err, fileNames ) {
const filteredFileNames = fileNames.filter( fileName => {
// Filter out stuff from ckeditor5-utils/src/lib.
if ( minimatch( fileName, '**/src/lib/**' ) ) {
return false;
}

if ( fs.statSync( fileName ).isDirectory() ) {
return false;
}

return true;
} );

filteredFileNames.forEach( fileName => {
fs.readFile( fileName, ( err, data ) => {
data = data.toString();

const year = new Date().getFullYear();
const regexp = /Copyright \(c\) 2003-\d{4}/g;
const updatedData = data.replace( regexp, 'Copyright (c) 2003-' + year );

if ( data == updatedData ) {
// License headers are only required in JS files.
// Also, the file might have already been updated.
if ( fileName.endsWith( '.js' ) && !data.match( regexp ) ) {
console.warn( `The file "${ fileName }" misses a license header.` );
}
} else {
fs.writeFile( fileName, updatedData );
}
} );
} );
}
2 changes: 1 addition & 1 deletion scripts/docs/build-and-publish.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env node

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

Expand Down
2 changes: 1 addition & 1 deletion scripts/docs/build-api-docs.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env node

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

Expand Down
4 changes: 1 addition & 3 deletions scripts/docs/build-docs.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
#!/usr/bin/env node

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

/* eslint-env node */

'use strict';

const assertIsInstalled = require( './../utils/assertisinstalled' );
const buildApiDocs = require( './buildapi' );

const skipLiveSnippets = process.argv.includes( '--skip-snippets' );
Expand Down Expand Up @@ -51,7 +50,6 @@ function buildDocs() {
}

function runUmberto( options ) {
assertIsInstalled( 'umberto' );
const umberto = require( 'umberto' );

return umberto.buildSingleProject( {
Expand Down
6 changes: 1 addition & 5 deletions scripts/docs/buildapi.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md.
*/

Expand All @@ -9,11 +9,7 @@

const path = require( 'path' );

const assertIsInstalled = require( './../utils/assertisinstalled' );

module.exports = function buildApiDocs() {
assertIsInstalled( '@ckeditor/ckeditor5-dev-docs' );

const ckeditor5Docs = require( '@ckeditor/ckeditor5-dev-docs' );

return ckeditor5Docs
Expand Down
2 changes: 1 addition & 1 deletion scripts/docs/getrealimportpath.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md.
*/

Expand Down
Loading

0 comments on commit b279e7e

Please sign in to comment.