Skip to content

Commit

Permalink
fixed: Unit test and config files
Browse files Browse the repository at this point in the history
  • Loading branch information
GianlucaGuarini committed Aug 18, 2023
1 parent 6178f71 commit d8b47fd
Show file tree
Hide file tree
Showing 11 changed files with 1,427 additions and 1,680 deletions.
2 changes: 1 addition & 1 deletion .codeclimate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ engines:

ratings:
paths:
- "index.js"
- 'index.js'
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
test/bundle.js
test/fixtures/*
test/bundle.js
5 changes: 2 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@ name: test

on:
push:
branches: [ main, dev ]
branches: [main, dev]
pull_request:
branches: [ dev ]
branches: [dev]

jobs:
build:

runs-on: ubuntu-latest

strategy:
Expand Down
40 changes: 21 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,27 @@ npm i @riotjs/webpack-loader @riotjs/compiler -D
## Usage

Add the `@riotjs/webpack-loader` in your `webpack.config.js` file

```js
module.exports = {
module: {
rules: [
{
test: /\.riot$/,
exclude: /node_modules/,
use: [{
loader: '@riotjs/webpack-loader',
options: {
hot: false, // set it to true if you are using hmr
// add here all the other @riotjs/compiler options riot.js.org/compiler
// template: 'pug' for example
}
}]
}
]
}
use: [
{
loader: '@riotjs/webpack-loader',
options: {
hot: false, // set it to true if you are using hmr
// add here all the other @riotjs/compiler options riot.js.org/compiler
// template: 'pug' for example
},
},
],
},
],
},
}
```

Expand All @@ -48,19 +51,18 @@ If you want to enable hmr via `hot` option you will need to install also [`@riot
npm i @riotjs/hot-reload -D
```

And afterwards webpack will be able to automatically reload your Riot.js components in runtime.
And afterward webpack will be able to automatically reload your Riot.js components in runtime.

## Examples

Please check [this simple example](https://github.com/riot/examples/tree/gh-pages/webpack) to see how it's easy to configure webpack with riot

[ci-image]:https://img.shields.io/github/actions/workflow/status/riot/webpack-loader/test.yml?style=flat-square
[ci-url]:https://github.com/riot/webpack-loader/actions
[ci-image]: https://img.shields.io/github/actions/workflow/status/riot/webpack-loader/test.yml?style=flat-square
[ci-url]: https://github.com/riot/webpack-loader/actions
[license-image]: https://img.shields.io/badge/license-MIT-000000.svg?style=flat-square
[license-url]: LICENSE
[npm-version-image]: https://img.shields.io/npm/v/@riotjs/webpack-loader.svg?style=flat-square
[license-url]: LICENSE
[npm-version-image]: https://img.shields.io/npm/v/@riotjs/webpack-loader.svg?style=flat-square
[npm-downloads-image]: https://img.shields.io/npm/dm/@riotjs/webpack-loader.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@riotjs/webpack-loader
[npm-url]: https://npmjs.org/package/@riotjs/webpack-loader
[codeclimate-image]: https://api.codeclimate.com/v1/badges/8c3dc0302a42730e8fba/maintainability
[codeclimate-url]: https://codeclimate.com/github/riot/webpack-loader/maintainability

[codeclimate-url]: https://codeclimate.com/github/riot/webpack-loader/maintainability
Loading

0 comments on commit d8b47fd

Please sign in to comment.