Skip to content

Commit

Permalink
Rewrote the DLL guides and changed script names (aligned to other scr…
Browse files Browse the repository at this point in the history
…ipts).
  • Loading branch information
Reinmar committed Mar 2, 2021
1 parent 5201dc2 commit 0590c55
Show file tree
Hide file tree
Showing 40 changed files with 133 additions and 455 deletions.
490 changes: 86 additions & 404 deletions docs/builds/guides/development/dll-builds.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@
"release:publish": "node ./scripts/release/publish.js",
"switch-to-dev-dev": "sh ./scripts/switch-to-dev-dev.sh",
"clean-up-svg-icons": "sh ./scripts/clean-up-svg-icons.sh",
"build:dll": "node ./scripts/dll/build-dlls.js",
"dll:build": "node ./scripts/dll/build-dlls.js",
"check-dependencies": "ckeditor5-dev-tests-check-dependencies"
},
"lint-staged": {
Expand Down
2 changes: 1 addition & 1 deletion packages/ckeditor5-adapter-ckfinder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@
"build"
],
"scripts": {
"build:dll": "webpack"
"dll:build": "webpack"
}
}
2 changes: 1 addition & 1 deletion packages/ckeditor5-alignment/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@
"build"
],
"scripts": {
"build:dll": "webpack"
"dll:build": "webpack"
}
}
2 changes: 1 addition & 1 deletion packages/ckeditor5-autoformat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,6 @@
"eslint-plugin-ckeditor5-rules"
],
"scripts": {
"build:dll": "webpack"
"dll:build": "webpack"
}
}
2 changes: 1 addition & 1 deletion packages/ckeditor5-autosave/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@
"build"
],
"scripts": {
"build:dll": "webpack"
"dll:build": "webpack"
}
}
2 changes: 1 addition & 1 deletion packages/ckeditor5-basic-styles/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@
"build"
],
"scripts": {
"build:dll": "webpack"
"dll:build": "webpack"
}
}
2 changes: 1 addition & 1 deletion packages/ckeditor5-block-quote/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@
"build"
],
"scripts": {
"build:dll": "webpack"
"dll:build": "webpack"
}
}
2 changes: 1 addition & 1 deletion packages/ckeditor5-ckfinder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@
"build"
],
"scripts": {
"build:dll": "webpack"
"dll:build": "webpack"
}
}
2 changes: 1 addition & 1 deletion packages/ckeditor5-cloud-services/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@
"build"
],
"scripts": {
"build:dll": "webpack"
"dll:build": "webpack"
}
}
2 changes: 1 addition & 1 deletion packages/ckeditor5-code-block/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@
"build"
],
"scripts": {
"build:dll": "webpack"
"dll:build": "webpack"
}
}
2 changes: 1 addition & 1 deletion packages/ckeditor5-easy-image/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@
"build"
],
"scripts": {
"build:dll": "webpack"
"dll:build": "webpack"
}
}
2 changes: 1 addition & 1 deletion packages/ckeditor5-editor-balloon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@
"build"
],
"scripts": {
"build:dll": "webpack"
"dll:build": "webpack"
}
}
2 changes: 1 addition & 1 deletion packages/ckeditor5-editor-classic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@
"build"
],
"scripts": {
"build:dll": "webpack"
"dll:build": "webpack"
}
}
2 changes: 1 addition & 1 deletion packages/ckeditor5-editor-decoupled/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@
"build"
],
"scripts": {
"build:dll": "webpack"
"dll:build": "webpack"
}
}
2 changes: 1 addition & 1 deletion packages/ckeditor5-editor-inline/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@
"build"
],
"scripts": {
"build:dll": "webpack"
"dll:build": "webpack"
}
}
2 changes: 1 addition & 1 deletion packages/ckeditor5-essentials/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@
"build"
],
"scripts": {
"build:dll": "webpack"
"dll:build": "webpack"
}
}
2 changes: 1 addition & 1 deletion packages/ckeditor5-font/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@
"build"
],
"scripts": {
"build:dll": "webpack"
"dll:build": "webpack"
}
}
2 changes: 1 addition & 1 deletion packages/ckeditor5-heading/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,6 @@
"build"
],
"scripts": {
"build:dll": "webpack"
"dll:build": "webpack"
}
}
2 changes: 1 addition & 1 deletion packages/ckeditor5-highlight/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@
"build"
],
"scripts": {
"build:dll": "webpack"
"dll:build": "webpack"
}
}
2 changes: 1 addition & 1 deletion packages/ckeditor5-horizontal-line/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@
"build"
],
"scripts": {
"build:dll": "webpack"
"dll:build": "webpack"
}
}
2 changes: 1 addition & 1 deletion packages/ckeditor5-html-embed/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@
"build"
],
"scripts": {
"build:dll": "webpack"
"dll:build": "webpack"
}
}
2 changes: 1 addition & 1 deletion packages/ckeditor5-image/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,6 @@
"build"
],
"scripts": {
"build:dll": "webpack"
"dll:build": "webpack"
}
}
2 changes: 1 addition & 1 deletion packages/ckeditor5-indent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@
"build"
],
"scripts": {
"build:dll": "webpack"
"dll:build": "webpack"
}
}
2 changes: 1 addition & 1 deletion packages/ckeditor5-link/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,6 @@
"build"
],
"scripts": {
"build:dll": "webpack"
"dll:build": "webpack"
}
}
2 changes: 1 addition & 1 deletion packages/ckeditor5-list/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,6 @@
"build"
],
"scripts": {
"build:dll": "webpack"
"dll:build": "webpack"
}
}
2 changes: 1 addition & 1 deletion packages/ckeditor5-markdown-gfm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,6 @@
"block-elements"
],
"scripts": {
"build:dll": "webpack"
"dll:build": "webpack"
}
}
2 changes: 1 addition & 1 deletion packages/ckeditor5-media-embed/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,6 @@
"build"
],
"scripts": {
"build:dll": "webpack"
"dll:build": "webpack"
}
}
2 changes: 1 addition & 1 deletion packages/ckeditor5-mention/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@
"build"
],
"scripts": {
"build:dll": "webpack"
"dll:build": "webpack"
}
}
2 changes: 1 addition & 1 deletion packages/ckeditor5-page-break/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@
"build"
],
"scripts": {
"build:dll": "webpack"
"dll:build": "webpack"
}
}
2 changes: 1 addition & 1 deletion packages/ckeditor5-paste-from-office/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@
"build"
],
"scripts": {
"build:dll": "webpack"
"dll:build": "webpack"
}
}
2 changes: 1 addition & 1 deletion packages/ckeditor5-remove-format/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@
"build"
],
"scripts": {
"build:dll": "webpack"
"dll:build": "webpack"
}
}
2 changes: 1 addition & 1 deletion packages/ckeditor5-restricted-editing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@
"build"
],
"scripts": {
"build:dll": "webpack"
"dll:build": "webpack"
}
}
2 changes: 1 addition & 1 deletion packages/ckeditor5-special-characters/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@
"build"
],
"scripts": {
"build:dll": "webpack"
"dll:build": "webpack"
}
}
2 changes: 1 addition & 1 deletion packages/ckeditor5-table/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,6 @@
"build"
],
"scripts": {
"build:dll": "webpack"
"dll:build": "webpack"
}
}
2 changes: 1 addition & 1 deletion packages/ckeditor5-watchdog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@
"build"
],
"scripts": {
"build:dll": "webpack"
"dll:build": "webpack"
}
}
2 changes: 1 addition & 1 deletion packages/ckeditor5-word-count/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@
"build"
],
"scripts": {
"build:dll": "webpack"
"dll:build": "webpack"
}
}
14 changes: 7 additions & 7 deletions scripts/dll/build-dlls.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ const IS_DEVELOPMENT_MODE = process.argv.includes( '--dev' );
if ( IS_DEVELOPMENT_MODE ) {
console.log( '🛠️️ ' + chalk.yellow( 'Development mode is active.' ) );
} else {
console.log( '⚠️ ' + chalk.magenta( 'Production mode is active.' ) );
console.log( '⚠️ ' + chalk.magenta( 'Production mode is active. Use --dev to build in the development mode.' ) );
}

// --------------------------------------------------------
// -------------------------------------- Main package DLL.
// -------------------------------------------------------------
// ------------------------------------------- Base DLL build --

console.log( '\n📍 ' + chalk.cyan.underline( 'Building DLL for the main package...\n' ) );
console.log( '\n📍 ' + chalk.cyan.underline( 'Creating the base DLL build...\n' ) );

const webpackArguments = [ '--config=./scripts/dll/webpack.config.dll.js' ];

Expand All @@ -39,10 +39,10 @@ childProcess.spawnSync( 'webpack', webpackArguments, {
stderr: 'inherit'
} );

// --------------------------------------------------------
// ------------------------------ ckeditor5-* packages DLL.
// -------------------------------------------------------------
// ---------------------------- DLL-compatible package builds --

console.log( '\n📍 ' + chalk.underline( 'Building DLLs for ckeditor5-* packages...\n' ) );
console.log( '\n📍 ' + chalk.underline( 'Creating DLL-compatible package builds...\n' ) );

const nodeArguments = [ './scripts/dll/build-packages-dlls.js' ];

Expand Down
8 changes: 2 additions & 6 deletions scripts/dll/build-packages-dlls.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ const notBaseDLL = name => name !== 'ckeditor5-dll';
const hasDLLBuild = name => {
const scripts = require( path.join( process.cwd(), 'packages', name, 'package.json' ) ).scripts;

return scripts && scripts[ 'build:dll' ];
return scripts && scripts[ 'dll:build' ];
};

const buildDll = fullPackageName => {
console.log( `Running "${ fullPackageName }" build...` );

const yarnArguments = [ 'run', 'build:dll' ];
const yarnArguments = [ 'run', 'dll:build' ];

if ( IS_DEVELOPMENT_MODE ) {
yarnArguments.push( '--dev' );
Expand All @@ -46,10 +46,6 @@ const packages = childProcess.execSync( 'ls -1 packages', {
cwd: ROOT_DIRECTORY
} ).toString().trim().split( '\n' );

console.log( '----------------------' );
console.log( 'Running full DLL build' );
console.log( '----------------------' );

packages
.filter( notBaseDLL )
.filter( hasDLLBuild )
Expand Down
4 changes: 2 additions & 2 deletions tests/manual/all-features-dll.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

**This DLL sample test requires that the DLL core and DLL packages are built.**

To build the DLL core and packages, run `yarn run build:dll` and then refresh this page.
To build the DLL core and packages, run `yarn run dll:build` and then refresh this page.

Expected results:
* There should be no errors in the console.
* Four editors should be initialized correctly: Classic, Decoupled, Inline, and Balloon.
* Each editor should contain as many features as we developed.
* Clicking the `Ad-hoc` button logs `It works!` in the console.
* The `WordCount` plugin logs into the console number of characters and words for each editor.
* The `WordCount` plugin logs into the console number of characters and words for each editor.

0 comments on commit 0590c55

Please sign in to comment.