Skip to content

Instantly share code, notes, and snippets.

@superlou
Last active August 29, 2015 14:07
Show Gist options
  • Save superlou/55c9682c33bbd7ae252d to your computer and use it in GitHub Desktop.
Save superlou/55c9682c33bbd7ae252d to your computer and use it in GitHub Desktop.
CKEditor file picking
/* global require, module */
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
var pickFiles = require('broccoli-static-compiler');
var app = new EmberApp();
// Use `app.import` to add additional libraries to the generated
// output files.
//
// If you need to use different assets in different
// environments, specify an object as the first parameter. That
// object's keys should be the environment name and the values
// should be the asset to use in that environment.
//
// If the library that you are including contains AMD or ES6
// modules that you would like to import into your application
// please specify an object with the list of modules as keys
// along with the exports of each module as its value.
app.import('vendor/fountain.js');
var ckeditor = pickFiles('bower_components/ckeditor', {
srcDir: '/',
files: ['*'],
destDir: '/ckeditor'
});
app.import('bower_components/ckeditor/ckeditor.js');
module.exports = app.toTree(ckeditor);
<script>
window.AppENV = {{ENV}};
window.EmberENV = window.AppENV.EmberENV;
CKEDITOR_BASEPATH = '/ckeditor/';
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment