mirror of
https://github.com/embarklabs/embark.git
synced 2025-01-11 22:34:24 +00:00
c46c52ff5c
* chore(@embark/): move embarkjs packages to their own folder * chore(@embark/): rename embark-ui folder to cockpit * chore(@embark/): rename packages already in logical folders to remove embark- prefix chore(@embark/): rename packages already in logical folders to remove embark- prefix update package.json files to use correct eslint config remove core/* from package.json workspaces
47 lines
779 B
JavaScript
47 lines
779 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/embarkjs.js',
|
|
'src/node/index.js'
|
|
]
|
|
});
|
|
|
|
const node = cloneDeep(base);
|
|
Object.assign(node, {
|
|
ignore: [
|
|
'src/browser.js'
|
|
]
|
|
});
|
|
|
|
const nodeAsync = cloneDeep(base);
|
|
Object.assign(nodeAsync, {
|
|
ignore: [
|
|
'src/node/index.js'
|
|
]
|
|
});
|
|
|
|
const nodeTest = cloneDeep(base);
|
|
|
|
switch (env) {
|
|
case 'browser':
|
|
return browser;
|
|
case 'node':
|
|
return node;
|
|
case 'node:async':
|
|
return nodeAsync;
|
|
case 'node:test':
|
|
return nodeTest;
|
|
default:
|
|
return base;
|
|
}
|
|
};
|