package.cjs.configs.constants.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of neeto-commons-frontend Show documentation
Show all versions of neeto-commons-frontend Show documentation
A package encapsulating common code across neeto projects including initializers, utility functions, common components and hooks and so on.
const TRANSFORM_RULES = [
[
"transform-imports",
{
// neetoui
"@bigbinary/neetoui": {
transform: "@bigbinary/neetoui/${member}",
preventFullImport: true,
},
neetoui: {
transform: "neetoui/${member}",
preventFullImport: true,
},
"@bigbinary/neetoui/formik": {
transform: "@bigbinary/neetoui/formik/${member}",
preventFullImport: true,
},
"neetoui/formik": {
transform: "neetoui/formik/${member}",
preventFullImport: true,
},
// neeto-thank-you-frontend
"@bigbinary/neeto-thank-you-frontend": {
transform: "@bigbinary/neeto-thank-you-frontend/${member}",
preventFullImport: true,
},
neetothankyou: {
transform: "neetothankyou/${member}",
preventFullImport: true,
},
// neeto-payments-frontend
"@bigbinary/neeto-payments-frontend": {
transform: "@bigbinary/neeto-payments-frontend/${member}",
preventFullImport: true,
},
neetopayments: {
transform: "neetopayments/${member}",
preventFullImport: true,
},
// neeto-editor
"@bigbinary/neeto-editor": {
transform: importName => {
if (/^[A-Z][a-zA-Z]+$/.test(importName)) {
return `@bigbinary/neeto-editor/${importName}`;
}
return "@bigbinary/neeto-editor/utils";
},
preventFullImport: true,
skipDefaultConversion: true,
},
neetoeditor: {
transform: importName => {
if (/^[A-Z][a-zA-Z]+$/.test(importName)) {
return `neetoeditor/${importName}`;
}
return "neetoeditor/utils";
},
preventFullImport: true,
skipDefaultConversion: true,
},
"neetoeditor/([A-Z][a-zA-Z]+)$": {
transform: "neetoeditor/${member}",
preventFullImport: false,
},
"@bigbinary/neeto-editor/([A-Z][a-zA-Z]+)$": {
transform: "@bigbinary/neeto-editor/${member}",
preventFullImport: false,
},
// neeto-icons
"@bigbinary/neeto-icons": {
transform: "@bigbinary/neeto-icons/${member}",
preventFullImport: false,
},
neetoicons: {
transform: "neetoicons/${member}",
preventFullImport: false,
},
"@bigbinary/neeto-icons/typeface-logos": {
transform: "@bigbinary/neeto-icons/typeface-logos/${member}",
preventFullImport: false,
},
"neetoicons/typeface-logos": {
transform: "neetoicons/typeface-logos/${member}",
preventFullImport: false,
},
"@bigbinary/neeto-icons/app-icons": {
transform: "@bigbinary/neeto-icons/app-icons/${member}",
preventFullImport: false,
},
"neetoicons/app-icons": {
transform: "neetoicons/app-icons/${member}",
preventFullImport: false,
},
"@bigbinary/neeto-icons/logos": {
transform: "@bigbinary/neeto-icons/logos/${member}",
preventFullImport: false,
},
"neetoicons/logos": {
transform: "neetoicons/logos/${member}",
preventFullImport: false,
},
"@bigbinary/neeto-icons/misc": {
transform: "@bigbinary/neeto-icons/misc/${member}",
preventFullImport: false,
},
"neetoicons/misc": {
transform: "neetoicons/misc/${member}",
preventFullImport: false,
},
},
],
];
module.exports = { TRANSFORM_RULES };