mirror of
https://github.com/Turfjs/turf.git
synced 2025-12-08 20:26:16 +00:00
Remove export.default
This commit is contained in:
parent
6b8de81d49
commit
5c06b60b12
@ -31,7 +31,12 @@ glob.sync(path.join(__dirname, '..', 'packages', 'turf-*', 'index.js')).forEach(
|
||||
index += `\nmodule.exports.default = ${name};\n`;
|
||||
fs.writeFileSync(filepath, index);
|
||||
}
|
||||
if (index.includes('export default') && !index.includes('module.exports.default')) {
|
||||
throw new Error('missing module.exports.default =', name);
|
||||
if (index.includes('module.exports.default')) {
|
||||
console.log(name);
|
||||
// throw new Error('invalid module.exports.default =', name);
|
||||
}
|
||||
// Remove module.exports.default (will be handled with Rollup)
|
||||
index = index.replace(`module.exports.default = ${name};`, '');
|
||||
index = index.trim() + '\n';
|
||||
fs.writeFileSync(filepath, index);
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user