@modusoperandi/licit-vignette 0.0.16

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.
Files changed (51) hide show
  1. package/.eslintignore +4 -0
  2. package/.eslintrc.js +107 -0
  3. package/.prettierignore +6 -0
  4. package/.prettierrc +5 -0
  5. package/.stylelintignore +3 -0
  6. package/.stylelintrc.json +10 -0
  7. package/LICENSE +21 -0
  8. package/README.md +33 -0
  9. package/babel.config.json +53 -0
  10. package/dist/Constants.d.ts +6 -0
  11. package/dist/Constants.js +18 -0
  12. package/dist/CreateCommand.d.ts +7 -0
  13. package/dist/CreateCommand.js +30 -0
  14. package/dist/TableBackgroundColorCommand.d.ts +5 -0
  15. package/dist/TableBackgroundColorCommand.js +21 -0
  16. package/dist/TableBorderColorCommand.d.ts +5 -0
  17. package/dist/TableBorderColorCommand.js +21 -0
  18. package/dist/VignetteCommand.d.ts +12 -0
  19. package/dist/VignetteCommand.js +104 -0
  20. package/dist/VignetteMenuPlugin.d.ts +19 -0
  21. package/dist/VignetteMenuPlugin.js +120 -0
  22. package/dist/VignetteNodeSpec.d.ts +34 -0
  23. package/dist/VignetteNodeSpec.js +83 -0
  24. package/dist/VignettePlugin.d.ts +12 -0
  25. package/dist/VignettePlugin.js +49 -0
  26. package/dist/VignettePlugins.d.ts +4 -0
  27. package/dist/VignettePlugins.js +11 -0
  28. package/dist/index.d.ts +2 -0
  29. package/dist/index.js +13 -0
  30. package/dist/index.test.js +48 -0
  31. package/dist/ui/TableColorCommand.d.ts +14 -0
  32. package/dist/ui/TableColorCommand.js +64 -0
  33. package/jest.config.ts +208 -0
  34. package/jest.setup.js +2 -0
  35. package/lint.sh +4 -0
  36. package/package.json +132 -0
  37. package/sonar-project.properties +11 -0
  38. package/src/Constants.ts +6 -0
  39. package/src/CreateCommand.ts +38 -0
  40. package/src/TableBackgroundColorCommand.ts +9 -0
  41. package/src/TableBorderColorCommand.ts +9 -0
  42. package/src/VignetteCommand.ts +103 -0
  43. package/src/VignetteMenuPlugin.ts +151 -0
  44. package/src/VignetteNodeSpec.ts +74 -0
  45. package/src/VignettePlugin.ts +53 -0
  46. package/src/VignettePlugins.ts +7 -0
  47. package/src/index.test.ts +59 -0
  48. package/src/index.ts +3 -0
  49. package/src/ui/TableColorCommand.tsx +79 -0
  50. package/tsconfig.json +38 -0
  51. package/webpack.config.js +89 -0
@@ -0,0 +1,89 @@
1
+ /* eslint-disable */
2
+
3
+ var webpack = require('webpack'),
4
+ TerserPlugin = require('terser-webpack-plugin'),
5
+ WriteFilePlugin = require('write-file-webpack-plugin'),
6
+ path = require('path');
7
+
8
+ const {CleanWebpackPlugin} = require('clean-webpack-plugin');
9
+
10
+ const NODE_ENV = process.env.NODE_ENV || 'production';
11
+
12
+ var isDev = 'development' === NODE_ENV || 0;
13
+
14
+ var options = {
15
+ mode: NODE_ENV,
16
+ entry: {
17
+ index: path.join(__dirname, 'src', 'index.ts'),
18
+ },
19
+ output: {
20
+ path: path.join(__dirname, 'bin'),
21
+ filename: '[name].bundle.js',
22
+ },
23
+ module: {
24
+ rules: [
25
+ {
26
+ test: /\.(ts|tsx)$/,
27
+ exclude: /node_modules/,
28
+ loader: 'babel-loader',
29
+ },
30
+ {
31
+ test: /\.(woff(2)?|ttf|otf|eot|svg)(\?v=\d+\.\d+\.\d+)?$/,
32
+ use: [
33
+ {
34
+ loader: 'file-loader',
35
+ options: {
36
+ name: '[name].[ext]',
37
+ outputPath: 'fonts/',
38
+ },
39
+ },
40
+ ],
41
+ },
42
+ {
43
+ test: /\.css$/,
44
+ use: ['style-loader', 'css-loader'],
45
+ },
46
+ {
47
+ test: /\.(jpe?g|png|gif|svg)$/i,
48
+ loader: 'file-loader',
49
+ },
50
+ ],
51
+ },
52
+ resolve: {
53
+ alias: {},
54
+ extensions: ['.tsx', '.ts', '.js', '.json'],
55
+ },
56
+ plugins: [
57
+ // clean the web folder
58
+ new CleanWebpackPlugin(),
59
+ // expose and write the allowed env vars on the compiled bundle
60
+ new webpack.DefinePlugin({
61
+ 'process.env.NODE_ENV': JSON.stringify(NODE_ENV),
62
+ }),
63
+ new WriteFilePlugin(),
64
+ ],
65
+ };
66
+
67
+ if (isDev) {
68
+ options.devtool = 'source-map';
69
+ } else {
70
+ options.optimization = {
71
+ minimize: true,
72
+ minimizer: [new TerserPlugin()],
73
+ };
74
+ }
75
+
76
+ options.plugins.push(function () {
77
+ this.hooks.done.tapAsync('done', function (stats, callback) {
78
+ if (0 < stats.compilation.errors.length) {
79
+ console.log('\x1b[31m%s\x1b[0m', stats.compilation.errors);
80
+ // to error out and discontinue any sequential scripts.
81
+ process.exit(1);
82
+ } else {
83
+ callback();
84
+ process.exit(0);
85
+ }
86
+ });
87
+ });
88
+
89
+ module.exports = options;