Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return {
options: {
treeshake: true,
format: 'iife',
onwarn: swag.onwarn,
plugins: [
swag.nodeResolve({
basedir: __dirname,
prefixes: gruntUtils.prefixes({
'tinymce/core': 'lib/globals/tinymce/core',
'tinymce/ui': 'lib/ui/main/ts'
}, [
[`tinymce/themes/${name}`, `lib/themes/${name}/main/ts`]
]),
mappers: [
swag.mappers.replaceDir('./lib/core/main/ts/api', './lib/globals/tinymce/core/api'),
swag.mappers.invalidDir('./lib/core/main/ts')
]
}),
swag.remapImports()
]
},
files:[
{
src: `lib/themes/${name}/main/ts/Main.js`,
dest: `js/tinymce/themes/${name}/theme.js`
}
]
};
})
),
gruntUtils.generate(plugins, 'plugin', (name) => {
return {
options: {
treeshake: true,
format: 'iife',
onwarn: swag.onwarn,
plugins: [
swag.nodeResolve({
basedir: __dirname,
prefixes: gruntUtils.prefixes({
'tinymce/core': 'lib/globals/tinymce/core'
}, [
[`tinymce/plugins/${name}`, `lib/plugins/${name}/main/ts`]
]),
mappers: [
swag.mappers.replaceDir('./lib/core/main/ts/api', './lib/globals/tinymce/core/api'),
swag.mappers.invalidDir('./lib/core/main/ts')
]
}),
swag.remapImports()
]
},
files:[ { src: `lib/plugins/${name}/main/ts/Main.js`, dest: `js/tinymce/plugins/${name}/plugin.js` } ]
};
}),
gruntUtils.generate(themes, 'theme', (name) => {