Skip to content

Commit

Permalink
added .jsx file extension as alias for .js, fixes #79
Browse files Browse the repository at this point in the history
  • Loading branch information
BendingBender committed Jul 19, 2015
1 parent dc72117 commit 0f43ee6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ Default: `html`

The syntax type of source string to preprocess. There are 3 main syntax variants:
- `html`, aliases: `xml`
- `js`, aliases: `javascript`, `c`, `cc`, `cpp`, `cs`, `csharp`, `java`, `less`, `sass`, `scss`, `css`, `php`,
- `js`, aliases: `javascript`, `jsx`, `c`, `cc`, `cpp`, `cs`, `csharp`, `java`, `less`, `sass`, `scss`, `css`, `php`,
`ts`, `peg`, `pegjs`, `jade`, `styl`
- `coffee`, aliases: `bash`, `shell`, `sh`

Expand Down Expand Up @@ -351,6 +351,7 @@ In lieu of a formal styleguide, take care to maintain the existing coding style.
changed functionality. Lint and test your code using jshint

## Release History
- 3.1.x Added `.jsx` file extension as alias for `js` (via @BendingBender, #79)
- 3.0.1/2 Fixes for backward compatibility and regex cleanups (thanks to @anseki for suggestions, #77)
- 3.0.0

Expand Down
2 changes: 1 addition & 1 deletion lib/regexrules.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ module.exports = {
module.exports.xml = module.exports.html;

module.exports.javascript = module.exports.js;
module.exports.jsx = module.exports.js;
module.exports.c = module.exports.js;
module.exports.cc = module.exports.js;
module.exports.cpp = module.exports.js;
Expand All @@ -106,7 +107,6 @@ module.exports.pegjs = module.exports.js;
module.exports.jade = module.exports.js;
module.exports.styl = module.exports.js;

module.exports.coffee = module.exports.coffee;
module.exports.bash = module.exports.coffee;
module.exports.shell = module.exports.coffee;
module.exports.sh = module.exports.coffee;

0 comments on commit 0f43ee6

Please sign in to comment.