Opened 11 years ago
Last modified 11 years ago
#11279 closed Task
Package managers integration — at Version 7
Reported by: | Piotrek Koszuliński | Owned by: | Marek Lewandowski |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | |
Keywords: | Cc: |
Description (last modified by )
There are plenty package managers out there, but let's focus first on two of them:
- Bower (JS)
- Composer (PHP)
Steps:
- Make all necessary steps to make CKEditor easily installable with those PMes. The package that should be installed by default is stable/standard (which equals master) from https://github.com/ckeditor/ckeditor-releases. If PM allows to have alternative, we can also make other (basic and full) presets installable.
- The above will perhaps require: #10882. We already tagged CKEditor 4.3 as 4.3.0. To close #10882 we should also add missing tags for historic releases (4.3.0-beta, 4.2.0, 4.1.0, 4.1.0-rc, etc). Additionally, to conform ckeditor-releases with SemVer we may need to create tags without "/standard|basic|full" suffix - e.g. 4.3.0 === 4.3.0/standard.
- Readmes in ckeditor-dev and ckeditor-releases have to be updated. The ckeditor-dev's mentions the 4.0 tag and ckeditor-releases has to contain information about installing CKEditor with Bower and Composer.
- Installing through package managers has to be mentioned in our guides. Please contact Ania to choose the best place.
- The PM integration should be mentioned in release blog post.
Final decisions for this ticket. We agreed that we can start with the really basic solution, so only one available preset (standard). Having 4 different presets would require having 4 different repositories (a lot of work to do) or otherwise we would be able to support only Composer and not Bower, so it's also making situation more complicated.
Change History (8)
comment:1 Changed 11 years ago by
Description: | modified (diff) |
---|
comment:2 Changed 11 years ago by
Owner: | set to Marek Lewandowski |
---|---|
Status: | new → assigned |
comment:4 Changed 11 years ago by
Unfortunately Bower does not give us so much options as Composer does.
comment:5 Changed 11 years ago by
Status: | assigned → review |
---|
Ok, I've created a script which will generate automatically json file for Composer, based on our tags in ckeditor-releases repository. Here is a sample output saved as packages.json.
To play around by yourself:
- download Composer
- download attached packages.json file
- place it somewhere, where it will be accessible using
http://
protocol, lets assume that its address will behttp://localhost/composer/packages.json
- create a new directory at some other directory (there you will download CKEditor via Composer)
- create composer.json file with following content:
{ "repositories": [ { "type": "composer", "url": "http://localhost/composer/" } ], "require": { "cksource/ckeditor": "<4.1.3,>=4.1" } }
- go to that directory with your command prompt and type
composer update
As a resoult you should have following output
Loading composer repositories with package information Updating dependencies (including require-dev) - Installing cksource/ckeditor (4.1.2) Downloading: 100%
If you will take closer look to require
property in composer.json, you can use also cksource/ckeditor-full
and others there. In case cksource/ckeditor
it will point to standard preset.
Note: for simplicity sake, currently json hotlinks to github, we may use our own cdn there.
comment:7 Changed 11 years ago by
Description: | modified (diff) |
---|
Ok I've took a look into Composer and Bower.
Composer:
a) We are not able to publish our ckeditor-releases to work with composer. That's because it requires format:
X.Y.Z
orvX.Y.Z
optionally followed by one of-dev
,-patch
,-alpha
,-beta
,-RC
. Any other suffix will be recognized as invalid, so our-full
,-standard
suffixes would break it.What we need to do to bring Composer support?
composer.json
file in ckeditor-releases repository ( we don't need to do it in ckeditor-dev though )b) Alternative approach: we can handle it at our new server.
All we need to do is to generate
packages.json
file, and make a script which would re-generate it's content upon each release (as it would be bad idea to do it manually).As a result CKEditor would be accessible with phrases like: "cksource/ckeditor", "cksource/ckeditor-full", "cksource/ckeditor-basic", "cksource/ckeditor-standard".
End-user could use then config like:
We dont even need to host zip archives, since we may hotlink github archives.
Bower:
Currently we are able only to fetch ckeditor only by typing exact tag name, like following:
Any other method will not fetch CKEditor. In order to be able work with Bower we must change tag format to meet semver. Then we need to register it with
bower register
command.I'll try to do some extra research if the Bower allows us to specify explicitly in the same fashion as Composer does in point b.