Skip to content
 
 

Latest commit

 

History

83 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ace — as a Drupal library

This repository packages the minified no-conflict build of Ace (Ajax.org Cloud9 Editor) as a Composer drupal-library, so that a Drupal site can install it with Composer instead of copying files out of node_modules or downloading a zip by hand.

drupal/ace_editor requires this package directly, the same way drupal/anchor_link requires vardot/ckeditor5-anchor-drupal. Nothing needs to require it at the project level.

Installation

composer require vardot/ace

With composer/installers and the usual Drupal installer-paths, the files land at:

web/libraries/ace/src-min-noconflict/ace.js
web/libraries/ace/src-min-noconflict/ext-searchbox.js
web/libraries/ace/src-min-noconflict/ext-language_tools.js
web/libraries/ace/src-min-noconflict/mode-*.js
web/libraries/ace/src-min-noconflict/theme-*.js
web/libraries/ace/src-min-noconflict/worker-*.js

which is where drupal/ace_editor looks: it scans /libraries/ace for ace.js and prefers the minified no-conflict build over the other three.

What is shipped, and what is not

Upstream ace-builds ships the same library four times — src/, src-min/, src-noconflict/ and src-min-noconflict/ — around 58 MB in total. Only src-min-noconflict/ is shipped here:

  • minified, so it is what a site should actually serve, and
  • no-conflict, so it does not define the global AMD define() and require() and cannot clash with another loader on the page.

The demos, the kitchen-sink page and the unminified builds are not shipped. If you need them, use ajaxorg/ace-builds directly.

The 1.x branch and the 1.44.0 tag onward carry this layout. Tags up to v1.2.8, and the master branch, are the original 2017 full fork and are left untouched.

Versioning

Tags follow the upstream ace-builds release they are built from. 1.44.0 here is the build of ace-builds 1.44.0.

Upstream

Maintainers

About

Ace (Ajax.org Cloud9 Editor) minified no-conflict build, packaged as a Drupal library

Resources

Stars

1 star

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages