mirror of
https://github.com/actualbudget/actual.git
synced 2026-03-22 00:13:45 -05:00
Hi there, `Peg.js` is unmaintained, so I figure you all would appreciate if I replaced it with the drop-in replacement of Peggy. This is work I am breaking out of #918. Peggy adds new features like source map support that we could use, although I do not include that in this change-set. It may be useful for debugging changes to the .pegjs file we have.e
10 lines
305 B
JavaScript
10 lines
305 B
JavaScript
// webpack loader for .pegjs files using Peggy.
|
|
|
|
const peg = require('peggy');
|
|
|
|
module.exports = function loadPeg(source) {
|
|
// TODO: a second value can be returned. A JS SourceMap object.
|
|
// Peggy can output such an object.
|
|
return peg.generate(source, { output: 'source', format: 'umd' });
|
|
};
|