rollup-plugin-riot 6.0.0 → 9.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
|
|
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
|
|
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-
|
|
61
|
-
[
|
|
62
|
-
|
|
63
|
-
[
|
|
64
|
-
[
|
|
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,8 +1,4 @@
|
|
|
1
|
-
/*
|
|
2
|
-
rollup-plugin-riot v6.0.0
|
|
3
|
-
@license MIT
|
|
4
|
-
*/
|
|
5
|
-
/*eslint-disable*/
|
|
1
|
+
/* Rollup Riot.js Plugin, @license MIT */
|
|
6
2
|
'use strict';
|
|
7
3
|
|
|
8
4
|
var compiler = require('@riotjs/compiler');
|
|
@@ -39,7 +35,7 @@ function riot(options) {
|
|
|
39
35
|
const filter = getFilter(options)
|
|
40
36
|
|
|
41
37
|
// drop properties not necessary for Riot compiler
|
|
42
|
-
;['ext', 'include', 'parsers', 'sourcemap'].forEach(key => {
|
|
38
|
+
;['ext', 'include', 'parsers', 'sourcemap'].forEach((key) => {
|
|
43
39
|
delete options[key];
|
|
44
40
|
});
|
|
45
41
|
|
|
@@ -51,11 +47,11 @@ function riot(options) {
|
|
|
51
47
|
|
|
52
48
|
const { code, map } = compiler.compile(src, {
|
|
53
49
|
file: id,
|
|
54
|
-
...options
|
|
50
|
+
...options,
|
|
55
51
|
});
|
|
56
52
|
|
|
57
53
|
return { code, map }
|
|
58
|
-
}
|
|
54
|
+
},
|
|
59
55
|
}
|
|
60
56
|
}
|
|
61
57
|
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
/*
|
|
2
|
-
rollup-plugin-riot v6.0.0
|
|
3
|
-
@license MIT
|
|
4
|
-
*/
|
|
5
|
-
/*eslint-disable*/
|
|
1
|
+
/* Rollup Riot.js Plugin, @license MIT */
|
|
6
2
|
import { compile } from '@riotjs/compiler';
|
|
7
3
|
import { createFilter } from 'rollup-pluginutils';
|
|
8
4
|
|
|
@@ -37,7 +33,7 @@ function riot(options) {
|
|
|
37
33
|
const filter = getFilter(options)
|
|
38
34
|
|
|
39
35
|
// drop properties not necessary for Riot compiler
|
|
40
|
-
;['ext', 'include', 'parsers', 'sourcemap'].forEach(key => {
|
|
36
|
+
;['ext', 'include', 'parsers', 'sourcemap'].forEach((key) => {
|
|
41
37
|
delete options[key];
|
|
42
38
|
});
|
|
43
39
|
|
|
@@ -49,12 +45,12 @@ function riot(options) {
|
|
|
49
45
|
|
|
50
46
|
const { code, map } = compile(src, {
|
|
51
47
|
file: id,
|
|
52
|
-
...options
|
|
48
|
+
...options,
|
|
53
49
|
});
|
|
54
50
|
|
|
55
51
|
return { code, map }
|
|
56
|
-
}
|
|
52
|
+
},
|
|
57
53
|
}
|
|
58
54
|
}
|
|
59
55
|
|
|
60
|
-
export default
|
|
56
|
+
export { riot as default };
|
package/package.json
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rollup-plugin-riot",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.0",
|
|
4
|
+
"type": "module",
|
|
4
5
|
"description": "Rollup plugin for Riot.js",
|
|
5
|
-
"jsnext:main": "dist/rollup-plugin-riot.
|
|
6
|
-
"main": "dist/rollup-plugin-riot.cjs
|
|
7
|
-
"module": "dist/rollup-plugin-riot.
|
|
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": "
|
|
30
|
+
"@riotjs/compiler": ">=7.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": "^
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"eslint": "^
|
|
36
|
-
"eslint-config-riot": "^
|
|
37
|
-
"fs-extra": "^
|
|
38
|
-
"mocha": "^
|
|
39
|
-
"postcss": "^8.
|
|
37
|
+
"@riotjs/compiler": "^9.0.3",
|
|
38
|
+
"@riotjs/prettier-config": "^1.1.0",
|
|
39
|
+
"chai": "^4.3.7",
|
|
40
|
+
"eslint": "^8.46.0",
|
|
41
|
+
"eslint-config-riot": "^4.1.0",
|
|
42
|
+
"fs-extra": "^11.1.1",
|
|
43
|
+
"mocha": "^10.2.0",
|
|
44
|
+
"postcss": "^8.4.27",
|
|
40
45
|
"postcss-cssnext": "^3.1.0",
|
|
41
|
-
"
|
|
46
|
+
"prettier": "^3.0.1",
|
|
47
|
+
"rollup": "^3.27.1"
|
|
42
48
|
},
|
|
43
49
|
"scripts": {
|
|
44
50
|
"build": "rollup -c",
|
|
45
51
|
"pretest": "npm run build",
|
|
46
|
-
"
|
|
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'",
|