Skip to content

Commit

Permalink
chore: added a support for custom glob patterns
Browse files Browse the repository at this point in the history
BREAKING CHANGE: removed the default final glob patterns that included *.mjml.
  • Loading branch information
matteobertoldo committed Oct 25, 2022
1 parent 6c85363 commit e892deb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ module.exports = {

In addition to the options available in the MJML documentation, there are 3 additional parameters described in the table below:

| Parameter | Type | Default | Description |
| -------------------- | :------: | :-------------: | --------------------------------------------------- |
| `inputPath` | `string` | `undefined` | The path where `.mjml` files are located. |
| `options.extensions` | `string` | `.html` | The default output extension. |
| `options.outputPath` | `string` | `process.cwd()` | The path where compiled files should be written to. |
| Parameter | Type | Default | Description |
| -------------------- | :------: | :-------------: | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `inputPath` | `string` | `undefined` | The path where `.mjml` files are located. The string supports [glob](https://github.com/isaacs/node-glob#glob-primer) syntax ex: `path/to/mjml/**/*.mjml` |
| `options.extensions` | `string` | `.html` | The default output extension. |
| `options.outputPath` | `string` | `process.cwd()` | The path where compiled files should be written to. |

## Contributing :busts_in_silhouette:

Expand Down
2 changes: 1 addition & 1 deletion src/webpack-mjml-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const WebpackMjmlStore = function (inputPath, options) {
WebpackMjmlStore.prototype.apply = function (compiler) {
const that = this;
compiler.hooks.make.tapAsync(packageJSON.name, function (compilation, callback) {
glob(`${that.inputPath}/**/*.mjml`, async function (err, files) {
glob(`${that.inputPath}`, async function (err, files) {
if (err) {
throw err;
}
Expand Down

0 comments on commit e892deb

Please sign in to comment.