Skip to content

Commit

Permalink
Merge pull request #100 from rosendi/fix/tsx
Browse files Browse the repository at this point in the history
add .tsx file extension as alias for .js
  • Loading branch information
BendingBender committed Feb 21, 2016
2 parents 0f43ee6 + d9e0c40 commit 067f29d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Expand Up @@ -271,7 +271,7 @@ Default: `html`
The syntax type of source string to preprocess. There are 3 main syntax variants:
- `html`, aliases: `xml`
- `js`, aliases: `javascript`, `jsx`, `c`, `cc`, `cpp`, `cs`, `csharp`, `java`, `less`, `sass`, `scss`, `css`, `php`,
`ts`, `peg`, `pegjs`, `jade`, `styl`
`ts`, `tsx`, `peg`, `pegjs`, `jade`, `styl`
- `coffee`, aliases: `bash`, `shell`, `sh`

### preprocessFile(srcFile, destFile[, context[, callback[, options]]])
Expand Down Expand Up @@ -354,25 +354,25 @@ changed functionality. Lint and test your code using jshint
- 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

Breaking changes:
- If a file requested by `@include` or `@extend` can not be found, `preprocess` will now throw by default
with a possibility to opt in to the legacy behavior via the `fileNotFoundSilentFail` option (via @BendingBender, #35).
- Fixed multiple issues with newlines (via @BendingBender, #8), this may result in output that differs from earlier
versions.
- The `srcDir` option was moved to the options object and now defaults to `process.cwd` instead of throwing by
default (via @BendingBender, #68)

New functionality:
- All block directives (ones that have a start and an end token, like `@if`/`@endif`) are now processed recursively (via @Frizi, #61)
- Added hidden by default configuration blocks for `js` (via @mallowigi, #40) and `html` (via @Frizi, #66)

Fixes:
- fixed `@exec` in files included via `@include` and `@extend` (via @BendingBender, #58)
- changed `@extend` and `@exclude` html regex so that directives may appear more than once in one line (via @BendingBender, #36)
- fixed multiple issues with coffescript syntax (via @BendingBender, #39)
- fixed `@if` and `@foreach` to not require trailing whitespace (via @BendingBender, #74)

- 2.3.1 Fixed @echo and @exec directives to allow `-` and `*` characters, fixed @exec with multiple params (via @BendingBender, #21, #45, #51, #54).
- 2.3.0 Added support for @include-static (via @BendingBender)
- 2.2.0 Added support for @foreach and @extend (via @orionstein)
Expand Down Expand Up @@ -403,4 +403,4 @@ Licensed under the Apache 2.0 license.
[dev-deps-image]: https://img.shields.io/david/dev/jsoverson/preprocess.svg?style=flat-square
[dev-deps-url]: https://david-dm.org/jsoverson/preprocess#info=devDependencies
[coverage-image]: https://img.shields.io/coveralls/jsoverson/preprocess/master.svg?style=flat-square
[coverage-url]: https://coveralls.io/r/jsoverson/preprocess?branch=master
[coverage-url]: https://coveralls.io/r/jsoverson/preprocess?branch=master
1 change: 1 addition & 0 deletions lib/regexrules.js
Expand Up @@ -102,6 +102,7 @@ module.exports.scss = module.exports.js;
module.exports.css = module.exports.js;
module.exports.php = module.exports.js;
module.exports.ts = module.exports.js;
module.exports.tsx = module.exports.js;
module.exports.peg = module.exports.js;
module.exports.pegjs = module.exports.js;
module.exports.jade = module.exports.js;
Expand Down

0 comments on commit 067f29d

Please sign in to comment.