-
-
Notifications
You must be signed in to change notification settings - Fork 272
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
I want use ace , how? #101
Comments
The questions are usually the same for this sort of thing -
In terms of adding these configurations to existing packages, read https://github.com/jspm/registry/wiki/Configuring-Packages-for-jspm. It can be quite fine getting this correct, but the great thing about jspm is once you have configured a package, it is configured for everyone. |
I will also look into this when I have some time as well. |
I've managed to get Ace working. I'm listing the steps I took here, and hopefully others can learn how to do this better as well:
Now that it is working, I created a pull request at the jspm registry - jspm/registry@44e9d4a This adds ace so that now anyone can install it with:
and System.import('ace') I hope that makes some sense and helps here. Questions welcome. |
very cool ! 💯 |
@leogiese and @guybedford where you also able to change the theme and the mode of the editor? |
if anyone will have problems with Web Workers define(function(require, exports, module) {
var worker_html = require('ace/worker-html.js!text');
var worker_css = require('ace/worker-css.js!text');
var worker_javascript = require('ace/worker-javascript.js!text');
var toUrlString = function (response) {
var blob;
try {
blob = new Blob([response], {type: 'application/javascript'});
} catch (e) { // Backwards-compatibility
window.BlobBuilder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder;
blob = new BlobBuilder();
blob.append(response);
blob = blob.getBlob();
}
return URL.createObjectURL(blob);
};
var old = window.Worker;
window.Worker = function (name) {
if (name === 'worker-html.js')
name = toUrlString(worker_html);
if (name === 'worker-css.js')
name = toUrlString(worker_css);
if (name === 'worker-javascript.js')
name = toUrlString(worker_javascript);
return new old(name)
}
}); |
Anyone talked to @nightwing about possibility of making the loading work in systemjs without having to hack around? |
https://github.com/ajaxorg/ace
how configure ?
The text was updated successfully, but these errors were encountered: