Skip to content
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

Use CKEditor as a dependecy #262

Closed
pjasiun opened this issue Jul 25, 2016 · 4 comments
Closed

Use CKEditor as a dependecy #262

pjasiun opened this issue Jul 25, 2016 · 4 comments
Assignees
Labels
type:task This issue reports a chore (non-production change) and other types of "todos".
Milestone

Comments

@pjasiun
Copy link

pjasiun commented Jul 25, 2016

Another project should be able to use CKEditor 5 as a dependency. It should be also possible to watch changes in the CKEditor plugin so the development of the custom project can be done together with some CKEditor5 plugins, without a need to rebuild CKEditor each time.

The workflow should be as described. Note that these are example names of folders and commands, they can be different then names suggested in other tickets.

  1. A custom project has a list of ckeditor5-* projects, it needs, listed in the package.json. Some CKEditor5 tools and a compiler are also included there. Note that it does not need main ckeditor5 there. The custom project contains also a gulpfile.js with exposed needed ckeditor5 commands.
custom-project/
   package.json (with a list of ckeditor5-* dependencies)
   gulpfile.js
  1. Using npm install dependencies are installed to the node_modules folder.
custom-project/
   package.json (with a list of ckeditor5-* dependencies)
   gulpfile.js
   node_modules/
      ckeditor5-util-*
      ckeditor5-compiler-esnext
      ckeditor5-*
  1. The user can define the directory where all ckedior5 dev projects are kept. Using gulp ckeditor5-link all ckeditor5-* projects in node_modules are replaced with symlinks to the ckeditor5-project/ckeditor5-* folders. Note that this step is optional.
custom-project/
   package.json (with a list of ckeditor5-* dependencies)
   gulpfile.js
   node_modules/
      ckeditor5-* -> ../../ckeditor5-project/ckeditor5-*
ckeditor5-project/
      ckeditor5-*
  1. Using gulp ckeditor5-compile the compiler run and the result goes to the custom target folder:
custom-project/
   package.json (with a list of ckeditor5-* dependencies)
   gulpfile.js
   node_modules/
      ckeditor5-* -> ../../ckeditor5-project/ckeditor5-*
   lib/
      ckeditor5/ (same as `build/esnext` in the standard way of building)
ckeditor5-project/
      ckeditor5-*

There should be also gulp ckeditor5-compile --watch option available which watch ckeditor5-project/ckeditor5-* for changes.

Then the custom project can use modules which land in lib/ckeditor5 and handle bundling (and any other future transformations) in the way it needs.

@Reinmar Reinmar changed the title Use ckeditor as a dependecy Use CKEditor as a dependecy Jul 25, 2016
@Reinmar Reinmar added this to the iteration 2 milestone Jul 25, 2016
@Reinmar Reinmar added the type:task This issue reports a chore (non-production change) and other types of "todos". label Jul 25, 2016
@szymonkups
Copy link
Contributor

szymonkups commented Jul 25, 2016

Let's treat this issue as an umbrella one. We can split work into couple of steps:

  1. Refactoring (removing all code from ckeditor5). Try to improve require() calls at this point.
  2. Applying proper directory structure for project building process:
  3. Think about configuring WORSKPACE_DIR and possibilities to link to packages outside ../ directory, as described above by @pjasiun.
  4. Clean up. Stuff like filling missing package.json fields, improving readmes, describing workflow for publishing ckeditor5-dev-* packages, etc.

@Reinmar
Copy link
Member

Reinmar commented Jul 25, 2016

Another requirement to keep in mind: #226 (comment). Build's output path and bundler input and output paths should be configurable via CLI (at least).

@maxbarnas
Copy link
Contributor

Think about configuring WORSKPACE_DIR and possibilities to link to packages outside ../ directory, as described above by @pjasiun.

I tested as much as possible usage of WORKSPACE_DIR option in ckeditor5/gulpfile.js and (apart from one fix) it is working flawlessly. I talked with @pjasiun and he seems to be happy about using this option.

@szymonkups
Copy link
Contributor

We agreed with @pjasiun that we can close this issue and further topics will be described in separate tasks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:task This issue reports a chore (non-production change) and other types of "todos".
Projects
None yet
Development

No branches or pull requests

5 participants