8
0
Просмотр исходного кода

Other: Removed the compat-type of build. Closes #20.

Piotrek Koszuliński 8 лет назад
Родитель
Сommit
34ecf46bb2

+ 19 - 29
packages/ckeditor5-build-classic/README.md

@@ -6,16 +6,18 @@ CKEditor 5 classic build
 [![Dependency Status](https://david-dm.org/ckeditor/ckeditor5-build-classic/status.svg)](https://david-dm.org/ckeditor/ckeditor5-build-classic)
 [![devDependency Status](https://david-dm.org/ckeditor/ckeditor5-build-classic/dev-status.svg)](https://david-dm.org/ckeditor/ckeditor5-build-classic?type=dev)
 
-Classic build of CKEditor 5. Features the [classic creator](https://github.com/ckeditor/ckeditor5-editor-classic) and the standard set of article features.
+Classic build of CKEditor 5. Read more in the [classic editor](https://ckeditor5.github.io/docs/nightly/ckeditor5/latest/builds/guides/overview.html#Classic-editor) and see the [demo](https://ckeditor5.github.io/docs/nightly/ckeditor5/latest/examples/builds/classic-editor.html).
 
-## Bundles
+## Documentation
 
-The package contains two bundles of the classic editor:
+See:
 
-* `build/ckeditor.js` – A minified, ES6 version of the bundle.
-* `build/ckeditor.compat.js` – A minified, backward-compatible version of the bundle ([babel-preset-env](https://github.com/babel/babel-preset-env) is configured to support `'last 2 versions'`, `'ie >= 11'`).
+* [Installation](https://ckeditor5.github.io/docs/nightly/ckeditor5/latest/builds/guides/integration/installation.html) for how to install this package and what it contains.
+* [Basic API](https://ckeditor5.github.io/docs/nightly/ckeditor5/latest/builds/guides/integration/installation.html) for how to create an editor and interact with it.
+* [Configuration](https://ckeditor5.github.io/docs/nightly/ckeditor5/latest/builds/guides/integration/configuration.html) for how to configure the editor.
+* [Creating custom builds](https://ckeditor5.github.io/docs/nightly/ckeditor5/latest/builds/guides/development/custom-builds.html) for how to customize the build (configure and rebuild the editor bundle).
 
-## Usage
+## Quick start
 
 First, install the build from npm:
 
@@ -31,13 +33,14 @@ And use it in your website:
 </div>
 <script src="./node_modules/@ckeditor/ckeditor5-build-classic/build/ckeditor.js"></script>
 <script>
-ClassicEditor.create( document.querySelector( '#editor' ) )
-	.then( editor => {
-		window.editor = editor;
-	} )
-	.catch( err => {
-		console.error( err.stack );
-	} );
+	ClassicEditor
+		.create( document.querySelector( '#editor' ) )
+		.then( editor => {
+			window.editor = editor;
+		} )
+		.catch( err => {
+			console.error( err.stack );
+		} );
 </script>
 ```
 
@@ -49,7 +52,8 @@ import { ClassicEditor } from '@ckeditor/ckeditor5-build-classic/build/ckeditor'
 // Or using CommonJS verion:
 // const ClassicEditor = require( '@ckeditor/ckeditor5-build-classic/build/ckeditor' ).ClassicEditor;
 
-ClassicEditor.create( document.querySelector( '#editor' ) )
+ClassicEditor
+	.create( document.querySelector( '#editor' ) )
 	.then( editor => {
 		window.editor = editor;
 	} )
@@ -58,21 +62,7 @@ ClassicEditor.create( document.querySelector( '#editor' ) )
 	} );
 ```
 
-**Note:** If you are planning to integrate CKEditor 5 deep into your application it is actually more convenient and recommended to install and import the source modules directly (like it happens in `ckeditor.js`).
-
-## Rebuilding the bundle
-
-**Note:** This section assumes that you cloned this package repository and execute the commands inside it.
-
-You can modify `build-config.js` or any of the webpack configurations and run:
-
-```
-npm run build
-```
-
-to rebuild the entry point (`ckeditor.js`) and both builds (`build/*`).
-
-You can also modify `ckeditor.js` directly and run one of `npm run build-ckeditor` or `npm run build-ckeditor-compat`.
+**Note:** If you are planning to integrate CKEditor 5 deep into your application it is actually more convenient and recommended to install and import the source modules directly (like it happens in `ckeditor.js`). Read more in the [Bundling guide](https://ckeditor5.github.io/docs/nightly/ckeditor5/latest/builds/guides/integration/bundling.html).
 
 ## License
 

+ 0 - 9
packages/ckeditor5-build-classic/bin/build-ckeditor-compat.sh

@@ -1,9 +0,0 @@
-#!/usr/bin/env bash
-
-echo "Building 'build/ckeditor.compat.js'..."
-echo ""
-
-webpack --config webpack.compat.config.js
-
-echo ""
-echo "Done."

Разница между файлами не показана из-за своего большого размера
+ 0 - 4
packages/ckeditor5-build-classic/build/ckeditor.compat.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
packages/ckeditor5-build-classic/build/ckeditor.compat.js.map


+ 8 - 8
packages/ckeditor5-build-classic/package.json

@@ -2,7 +2,12 @@
   "name": "@ckeditor/ckeditor5-build-classic",
   "version": "0.2.0",
   "description": "CKEditor 5 classic build.",
-  "keywords": [],
+  "keywords": [
+    "ckeditor5-build",
+    "text editor",
+    "WYSIWYG",
+    "rich-text editor"
+  ],
   "main": "./build/ckeditor.js",
   "dependencies": {
     "@ckeditor/ckeditor5-editor-classic": "^0.7.3",
@@ -19,14 +24,10 @@
   "devDependencies": {
     "@ckeditor/ckeditor5-dev-utils": "^3.0.0",
     "@ckeditor/ckeditor5-dev-webpack-plugin": "^2.0.11",
-    "babel-core": "^6.26.0",
-    "babel-loader": "^7.1.2",
-    "babel-preset-env": "^1.6.0",
     "babel-minify-webpack-plugin": "^0.2.0",
     "css-loader": "^0.28.5",
     "node-sass": "^4.5.3",
     "raw-loader": "^0.5.1",
-    "regenerator-runtime": "^0.11.0",
     "sass-loader": "^6.0.6",
     "style-loader": "^0.18.2",
     "webpack": "^3.5.5"
@@ -44,9 +45,8 @@
     "url": "https://github.com/ckeditor/ckeditor5-build-classic.git"
   },
   "scripts": {
-    "build": "npm run create-entry-file && npm run build-ckeditor && npm run build-ckeditor-compat",
+    "build": "npm run create-entry-file && npm run build-ckeditor",
     "create-entry-file": "./bin/create-entry-file.js",
-    "build-ckeditor": "./bin/build-ckeditor.sh",
-    "build-ckeditor-compat": "./bin/build-ckeditor-compat.sh"
+    "build-ckeditor": "./bin/build-ckeditor.sh"
   }
 }

+ 0 - 27
packages/ckeditor5-build-classic/tests/manual/ckeditor.compat.html

@@ -1,27 +0,0 @@
-<div id="editor">
-	<h2>About CKEditor&nbsp;5</h2>
-
-	<p>This is <a href="https://ckeditor5.github.io">CKEditor&nbsp;5</a>.</p>
-
-	<figure class="image">
-		<img src="./sample.jpg" alt="Autumn fields" />
-	</figure>
-
-	<p>After more than 2 years of building the next generation editor from scratch and closing over 980 tickets, we created a highly <strong>extensible and flexible architecture</strong> which consists of an <strong>amazing editing framework</strong> and <strong>editing solutions</strong> that will be built on top of it.</p>
-
-	<p>We explained this design choice in <a href="https://medium.com/content-uneditable/ckeditor-5-the-future-of-rich-text-editing-2b9300f9df2c">&ldquo;CKEditor 5: The future of rich text editing&ldquo;</a>:</p>
-
-	<blockquote><p>(…) we are changing our approach with CKEditor 5. We will no longer have only two solutions available, instead CKEditor will be seen as a framework for editing solutions. At the same time, we will be developing several out-of-the-box solutions based on it, which will be available to use in many different contexts. It will be a real “one size fits all” approach, from little requirements, to super advanced full featured applications.</p></blockquote>
-
-	<h3>Notes</h3>
-
-	<p><a href="https://ckeditor5.github.io">CKEditor&nbsp;5</a> is <i>under heavy development</i> and this demo is not production-ready software. For example:</p>
-
-	<ul>
-		<li><strong>Only Chrome, Opera and Safari are supported</strong>.</li>
-		<li>Firefox requires enabling the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Document/onselectionchange">&ldquo;dom.select_events.enabled&rdquo;</a> option.</li>
-		<li><a href="https://github.com/ckeditor/ckeditor5/issues/342">Support for pasting</a> is under development (content filtering is unstable).</li>
-	</ul>
-
-	<p>It has <em>bugs</em> that we are aware of &mdash; and that we will be working on in the next few iterations of the project. Stay tuned for some updates soon!</p>
-</div>

+ 0 - 14
packages/ckeditor5-build-classic/tests/manual/ckeditor.compat.js

@@ -1,14 +0,0 @@
-/**
- * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
- * For licensing, see LICENSE.md.
- */
-
-import { ClassicEditor } from '../../build/ckeditor.compat';
-
-ClassicEditor.create( document.querySelector( '#editor' ) )
-	.then( editor => {
-		window.editor = editor;
-	} )
-	.catch( err => {
-		console.error( err.stack );
-	} );

+ 0 - 9
packages/ckeditor5-build-classic/tests/manual/ckeditor.compat.md

@@ -1,9 +0,0 @@
-# CKEditor 5 classic build – compat (ES5) version
-
-Just play with it.
-
-**Note:** Remember to rebuild the bundles (`npm run build`). You can also run Webpack in the watch mode:
-
-```
-./node_modules/.bin/webpack -w --config=webpack.compat.config.js
-```

+ 0 - 88
packages/ckeditor5-build-classic/webpack.compat.config.js

@@ -1,88 +0,0 @@
-/**
- * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
- * For licensing, see LICENSE.md.
- */
-
-'use strict';
-
-/* eslint-env node */
-
-const path = require( 'path' );
-const webpack = require( 'webpack' );
-const { bundler } = require( '@ckeditor/ckeditor5-dev-utils' );
-const CKEditorWebpackPlugin = require( '@ckeditor/ckeditor5-dev-webpack-plugin' );
-const BabiliPlugin = require( 'babel-minify-webpack-plugin' );
-const buildConfig = require( './build-config' );
-
-module.exports = {
-	devtool: 'source-map',
-
-	entry: [
-		require.resolve( 'regenerator-runtime/runtime.js' ),
-		path.resolve( __dirname, 'ckeditor.js' )
-	],
-
-	output: {
-		path: path.resolve( __dirname, 'build' ),
-		filename: 'ckeditor.compat.js',
-		libraryTarget: 'umd'
-	},
-
-	plugins: [
-		new CKEditorWebpackPlugin( {
-			languages: [ buildConfig.language ]
-		} ),
-		new BabiliPlugin( null, {
-			comments: false
-		} ),
-		new webpack.BannerPlugin( {
-			banner: bundler.getLicenseBanner(),
-			raw: true
-		} )
-	],
-
-	module: {
-		rules: [
-			{
-				test: /\.js$/,
-				use: [
-					{
-						loader: 'babel-loader',
-						query: {
-							presets: [
-								[
-									require( 'babel-preset-env' ),
-									{
-										targets: {
-											browsers: [
-												'last 2 versions',
-												'ie >= 11'
-											]
-										}
-									}
-								]
-							]
-						}
-					}
-				]
-			},
-			{
-				test: /\.svg$/,
-				use: [ 'raw-loader' ]
-			},
-			{
-				test: /\.scss$/,
-				use: [
-					'style-loader',
-					{
-						loader: 'css-loader',
-						options: {
-							minimize: true
-						}
-					},
-					'sass-loader'
-				]
-			}
-		]
-	}
-};

Некоторые файлы не были показаны из-за большого количества измененных файлов