simple-keyboard 3.3.27 → 3.4.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.
@@ -1,78 +1,78 @@
1
- /**
2
- * Config to support modern browsers only (build/index.modern.js)
3
- */
4
- const path = require('path');
5
- const webpack = require('webpack');
6
- const TerserPlugin = require('terser-webpack-plugin');
7
- const getPackageJson = require('./scripts/getPackageJson');
8
-
9
- const {
10
- version,
11
- name,
12
- license,
13
- repository,
14
- author,
15
- } = getPackageJson('version', 'name', 'license', 'repository', 'author');
16
-
17
- const banner = `
18
- ${name} v${version} (index.modern.js - Modern Browsers bundle)
19
- ${repository.url}
20
-
21
- NOTE: This modern browsers bundle (index.modern.js) removes all polyfills
22
- included in the standard version. Use this if you are supporting
23
- modern browsers only. Otherwise, use the standard version (index.js).
24
-
25
- Copyright (c) ${author.replace(/ *<[^)]*> */g, " ")} and project contributors.
26
-
27
- This source code is licensed under the ${license} license found in the
28
- LICENSE file in the root directory of this source tree.
29
- `;
30
-
31
- module.exports = {
32
- mode: "production",
33
- entry: './src/lib/index.modern.ts',
34
- target: 'es5',
35
- output: {
36
- filename: 'index.modern.js',
37
- path: path.resolve(__dirname, 'build'),
38
- library: "SimpleKeyboard",
39
- libraryTarget: 'umd',
40
- globalObject: 'this'
41
- },
42
- optimization: {
43
- minimize: true,
44
- minimizer: [
45
- new TerserPlugin({ extractComments: false }),
46
- ],
47
- },
48
- module: {
49
- rules: [
50
- {
51
- test: /\.m?(j|t)s$/,
52
- exclude: /(node_modules|bower_components)/,
53
- use: {
54
- loader: 'babel-loader',
55
- options: {
56
- presets: [
57
- ["@babel/env"]
58
- ],
59
- plugins: [
60
- ["@babel/plugin-proposal-class-properties"],
61
- ["@babel/plugin-transform-typescript"]
62
- ]
63
- }
64
- }
65
- },
66
- {
67
- test: /\.(sa|sc|c)ss$/,
68
- use: path.resolve('scripts/loaderMock.js')
69
- }
70
- ]
71
- },
72
- plugins: [
73
- new webpack.BannerPlugin(banner)
74
- ],
75
- resolve: {
76
- extensions: ['.ts', '.js', '.json']
77
- }
1
+ /**
2
+ * Config to support modern browsers only (build/index.modern.js)
3
+ */
4
+ const path = require('path');
5
+ const webpack = require('webpack');
6
+ const TerserPlugin = require('terser-webpack-plugin');
7
+ const getPackageJson = require('./scripts/getPackageJson');
8
+
9
+ const {
10
+ version,
11
+ name,
12
+ license,
13
+ repository,
14
+ author,
15
+ } = getPackageJson('version', 'name', 'license', 'repository', 'author');
16
+
17
+ const banner = `
18
+ ${name} v${version} (index.modern.js - Modern Browsers bundle)
19
+ ${repository.url}
20
+
21
+ NOTE: This modern browsers bundle (index.modern.js) removes all polyfills
22
+ included in the standard version. Use this if you are supporting
23
+ modern browsers only. Otherwise, use the standard version (index.js).
24
+
25
+ Copyright (c) ${author.replace(/ *<[^)]*> */g, " ")} and project contributors.
26
+
27
+ This source code is licensed under the ${license} license found in the
28
+ LICENSE file in the root directory of this source tree.
29
+ `;
30
+
31
+ module.exports = {
32
+ mode: "production",
33
+ entry: './src/lib/index.modern.ts',
34
+ target: 'es5',
35
+ output: {
36
+ filename: 'index.modern.js',
37
+ path: path.resolve(__dirname, 'build'),
38
+ library: "SimpleKeyboard",
39
+ libraryTarget: 'umd',
40
+ globalObject: 'this'
41
+ },
42
+ optimization: {
43
+ minimize: true,
44
+ minimizer: [
45
+ new TerserPlugin({ extractComments: false }),
46
+ ],
47
+ },
48
+ module: {
49
+ rules: [
50
+ {
51
+ test: /\.m?(j|t)s$/,
52
+ exclude: /(node_modules|bower_components)/,
53
+ use: {
54
+ loader: 'babel-loader',
55
+ options: {
56
+ presets: [
57
+ ["@babel/env"]
58
+ ],
59
+ plugins: [
60
+ ["@babel/plugin-proposal-class-properties"],
61
+ ["@babel/plugin-transform-typescript"]
62
+ ]
63
+ }
64
+ }
65
+ },
66
+ {
67
+ test: /\.(sa|sc|c)ss$/,
68
+ use: path.resolve('scripts/loaderMock.js')
69
+ }
70
+ ]
71
+ },
72
+ plugins: [
73
+ new webpack.BannerPlugin(banner)
74
+ ],
75
+ resolve: {
76
+ extensions: ['.ts', '.js', '.json']
77
+ }
78
78
  };