rollup-plugin-riot 6.0.0 → 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -22,11 +22,11 @@ Requires @riotjs/compiler > 4.x.x and Rollup v1.x.x or above.
22
22
  ## Usage
23
23
 
24
24
  ```js
25
- import riot from 'rollup-plugin-riot'
25
+ import riot from 'rollup-plugin-riot'
26
26
  export default {
27
27
  entry: 'src/main.js',
28
28
  dest: 'dist/bundle.js',
29
- plugins: [riot()]
29
+ plugins: [riot()],
30
30
  }
31
31
  ```
32
32
 
@@ -35,14 +35,14 @@ export default {
35
35
  You can specify some `options`:
36
36
 
37
37
  ```js
38
- import riot from 'rollup-plugin-riot'
38
+ import riot from 'rollup-plugin-riot'
39
39
  const options = {
40
- ext: 'html'
40
+ ext: 'html',
41
41
  }
42
42
  export default {
43
43
  entry: 'src/main.js',
44
44
  dest: 'dist/bundle.js',
45
- plugins: [riot(options)]
45
+ plugins: [riot(options)],
46
46
  }
47
47
  ```
48
48
 
@@ -56,13 +56,10 @@ And other options of `@riotjs/compiler` could be used.
56
56
 
57
57
  - https://github.com/riot/examples/tree/gh-pages/rollup
58
58
 
59
-
60
- [ci-image]:https://img.shields.io/github/workflow/status/riot/rollup-plugin-riot/test?style=flat-square
61
- [ci-url]:https://github.com/riot/rollup-plugin-riot/actions
62
-
63
- [license-image]:https://img.shields.io/badge/license-MIT-000000.svg?style=flat-square
64
- [license-url]:LICENSE
65
-
66
- [npm-version-image]:https://img.shields.io/npm/v/rollup-plugin-riot.svg?style=flat-square
67
- [npm-downloads-image]:https://img.shields.io/npm/dm/rollup-plugin-riot.svg?style=flat-square
68
- [npm-url]:https://npmjs.org/package/rollup-plugin-riot
59
+ [ci-image]: https://img.shields.io/github/actions/workflow/status/riot/rollup-plugin-riot/test.yml?style=flat-square
60
+ [ci-url]: https://github.com/riot/rollup-plugin-riot/actions
61
+ [license-image]: https://img.shields.io/badge/license-MIT-000000.svg?style=flat-square
62
+ [license-url]: LICENSE
63
+ [npm-version-image]: https://img.shields.io/npm/v/rollup-plugin-riot.svg?style=flat-square
64
+ [npm-downloads-image]: https://img.shields.io/npm/dm/rollup-plugin-riot.svg?style=flat-square
65
+ [npm-url]: https://npmjs.org/package/rollup-plugin-riot
@@ -1,5 +1,5 @@
1
1
  /*
2
- rollup-plugin-riot v6.0.0
2
+ rollup-plugin-riot v7.0.0
3
3
  @license MIT
4
4
  */
5
5
  /*eslint-disable*/
@@ -39,7 +39,7 @@ function riot(options) {
39
39
  const filter = getFilter(options)
40
40
 
41
41
  // drop properties not necessary for Riot compiler
42
- ;['ext', 'include', 'parsers', 'sourcemap'].forEach(key => {
42
+ ;['ext', 'include', 'parsers', 'sourcemap'].forEach((key) => {
43
43
  delete options[key];
44
44
  });
45
45
 
@@ -51,11 +51,11 @@ function riot(options) {
51
51
 
52
52
  const { code, map } = compiler.compile(src, {
53
53
  file: id,
54
- ...options
54
+ ...options,
55
55
  });
56
56
 
57
57
  return { code, map }
58
- }
58
+ },
59
59
  }
60
60
  }
61
61
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- rollup-plugin-riot v6.0.0
2
+ rollup-plugin-riot v7.0.0
3
3
  @license MIT
4
4
  */
5
5
  /*eslint-disable*/
@@ -37,7 +37,7 @@ function riot(options) {
37
37
  const filter = getFilter(options)
38
38
 
39
39
  // drop properties not necessary for Riot compiler
40
- ;['ext', 'include', 'parsers', 'sourcemap'].forEach(key => {
40
+ ;['ext', 'include', 'parsers', 'sourcemap'].forEach((key) => {
41
41
  delete options[key];
42
42
  });
43
43
 
@@ -49,12 +49,12 @@ function riot(options) {
49
49
 
50
50
  const { code, map } = compile(src, {
51
51
  file: id,
52
- ...options
52
+ ...options,
53
53
  });
54
54
 
55
55
  return { code, map }
56
- }
56
+ },
57
57
  }
58
58
  }
59
59
 
60
- export default riot;
60
+ export { riot as default };
package/package.json CHANGED
@@ -1,11 +1,16 @@
1
1
  {
2
2
  "name": "rollup-plugin-riot",
3
- "version": "6.0.0",
3
+ "version": "7.0.0",
4
+ "type": "module",
4
5
  "description": "Rollup plugin for Riot.js",
5
- "jsnext:main": "dist/rollup-plugin-riot.es6.js",
6
- "main": "dist/rollup-plugin-riot.cjs.js",
7
- "module": "dist/rollup-plugin-riot.es6.js",
6
+ "jsnext:main": "dist/rollup-plugin-riot.js",
7
+ "main": "dist/rollup-plugin-riot.cjs",
8
+ "module": "dist/rollup-plugin-riot.js",
8
9
  "source": "./src/index.js",
10
+ "exports": {
11
+ "import": "./dist/rollup-plugin-riot.js",
12
+ "require": "./dist/rollup-plugin-riot.cjs"
13
+ },
9
14
  "homepage": "https://github.com/riot/rollup-plugin-riot#readme",
10
15
  "repository": {
11
16
  "type": "git",
@@ -22,28 +27,30 @@
22
27
  "rollup-plugin"
23
28
  ],
24
29
  "peerDependencies": {
25
- "@riotjs/compiler": "^6.0.0",
30
+ "@riotjs/compiler": "^9.0.0",
26
31
  "rollup": ">=2.53.1"
27
32
  },
28
33
  "dependencies": {
29
34
  "rollup-pluginutils": "^2.8.2"
30
35
  },
31
36
  "devDependencies": {
32
- "@riotjs/compiler": "^6.0.0",
33
- "chai": "^4.3.4",
34
- "chokidar-cli": "^2.1.0",
35
- "eslint": "^7.30.0",
36
- "eslint-config-riot": "^3.0.0",
37
- "fs-extra": "^10.0.0",
38
- "mocha": "^8.4.0",
39
- "postcss": "^8.3.5",
37
+ "@riotjs/compiler": "^9.0.0-rc.2",
38
+ "@riotjs/prettier-config": "^1.0.1",
39
+ "chai": "^4.3.7",
40
+ "eslint": "^8.43.0",
41
+ "eslint-config-riot": "^4.0.0",
42
+ "fs-extra": "^11.1.1",
43
+ "mocha": "^10.2.0",
44
+ "postcss": "^8.4.24",
40
45
  "postcss-cssnext": "^3.1.0",
41
- "rollup": "^2.53.1"
46
+ "prettier": "^2.8.8",
47
+ "rollup": "^3.25.1"
42
48
  },
43
49
  "scripts": {
44
50
  "build": "rollup -c",
45
51
  "pretest": "npm run build",
46
- "test": "npm run eslint && npm run mocha",
52
+ "lint": "npm run eslint && prettier . -c",
53
+ "test": "npm run lint && npm run mocha",
47
54
  "eslint": "eslint src/*.js",
48
55
  "mocha": "mocha test/*.js",
49
56
  "watch": "chokidar 'src/*.js' -c 'npm run build'",