rollup-plugin-riot 5.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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Rollup Plugin for Riot
|
|
2
2
|
|
|
3
|
-
[![Build Status][
|
|
3
|
+
[![Build Status][ci-image]][ci-url]
|
|
4
4
|
[![NPM version][npm-version-image]][npm-url]
|
|
5
5
|
[![NPM downloads][npm-downloads-image]][npm-url]
|
|
6
6
|
[![MIT License][license-image]][license-url]
|
|
@@ -17,16 +17,16 @@ If you are using Riot.js < 4.0.0 please check the [v3 branch](https://github.com
|
|
|
17
17
|
npm install rollup-plugin-riot @riotjs/compiler -D
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
-
Requires @riotjs/compiler
|
|
20
|
+
Requires @riotjs/compiler > 4.x.x and Rollup v1.x.x or above.
|
|
21
21
|
|
|
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,19 +35,18 @@ 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
|
|
|
49
49
|
- `ext`: extension of tag file (default is 'riot')
|
|
50
|
-
- `skip`: `exclude` on Riot API. Ex. `html`, `css` or `js`
|
|
51
50
|
- `include`: a [minimatch](https://www.npmjs.com/package/minimatch) pattern for including files.
|
|
52
51
|
- `exclude`: a minimatch pattern for excluding files.
|
|
53
52
|
|
|
@@ -57,12 +56,10 @@ And other options of `@riotjs/compiler` could be used.
|
|
|
57
56
|
|
|
58
57
|
- https://github.com/riot/examples/tree/gh-pages/rollup
|
|
59
58
|
|
|
60
|
-
[
|
|
61
|
-
[
|
|
62
|
-
|
|
63
|
-
[license-
|
|
64
|
-
[
|
|
65
|
-
|
|
66
|
-
[npm-
|
|
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
|
|
2
|
+
rollup-plugin-riot v7.0.0
|
|
3
3
|
@license MIT
|
|
4
4
|
*/
|
|
5
5
|
/*eslint-disable*/
|
|
@@ -36,17 +36,12 @@ function riot(options) {
|
|
|
36
36
|
// clone options
|
|
37
37
|
options = Object.assign({}, options);
|
|
38
38
|
|
|
39
|
-
const filter = getFilter(options)
|
|
39
|
+
const filter = getFilter(options)
|
|
40
40
|
|
|
41
|
-
//
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
delete options.ext;
|
|
46
|
-
delete options.include;
|
|
47
|
-
delete options.skip;
|
|
48
|
-
delete options.parsers;
|
|
49
|
-
delete options.sourcemap;
|
|
41
|
+
// drop properties not necessary for Riot compiler
|
|
42
|
+
;['ext', 'include', 'parsers', 'sourcemap'].forEach((key) => {
|
|
43
|
+
delete options[key];
|
|
44
|
+
});
|
|
50
45
|
|
|
51
46
|
return {
|
|
52
47
|
transform(src, id) {
|
|
@@ -56,11 +51,11 @@ function riot(options) {
|
|
|
56
51
|
|
|
57
52
|
const { code, map } = compiler.compile(src, {
|
|
58
53
|
file: id,
|
|
59
|
-
...options
|
|
54
|
+
...options,
|
|
60
55
|
});
|
|
61
56
|
|
|
62
57
|
return { code, map }
|
|
63
|
-
}
|
|
58
|
+
},
|
|
64
59
|
}
|
|
65
60
|
}
|
|
66
61
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
rollup-plugin-riot
|
|
2
|
+
rollup-plugin-riot v7.0.0
|
|
3
3
|
@license MIT
|
|
4
4
|
*/
|
|
5
5
|
/*eslint-disable*/
|
|
@@ -34,17 +34,12 @@ function riot(options) {
|
|
|
34
34
|
// clone options
|
|
35
35
|
options = Object.assign({}, options);
|
|
36
36
|
|
|
37
|
-
const filter = getFilter(options)
|
|
37
|
+
const filter = getFilter(options)
|
|
38
38
|
|
|
39
|
-
//
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
delete options.ext;
|
|
44
|
-
delete options.include;
|
|
45
|
-
delete options.skip;
|
|
46
|
-
delete options.parsers;
|
|
47
|
-
delete options.sourcemap;
|
|
39
|
+
// drop properties not necessary for Riot compiler
|
|
40
|
+
;['ext', 'include', 'parsers', 'sourcemap'].forEach((key) => {
|
|
41
|
+
delete options[key];
|
|
42
|
+
});
|
|
48
43
|
|
|
49
44
|
return {
|
|
50
45
|
transform(src, id) {
|
|
@@ -54,12 +49,12 @@ function riot(options) {
|
|
|
54
49
|
|
|
55
50
|
const { code, map } = compile(src, {
|
|
56
51
|
file: id,
|
|
57
|
-
...options
|
|
52
|
+
...options,
|
|
58
53
|
});
|
|
59
54
|
|
|
60
55
|
return { code, map }
|
|
61
|
-
}
|
|
56
|
+
},
|
|
62
57
|
}
|
|
63
58
|
}
|
|
64
59
|
|
|
65
|
-
export default
|
|
60
|
+
export { riot as default };
|
package/package.json
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rollup-plugin-riot",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.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",
|
|
@@ -14,7 +19,7 @@
|
|
|
14
19
|
"files": [
|
|
15
20
|
"dist/"
|
|
16
21
|
],
|
|
17
|
-
"author": "
|
|
22
|
+
"author": "Gianluca Guarini <gianluca.guarini@gmail.com> (http://gianlucaguarini.com)",
|
|
18
23
|
"license": "MIT",
|
|
19
24
|
"bugs": "https://github.com/riot/rollup-plugin-riot/issues",
|
|
20
25
|
"keywords": [
|
|
@@ -22,28 +27,30 @@
|
|
|
22
27
|
"rollup-plugin"
|
|
23
28
|
],
|
|
24
29
|
"peerDependencies": {
|
|
25
|
-
"@riotjs/compiler": "^
|
|
26
|
-
"rollup": ">=2.
|
|
30
|
+
"@riotjs/compiler": "^9.0.0",
|
|
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.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
|
-
"
|
|
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
|
-
"
|
|
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'",
|
package/CHANGELOG.md
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
# rollup-plugin-riot
|
|
2
|
-
|
|
3
|
-
## [4.0.0]
|
|
4
|
-
|
|
5
|
-
- Stable release using the latest `@riotjs/compiler@4`
|
|
6
|
-
|
|
7
|
-
## [4.0.0-beta.1]
|
|
8
|
-
|
|
9
|
-
- Update dependencies and the riot compiler
|
|
10
|
-
|
|
11
|
-
## [4.0.0-alpha.1]
|
|
12
|
-
|
|
13
|
-
- Update the riot compiler@4
|
|
14
|
-
- Prepare the initial setup for riot@4
|
|
15
|
-
|
|
16
|
-
## \[2.1.0]
|
|
17
|
-
|
|
18
|
-
### Changed
|
|
19
|
-
|
|
20
|
-
- Make test compatible w/node 5.
|
|
21
|
-
- Update devDependencies.
|
|
22
|
-
- riot-compiler 3.5.2 and Rollup 0.56 as peerDependency.
|
|
23
|
-
|
|
24
|
-
### Fixed
|
|
25
|
-
|
|
26
|
-
- Linting errors.
|
|
27
|
-
|
|
28
|
-
### Removed
|
|
29
|
-
|
|
30
|
-
- Bublé, this plugin is for NodeJS.
|