diff --git a/src/unicodeAccents.js b/src/unicodeAccents.js index 64808884..635b5117 100644 --- a/src/unicodeAccents.js +++ b/src/unicodeAccents.js @@ -1,9 +1,6 @@ // Mapping of Unicode accent characters to their LaTeX equivalent in text and // math mode (when they exist). - -// NOTE: This module needs to be written with Node-style modules (not -// ES6 modules) so that unicodeMake.js (a Node application) can import it. -module.exports = { +export default { '\u0301': {text: "\\'", math: '\\acute'}, '\u0300': {text: '\\`', math: '\\grave'}, '\u0308': {text: '\\"', math: '\\ddot'}, diff --git a/src/unicodeMake.js b/src/unicodeMake.js index cd7be200..b95e5f03 100644 --- a/src/unicodeMake.js +++ b/src/unicodeMake.js @@ -5,7 +5,8 @@ // In this way, only this tool, and not the distribution/browser, // needs String's normalize function. -const accents = require('./unicodeAccents'); +require('babel-register')({plugins: ["transform-es2015-modules-commonjs"]}); +const accents = require('./unicodeAccents').default; console.log("// @flow"); console.log("// This file is GENERATED by unicodeMake.js. DO NOT MODIFY.");