I have several JSON files in my Ember project in a directory called data within the app directory:
I am attempting to copy these files into another data directory within the public directory using a Broccoli funnel. However, when running ember serve
, the files are not copied and no errors are reported. After reading the answer to this question, I started using broccoli-merge-trees
which did not fix the issue.
/* eslint-env node */
'use strict';
const EmberApp = require('ember-cli/lib/broccoli/ember-app');
const Funnel = require('broccoli-funnel');
const MergeTrees = require('broccoli-merge-trees');
module.exports = function(defaults) {
let app = new EmberApp(defaults, {
// Add options here
});
var json = new Funnel('app/data', {
destDir: 'public/data',
include: ['*.json']
});
return new MergeTrees([json, app.toTree()]);
};
Aucun commentaire:
Enregistrer un commentaire