Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const path = require('path');
- // this comes from maven env
- const TENANT = process.env.NPM_FRONTEND_MODULE_BASE_DIR;
- const TENANT_NAME = TENANT.split('/').reverse()[2];
- const TENANT_COMPONENTS = TENANT.substr(0, TENANT.lastIndexOf('/'));
- const PROJECT_ID = 'project-id';
- console.log(`############## FRONTEND BUILD ##############`);
- console.log(`############## STARTING BUILD FOR TENANT: ${TENANT_NAME} ##############`);
- console.log(`############## ******* ##############`);
- const CONSTANTS = {
- SUFFIX_SOURCE: '.entry',
- SUFFIX_TARGET: '.bundle',
- SUFFIX_AUTHOR: 'author', // eg: author.bundle.js, dialog.author.bundle.js
- // Project root (relative to config folder)
- BASE_DIR: '../../',
- // Partial from tenant package (subproject id)
- TENANTS_PACKAGE: `${TENANT}`,
- // Path to frontend working directory (or where the package.json is at) (relative to BASE_DIR)
- FRONTEND_PACKAGE: '',
- // Path to tenant root
- PROJECT_COMMONS: `apps/${PROJECT_ID}`,
- // Path to shared and abstracts include
- SHARED_INCLUDE: 'commons/shared',
- // Path to vendor (js) code alias
- VENDORS_INCLUDE: 'commons/vendor',
- // Path to assets (such as svg icons)
- ASSETS_INCLUDE: 'theme/assets',
- // Path to dialogs styles include
- DIALOG_CSS_INCLUDE: 'dialog',
- // Path to tenants package
- TENANTS_COMPONENTS_INCLUDE: `${TENANTS_COMPONENTS}`,
- // Path to components package
- COMPONENTS_INCLUDE: 'components',
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement