-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate documentation using Docs-Builder #243
Comments
After extracted packages (from the main repository to smaller ones), I have some troubles with Bundler. Before my changes, the Bundler worked on hardcoded paths. It didn't allow running the mechanism a few times at the same time. I decided to rebuild it. After some changes, the mechanism could be running multiple times and the built editors won't overrides themselves. Unfortunately, after extracting to smaller packages, I have to figure out one more time the way for the idea above. |
According to ckeditor5/dev/tasks/bundle/tasks.js Lines 43 to 331 in de3325a
ckeditor5 we register those utils as a gulp tasks, but sample generator could require it and do whatever needs.
I mean something like that: const bundleTasks = require( 'path/to/bundle/tasks.js' );
let bundles = [];
function createBundle( config ) {
return bundleTasks.generate( config ).then( bundleTasks.minify( config ) );
}
for ( let sampleConfig of samples ) {
bundles.push( createBundle( sampleConfig ) );
}
return Promise.all( bundles ); But first bundle output needs to be configurable :) and you already did it. Maybe sample generator should be also extracted to separated repository? |
The whole problem with building editors for samples has been resolved. Smaller tasks from
Allowed to transform sample for bundle's configuration and use them for bundler. |
We need to decide how to split the functionality into multiple packages. The packages:
The functionality to cover:
Proposal:
Dependency tree:
|
So, there are 2 packages to create: dev-docs and dev-tests. The second one right now will not be used because it will contain only the code for testing releases, which we created to prove that this is doable at all. We will start using this package when we'll work on porting the testing env to Karma, which will require some additional code. |
OK, first version of docs builder integration landed on master. Now, the work on the docs builder will continue. |
At this moment, works on Docs-Builder are still in progress.
That package is being tested with CKEditor5 all the time, so I've decided to create a ticket for that. It allows creating a branch and pushing the latest changes.
How does Docs-Builder work?
The whole mechanism isn't too complicated but can be a little large. We assume that each repository contains two directories:
docs/samples
- Sample which are files with extensions:*.html
,*.md
,*.js
. Sample files are similar to manual tests. The*.js
files contain part of test and part of code which initializes the editor,docs/guides
- Guides which are files with extension*.md
.Before starting
docs-builder
, we have to collect all these files to one place. Module for collecting files will be used few times:build
an editor point of view: collect samples and run them as automated tests (in a local environment),bundler
point of view: collect samples, make a configuration object for bundler (based on collected files) and build a bundled editor. It allows testing samples in a production environment.When all files are collected,
docs-builder
will do a magic stuff. The whole concept ofmagic stuff
will be described in the future indocs-builder
repository.Related tickets:
The text was updated successfully, but these errors were encountered: