Skip to content

Commit c492a42

Browse files
committed
dropping legacy support
1 parent c466139 commit c492a42

File tree

2 files changed

+8
-96
lines changed

2 files changed

+8
-96
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "js-bbcode-parser",
3-
"version": "3.0.5",
3+
"version": "4.0.0",
44
"description": "Simple and efficient bbcode parser.",
55
"main": "src/simple.js",
66
"type": "module",

rollup.config.js

Lines changed: 7 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,7 @@
11
import resolve from '@rollup/plugin-node-resolve';
22
import babel from 'rollup-plugin-babel';
3-
import {terser} from "rollup-plugin-terser";
43
import clear from "rollup-plugin-clear";
5-
6-
const babelOptionsES5 = {
7-
runtimeHelpers: false,
8-
externalHelpers: false,
9-
babelrc: false,
10-
presets: [
11-
[
12-
"@babel/env",
13-
{
14-
targets: {
15-
ie: '11',
16-
edge: '17',
17-
firefox: '60',
18-
chrome: '71',
19-
safari: '11.1',
20-
},
21-
}
22-
]
23-
],
24-
plugins: [
25-
["@babel/plugin-proposal-class-properties", {loose: true}],
26-
["@babel/plugin-proposal-private-property-in-object", {loose: true}],
27-
["@babel/plugin-proposal-private-methods", { loose: true }],
28-
]
29-
};
4+
import {terser} from "rollup-plugin-terser";
305

316
const babelOptionsES2018 = {
327
runtimeHelpers: false,
@@ -35,54 +10,23 @@ const babelOptionsES2018 = {
3510
plugins: [
3611
["@babel/plugin-proposal-class-properties", {loose: true}],
3712
["@babel/plugin-proposal-private-property-in-object", {loose: true}],
38-
["@babel/plugin-proposal-private-methods", { loose: true }],
13+
["@babel/plugin-proposal-private-methods", {loose: true}],
3914
]
4015
};
4116

4217
// https://rollupjs.org/guide/en#big-list-of-options
4318
export default [
44-
// ES2015 Minified
45-
{
46-
input: './src/index.js',
47-
output: {
48-
file: './dist/parser.min.js',
49-
format: 'umd',
50-
name: 'BBCode',
51-
compact: true,
52-
sourcemap: true,
53-
},
54-
plugins: [
55-
resolve(),
56-
clear({targets: ['./dist']}),
57-
babel(babelOptionsES5),
58-
terser(),
59-
]
60-
},
61-
// ES2015 None-Minified
62-
{
63-
input: './src/index.js',
64-
output: {
65-
file: './dist/parser.js',
66-
format: 'umd',
67-
name: 'BBCode',
68-
compact: false,
69-
sourcemap: true,
70-
},
71-
plugins: [
72-
resolve(),
73-
babel(babelOptionsES5),
74-
]
75-
},
7619
// ES Modules Minified
7720
{
7821
input: './src/index.js',
7922
output: {
80-
file: './dist/parser.esm.min.js',
23+
file: './dist/parser.min.js',
8124
format: 'esm',
8225
compact: true,
8326
sourcemap: true,
8427
},
8528
plugins: [
29+
clear({targets: ['./dist']}),
8630
resolve(),
8731
babel(babelOptionsES2018),
8832
terser(),
@@ -92,7 +36,7 @@ export default [
9236
{
9337
input: './src/index.js',
9438
output: {
95-
file: './dist/parser.esm.js',
39+
file: './dist/parser.js',
9640
format: 'esm',
9741
compact: false,
9842
sourcemap: true,
@@ -102,43 +46,11 @@ export default [
10246
babel(babelOptionsES2018),
10347
]
10448
},
105-
// ES2015 Minified
106-
{
107-
input: './src/simple.js',
108-
output: {
109-
file: './dist/simple.min.js',
110-
format: 'umd',
111-
name: 'BBCode',
112-
compact: true,
113-
sourcemap: true,
114-
},
115-
plugins: [
116-
resolve(),
117-
clear({targets: ['./dist']}),
118-
babel(babelOptionsES5),
119-
terser(),
120-
]
121-
},
122-
// ES2015 None-Minified
123-
{
124-
input: './src/simple.js',
125-
output: {
126-
file: './dist/simple.js',
127-
format: 'umd',
128-
name: 'BBCode',
129-
compact: false,
130-
sourcemap: true,
131-
},
132-
plugins: [
133-
resolve(),
134-
babel(babelOptionsES5),
135-
]
136-
},
13749
// ES Modules Minified
13850
{
13951
input: './src/simple.js',
14052
output: {
141-
file: './dist/simple.esm.min.js',
53+
file: './dist/simple.min.js',
14254
format: 'esm',
14355
compact: true,
14456
sourcemap: true,
@@ -153,7 +65,7 @@ export default [
15365
{
15466
input: './src/simple.js',
15567
output: {
156-
file: './dist/simple.esm.js',
68+
file: './dist/simple.js',
15769
format: 'esm',
15870
compact: false,
15971
sourcemap: true,

0 commit comments

Comments
 (0)