deb.open-vault/ui/lib/css/index.js

43 lines
951 B
JavaScript
Raw Normal View History

2024-04-20 12:23:50 +00:00
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
/* eslint-env node */
/* eslint-disable node/no-extraneous-require */
'use strict';
var path = require('path');
var Funnel = require('broccoli-funnel');
var mergeTrees = require('broccoli-merge-trees');
module.exports = {
name: 'sassSvgUri',
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.sassSVGURIPath = path.dirname(require.resolve('sass-svg-uri'));
return app;
},
treeForStyles: function () {
var sassSVGURI = new Funnel(this.sassSVGURIPath, {
srcDir: '/',
destDir: 'app/styles/sass-svg-uri',
annotation: 'Sass SVG URI',
});
return mergeTrees([sassSVGURI], { overwrite: true });
},
};