2018-04-03 14:16:57 +00:00
|
|
|
/* eslint-env node */
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
var path = require('path');
|
|
|
|
var Funnel = require('broccoli-funnel');
|
|
|
|
var mergeTrees = require('broccoli-merge-trees');
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
name: 'bulma',
|
|
|
|
|
|
|
|
isDevelopingAddon() {
|
|
|
|
return true;
|
|
|
|
},
|
|
|
|
|
|
|
|
included: function(app) {
|
|
|
|
this._super.included.apply(this, arguments);
|
|
|
|
|
|
|
|
// see: https://github.com/ember-cli/ember-cli/issues/3718
|
|
|
|
while (typeof app.import !== 'function' && app.app) {
|
|
|
|
app = app.app;
|
|
|
|
}
|
|
|
|
|
|
|
|
this.bulmaPath = path.dirname(require.resolve('bulma'));
|
|
|
|
this.bulmaSwitchPath = path.dirname(require.resolve('bulma-switch/switch.sass'));
|
|
|
|
this.bulmaCheckPath = path.dirname(require.resolve('cool-checkboxes-for-bulma.io'));
|
2018-06-07 20:08:53 +00:00
|
|
|
this.sassSVGURIPath = path.dirname(require.resolve('sass-svg-uri'));
|
2018-04-03 14:16:57 +00:00
|
|
|
return app;
|
|
|
|
},
|
|
|
|
|
|
|
|
treeForStyles: function() {
|
|
|
|
var bulma = new Funnel(this.bulmaPath, {
|
|
|
|
srcDir: '/',
|
|
|
|
destDir: 'app/styles/bulma',
|
|
|
|
annotation: 'Funnel (bulma)',
|
|
|
|
});
|
|
|
|
|
|
|
|
var bulmaSwitch = new Funnel(this.bulmaSwitchPath, {
|
|
|
|
srcDir: '/',
|
|
|
|
destDir: 'app/styles/bulma',
|
|
|
|
annotation: 'Funnel (bulma-switch)',
|
|
|
|
});
|
|
|
|
var bulmaCheck = new Funnel(this.bulmaCheckPath, {
|
|
|
|
srcDir: '/',
|
|
|
|
destDir: 'app/styles/bulma',
|
|
|
|
annotation: 'Funnel (bulma-check)',
|
|
|
|
});
|
2018-06-07 20:08:53 +00:00
|
|
|
var sassSVGURI = new Funnel(this.sassSVGURIPath, {
|
|
|
|
srcDir: '/',
|
|
|
|
destDir: 'app/styles/sass-svg-uri',
|
|
|
|
annotation: 'Sass SVG URI',
|
|
|
|
});
|
|
|
|
|
|
|
|
return mergeTrees([bulmaCheck, bulmaSwitch, bulma, sassSVGURI], { overwrite: true });
|
2018-04-03 14:16:57 +00:00
|
|
|
},
|
|
|
|
};
|