Răsfoiți Sursa

Merge branch 'master' into t/645

Aleksander Nowodzinski 8 ani în urmă
părinte
comite
80928abdd8

+ 1 - 1
.eslintrc.js

@@ -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.
  */
 

+ 2 - 2
.travis.yml

@@ -15,14 +15,14 @@ before_install:
   - export DISPLAY=:99.0
   - sh -e /etc/init.d/xvfb start
 install:
-  - npm install mgit2 lerna @ckeditor/ckeditor5-dev-tests @ckeditor/ckeditor5-dev-docs
+  - npm install mgit2 lerna
   - mgit bootstrap --resolver-url-template="https://github.com/\${ path }.git"
   - lerna bootstrap
 script:
   - npm t -- --reporter=dots
   - npm run docs:api -- --validate-only
 after_success:
-  - travis_wait ./node_modules/.bin/ckeditor5-dev-docs-publish-nightly
+  - travis_wait npm run docs:build-and-publish-nightly
 notifications:
   slack:
     rooms:

+ 1 - 1
LICENSE.md

@@ -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:
 

+ 1 - 1
docs/_snippets/build-classic-source.js

@@ -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.
  */
 

+ 1 - 1
docs/_snippets/examples/balloon-editor.js

@@ -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.
  */
 

+ 1 - 1
docs/_snippets/examples/classic-editor-short.js

@@ -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.
  */
 

+ 1 - 1
docs/_snippets/examples/classic-editor.js

@@ -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.
  */
 

+ 1 - 1
docs/_snippets/examples/inline-editor.js

@@ -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.
  */
 

+ 1 - 1
docs/_snippets/features/read-only.js

@@ -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.
  */
 

+ 1 - 1
docs/_snippets/features/ui-language.js

@@ -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.
  */
 

+ 1 - 1
docs/assets/snippet-styles.css

@@ -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 {

+ 1 - 1
docs/builds/guides/support/license-and-legal.md

@@ -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:
 

+ 10 - 9
docs/framework/guides/architecture/intro.md

@@ -27,28 +27,29 @@ The [`@ckeditor/ckeditor5-core`](https://www.npmjs.com/package/@ckeditor/ckedito
 
 ### Editor classes
 
-{@link module:core/editor/editor~Editor} and {@link module:core/editor/standardeditor~StandardEditor} are, respectively, the base editor class and its more typical implementation.
+{@link module:core/editor/editor~Editor} class representing the base of the editor.
 
 The editor is a root object, gluing all other components. It holds a couple of properties that you need to know:
 
 * {@link module:core/editor/editor~Editor#config} &ndash; The configuration object.
 * {@link module:core/editor/editor~Editor#plugins} and {@link module:core/editor/editor~Editor#commands} &ndash; The collection of loaded plugins and commands.
 * {@link module:core/editor/editor~Editor#document} &ndash; The document. It is the editing engine's entry point.
-* {@link module:core/editor/editor~Editor#data} &ndash; The data controller (there is also the {@link module:core/editor/editor~Editor#editing editing controller} but [we plan to merge it](https://github.com/ckeditor/ckeditor5-engine/issues/678) into the data controller). It is a set of high-level utilities to work on the document,
-* {@link module:core/editor/standardeditor~StandardEditor#keystrokes} &ndash; The keystroke handler. It allows to bind keystrokes to actions.
+* {@link module:core/editor/editor~Editor#data} &ndash; The data controller. It controls how data is retrieved from the document and set inside it.
+* {@link module:core/editor/editor~Editor#editing} &ndash; The editing controller. It controls {@link module:engine/controller/editingcontroller~EditingController#document document} rendering, including selection handling.
+* {@link module:core/editor/editor~Editor#keystrokes} &ndash; The keystroke handler. It allows to bind keystrokes to actions.
 
 Besides that, the editor exposes a few of methods:
 
 * {@link module:core/editor/editor~Editor.create `create()`} &ndash; The static `create()` method. Editor constructors are protected and you should create editors using this static method. It allows the initialization process to be asynchronous.
 * {@link module:core/editor/editor~Editor#destroy `destroy()`} &ndash; Destroys the editor.
-* {@link module:core/editor/editor~Editor#setData `setData()`} and {@link module:core/editor/editor~Editor#getData `getData()`} &ndash; A way to retrieve data from the editor and set data in the editor. The data format is controlled by the {@link module:engine/controller/datacontroller~DataController#processor data controller's data processor} and it does not need to be a string (it can be e.g. JSON if you implement such a {@link module:engine/dataprocessor/dataprocessor~DataProcessor data processor}). See, for example, how to {@link features/markdown produce Markdown output}.
 * {@link module:core/editor/editor~Editor#execute `execute()`} &ndash; Executes the given command.
 
-The editor classes are a base to implement your own editors. CKEditor 5 Framework comes with a few editor types (for example, {@link module:editor-classic/classiceditor~ClassicEditor classic}, {@link module:editor-inline/inlineeditor~InlineEditor inline} and {@link module:editor-balloon/ballooneditor~BalloonEditor balloon}) but you can freely implement editors which work and look completely different. The only requirement is that you implement the {@link module:core/editor/editor~Editor} and {@link module:core/editor/standardeditor~StandardEditor} interfaces.
+You can also extend the editor interface using API interfaces:
 
-<info-box>
-	You are right &mdash; the editors mentioned above are classes, not interfaces. This is a part of API that [needs to be improved](https://github.com/ckeditor/ckeditor5/issues/327). Less inheritance, more interfaces and composition. It should also be clear which interfaces a feature requires to work (at the moment it is half of the `StandardEditor`).
-</info-box>
+* {@link module:core/editor/utils/elementapimixin~ElementApi} &ndash; A way to retrieve and set data from/to element on which editor has been initialized.
+* {@link module:core/editor/utils/dataapimixin~DataApi} &ndash; A way to retrieve data from the editor and set data in the editor. The data format is controlled by the {@link module:engine/controller/datacontroller~DataController#processor data controller's data processor} and it does not need to be a string (it can be e.g. JSON if you implement such a {@link module:engine/dataprocessor/dataprocessor~DataProcessor data processor}). See, for example, how to {@link features/markdown produce Markdown output}.
+
+The editor class is a base to implement your own editors. CKEditor 5 Framework comes with a few editor types (for example, {@link module:editor-classic/classiceditor~ClassicEditor classic}, {@link module:editor-inline/inlineeditor~InlineEditor inline} and {@link module:editor-balloon/ballooneditor~BalloonEditor balloon}) but you can freely implement editors which work and look completely different. The only requirement is that you implement the {@link module:core/editor/editor~Editor} interface.
 
 ### Plugins
 
@@ -721,7 +722,7 @@ keystrokeHandler.set( 'Tab', ( keyEvtData, cancel ) => {
 <info-box>
 	There is also an {@link module:core/editingkeystrokehandler~EditingKeystrokeHandler `EditingKeystrokeHandler`} class which has the same API as `KeystrokeHandler` but it offers direct keystroke bindings to editor commands.
 
-	Usually, the editor provides such keystroke handler under the {@link module:core/editor/standardeditor~StandardEditor#keystrokes `editor.keystrokes`} property so any plugin can register keystrokes associated with editor commands. For example, the {@link module:undo/undo~Undo `Undo`} plugin registers `editor.keystrokes.set( 'Ctrl+Z', 'undo' );` to execute its "undo" command.
+	The editor provides such keystroke handler under the {@link module:core/editor/editor~Editor#keystrokes `editor.keystrokes`} property so any plugin can register keystrokes associated with editor commands. For example, the {@link module:undo/undo~Undo `Undo`} plugin registers `editor.keystrokes.set( 'Ctrl+Z', 'undo' );` to execute its "undo" command.
 </info-box>
 
 When multiple callbacks are assigned to the same keystroke, priorities can be used to decide which one should be handled first and whether other callbacks should be executed at all:

+ 4 - 9
docs/framework/guides/contributing/development-environment.md

@@ -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:
 
@@ -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
 
@@ -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
@@ -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`.
 

+ 1 - 1
docs/framework/guides/support/license-and-legal.md

@@ -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:
 

+ 1 - 1
docs/umberto.json

@@ -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": {

+ 20 - 7
package.json

@@ -47,13 +47,26 @@
   },
   "devDependencies": {
     "@ckeditor/ckeditor5-dev-docs": "^8.0.0",
-    "@ckeditor/ckeditor5-dev-tests": "^10.0.0",
-    "eslint": "^4.8.0",
+    "@ckeditor/ckeditor5-dev-env": "^8.0.4",
+    "@ckeditor/ckeditor5-dev-tests": "^10.2.0",
+    "@ckeditor/ckeditor5-dev-utils": "^7.0.3",
+    "@ckeditor/ckeditor5-dev-webpack-plugin": "^3.0.4",
+    "babel-minify-webpack-plugin": "^0.2.0",
+    "eslint": "^4.15.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": "^6.0.0",
+    "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.48",
+    "webpack": "^3.10.0",
+    "webpack-sources": "1.0.1"
   },
   "engines": {
     "node": ">=6.0.0",
@@ -74,14 +87,14 @@
     "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",
+    "docs:build-and-publish-nightly": "node ./scripts/docs/build-and-publish-nightly.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": [

+ 70 - 0
scripts/bump-year.js

@@ -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 );
+			}
+		} );
+	} );
+}

+ 77 - 0
scripts/docs/build-and-publish-nightly.js

@@ -0,0 +1,77 @@
+#!/usr/bin/env node
+
+/**
+ * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
+ * For licensing, see LICENSE.md.
+ */
+
+/* eslint-env node */
+
+'use strict';
+
+/*
+
+This script is to be used on CI to automatically update https://ckeditor5.github.io/docs/nightly/ckeditor5/latest/.
+
+*/
+
+// Build the documentation only when master branch is updated.
+if ( process.env.TRAVIS_BRANCH !== 'master' ) {
+	process.exit();
+}
+
+// Build the documentation only when a cron task triggered the CI.
+if ( process.env.TRAVIS_EVENT_TYPE !== 'cron' ) {
+	process.exit();
+}
+
+const path = require( 'path' );
+const { tools } = require( '@ckeditor/ckeditor5-dev-utils' );
+
+const mainRepoUrl = 'https://github.com/CKEditor5/ckeditor5.github.io';
+
+// The assumption here is that the script is called from ckeditor5/.
+const projectVersion = require( path.join( process.cwd(), 'package.json' ) ).version;
+
+// Clone the CKEditor 5 page.
+console.log( 'Cloning ckeditor5.github.io repository...' );
+exec( `git clone ${ mainRepoUrl }.git` );
+
+// Build the documentation.
+console.log( 'Building documentation...' );
+exec( 'npm run docs -- --production' );
+
+console.log( 'Copying files...' );
+
+// Remove existing documentation.
+exec( `rm -rf ckeditor5.github.io/docs/nightly/ckeditor5/${ projectVersion }` );
+exec( 'rm -rf ckeditor5.github.io/docs/nightly/ckeditor5/latest' );
+
+// Copy built documentation to the new destination.
+exec( 'cp -R build/docs/* ckeditor5.github.io/docs/nightly/' );
+
+// Copy the versioned documentation to latest/.
+exec( 'mkdir ckeditor5.github.io/docs/nightly/ckeditor5/latest' );
+exec( `cp -R ckeditor5.github.io/docs/nightly/ckeditor5/${ projectVersion }/* ckeditor5.github.io/docs/nightly/ckeditor5/latest` );
+
+// Change work directory in order to make a commit in CKEditor 5 page's repository.
+process.chdir( path.join( process.cwd(), 'ckeditor5.github.io' ) );
+
+exec( `echo "https://${ process.env.GITHUB_TOKEN }:@github.com" > .git/credentials 2> /dev/null` );
+exec( 'git config credential.helper "store --file=.git/credentials"' );
+
+// Commit the documentation.
+if ( exec( 'git diff --name-only docs/' ).trim().length ) {
+	exec( 'git add docs/' );
+	exec( 'git commit -m "Documentation build."' );
+	exec( 'git push origin master --quiet' );
+
+	const lastCommit = exec( 'git log -1 --format="%h"' );
+	console.log( `Successfully published the documentation under ${ mainRepoUrl }/commit/${ lastCommit }` );
+} else {
+	console.log( 'Nothing to commit. Documentation is up to date.' );
+}
+
+function exec( command ) {
+	return tools.shExec( command, { verbosity: 'error' } );
+}

+ 9 - 1
scripts/docs/build-and-publish.js

@@ -1,12 +1,20 @@
 #!/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 */
 
+/*
+
+This script allows manually publishing docs on https://ckeditor5.github.io/docs/nightly/ckeditor5/latest/.
+
+It assumes that ckeditor5.github.io is cloned next to ckeditor5.
+
+*/
+
 'use strict';
 
 const path = require( 'path' );

+ 1 - 1
scripts/docs/build-api-docs.js

@@ -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.
  */
 

+ 1 - 3
scripts/docs/build-docs.js

@@ -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.
  */
 
@@ -9,7 +9,6 @@
 
 'use strict';
 
-const assertIsInstalled = require( './../utils/assertisinstalled' );
 const buildApiDocs = require( './buildapi' );
 
 const skipLiveSnippets = process.argv.includes( '--skip-snippets' );
@@ -51,7 +50,6 @@ function buildDocs() {
 }
 
 function runUmberto( options ) {
-	assertIsInstalled( 'umberto' );
 	const umberto = require( 'umberto' );
 
 	return umberto.buildSingleProject( {

+ 1 - 5
scripts/docs/buildapi.js

@@ -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.
  */
 
@@ -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

+ 1 - 1
scripts/docs/getrealimportpath.js

@@ -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.
  */
 

+ 0 - 14
scripts/docs/snippet-adapter/package.json

@@ -1,14 +0,0 @@
-{
-  "name": "ckeditor5-snippet-adapter",
-  "private": true,
-  "dependencies": {
-    "@ckeditor/ckeditor5-dev-webpack-plugin": "^3.0.0",
-    "babel-minify-webpack-plugin": "^0.2.0",
-    "extract-text-webpack-plugin": "^3.0.0",
-    "raw-loader": "^0.5.1",
-    "postcss-loader": "^2.0.8",
-    "style-loader": "^0.18.2",
-    "webpack": "^3.6.0",
-    "webpack-sources": "1.0.1"
-  }
-}

+ 1 - 1
scripts/docs/snippet-adapter/snippetadapter.js → scripts/docs/snippetadapter.js

@@ -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.
  */
 

+ 0 - 20
scripts/install-optional-dependencies.sh

@@ -1,20 +0,0 @@
-#!/bin/sh
-
-# @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
-# For licensing, see LICENSE.md.
-
-# Installs optional dev dependencies.
-# They are required by the following tasks:
-#
-# * npm run docs
-# * npm run changelog:dependencies
-# * npm run release:dependencies
-# * npm run translations:*
-
-set -e
-
-npm i @ckeditor/ckeditor5-dev-env umberto
-
-cd scripts/docs/snippet-adapter
-npm i
-cd ../..

+ 1 - 5
scripts/release/changelog.js

@@ -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.
  */
 
@@ -9,10 +9,6 @@
 
 'use strict';
 
-const assertIsInstalled = require( './../utils/assertisinstalled' );
-
-assertIsInstalled( '@ckeditor/ckeditor5-dev-env' );
-
 const devEnv = require( '@ckeditor/ckeditor5-dev-env' );
 const commonOptions = {
 	cwd: process.cwd(),

+ 1 - 5
scripts/release/release-dependencies.js

@@ -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.
  */
 
@@ -9,10 +9,6 @@
 
 'use strict';
 
-const assertIsInstalled = require( './../utils/assertisinstalled' );
-
-assertIsInstalled( '@ckeditor/ckeditor5-dev-env' );
-
 require( '@ckeditor/ckeditor5-dev-env' )
 	.releaseSubRepositories( {
 		cwd: process.cwd(),

+ 1 - 1
scripts/switch-to-dev-dev.sh

@@ -1,6 +1,6 @@
 #!/bin/sh
 
-# @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.
 
 # Symlinks packages from https://github.com/ckeditor/ckeditor5-dev in ckeditor5's node_modules.

+ 0 - 20
scripts/utils/assertisinstalled.js

@@ -1,20 +0,0 @@
-/**
- * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
- * For licensing, see LICENSE.md.
- */
-
-/* eslint-env node */
-
-'use strict';
-
-module.exports = function assertIsInstalled( packageName ) {
-	try {
-		require( packageName + '/package.json' );
-	} catch ( err ) {
-		console.error( `Error: Cannot find package '${ packageName }'.\n` );
-		console.error( 'You need to install optional dependencies.' );
-		console.error( 'Run: \'npm run install-optional-dependencies\'.' );
-
-		process.exit( 1 );
-	}
-};