mirror of https://github.com/embarklabs/embark.git
32 lines
493 B
JavaScript
32 lines
493 B
JavaScript
/* global module require */
|
|
|
|
const cloneDeep = require('lodash.clonedeep');
|
|
|
|
module.exports = (api) => {
|
|
const env = api.env();
|
|
|
|
const base = {};
|
|
|
|
const browser = cloneDeep(base);
|
|
Object.assign(browser, {
|
|
ignore: [
|
|
'src/node'
|
|
]
|
|
});
|
|
|
|
const node = cloneDeep(base);
|
|
|
|
const test = cloneDeep(node);
|
|
|
|
switch (env) {
|
|
case 'browser':
|
|
return browser;
|
|
case 'node':
|
|
return node;
|
|
case 'test':
|
|
return test;
|
|
default:
|
|
return base;
|
|
}
|
|
};
|