pegjs/bin
David Majda 6a04067a76 bin/pegjs: Do not overwrite extension-less files
Running bin/pegjs with one argument which was an extension-less file
name caused the file to be overwritten. This was because internal
extension rewriting logic didn't handle this case corectly.

This commit changes the logic from regexp-based to path.extname-based,
fixing the problem. The new code generates file names like this:

  Input file name     Output file name
  ------------------------------------
  grammar.ext         grammar.js
  grammar.ext1.ext2   grammar.ext1.js
  grammar.            grammar.js
  grammar             grammar.js

Fixes #405.
2016-02-27 20:19:12 +01:00
..
.eslintrc.json ESLint: Set environments better 2016-01-29 14:50:38 +01:00
pegjs bin/pegjs: Do not overwrite extension-less files 2016-02-27 20:19:12 +01:00