@zipify/wysiwyg 1.0.0-dev.5 → 1.0.0-dev.8

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 (37) hide show
  1. package/.eslintignore +1 -0
  2. package/.stylelintignore +1 -0
  3. package/config/jest/setupTests.js +4 -0
  4. package/config/webpack/example.config.js +2 -0
  5. package/config/webpack/lib.config.js +44 -0
  6. package/config/webpack/loaders/style-loader.js +3 -1
  7. package/config/webpack/loaders/svg-loader.js +1 -1
  8. package/dist/wysiwyg.css +837 -0
  9. package/dist/wysiwyg.js +16170 -0
  10. package/dist/wysiwyg.js.LICENSE.txt +1 -0
  11. package/lib/assets/icons/alignment-center.svg +3 -0
  12. package/lib/assets/icons/alignment-justify.svg +3 -0
  13. package/lib/assets/icons/alignment-left.svg +3 -0
  14. package/lib/assets/icons/alignment-right.svg +3 -0
  15. package/lib/assets/icons/arrow.svg +3 -0
  16. package/lib/assets/icons/background-color.svg +3 -0
  17. package/lib/assets/icons/case-style.svg +3 -0
  18. package/lib/assets/icons/font-color.svg +5 -0
  19. package/lib/assets/icons/italic.svg +3 -0
  20. package/lib/assets/icons/line-height.svg +3 -0
  21. package/lib/assets/icons/list-circle.svg +3 -0
  22. package/lib/assets/icons/list-decimal.svg +3 -0
  23. package/lib/assets/icons/list-disc.svg +3 -0
  24. package/lib/assets/icons/list-latin.svg +3 -0
  25. package/lib/assets/icons/list-roman.svg +3 -0
  26. package/lib/assets/icons/list-square.svg +3 -0
  27. package/lib/assets/icons/remove-format.svg +3 -0
  28. package/lib/assets/icons/reset-styles.svg +3 -0
  29. package/lib/assets/icons/strike-through.svg +3 -0
  30. package/lib/assets/icons/superscript.svg +3 -0
  31. package/lib/assets/icons/underline.svg +3 -0
  32. package/lib/components/base/Icon.vue +17 -9
  33. package/lib/components/base/__tests__/Icon.test.js +6 -13
  34. package/lib/utils/importIcon.js +12 -0
  35. package/lib/utils/index.js +1 -0
  36. package/package.json +4 -2
  37. package/lib/assets/icons.svg +0 -69
package/.eslintignore ADDED
@@ -0,0 +1 @@
1
+ dist/**
@@ -0,0 +1 @@
1
+ dist/**
@@ -32,3 +32,7 @@ Range.prototype.getClientRects = () => ({
32
32
  length: 0,
33
33
  [Symbol.iterator]: jest.fn()
34
34
  });
35
+
36
+ jest.mock('../../lib/utils/importIcon', () => ({
37
+ importIcon: () => ''
38
+ }));
@@ -2,6 +2,7 @@ const path = require('path');
2
2
  const { DefinePlugin } = require('webpack');
3
3
  const HtmlWebpackPlugin = require('html-webpack-plugin');
4
4
  const { VueLoaderPlugin } = require('vue-loader');
5
+ const MiniCssExtractPlugin = require('mini-css-extract-plugin');
5
6
  const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
6
7
  const { resolvePath, isDevelopment } = require('./settings');
7
8
  const loaders = require('./loaders');
@@ -74,6 +75,7 @@ module.exports = {
74
75
 
75
76
  plugins: [
76
77
  new VueLoaderPlugin(),
78
+ new MiniCssExtractPlugin(),
77
79
  new HtmlWebpackPlugin({
78
80
  title: 'ZipifyWysiwyg',
79
81
  template: resolvePath('./example/example.html')
@@ -0,0 +1,44 @@
1
+ const { VueLoaderPlugin } = require('vue-loader');
2
+ const MiniCssExtractPlugin = require('mini-css-extract-plugin');
3
+ const { resolvePath } = require('./settings');
4
+ const loaders = require('./loaders');
5
+
6
+ module.exports = {
7
+ mode: 'production',
8
+ entry: resolvePath('./lib/index.js'),
9
+
10
+ output: {
11
+ clean: true,
12
+ path: resolvePath('./dist'),
13
+ filename: 'wysiwyg.js',
14
+ library: { type: 'module' },
15
+ module: true
16
+ },
17
+
18
+ resolve: {
19
+ extensions: ['*', '.js', '.vue', '.json']
20
+ },
21
+
22
+ module: {
23
+ rules: [
24
+ loaders.style,
25
+ loaders.js,
26
+ loaders.svg,
27
+ loaders.vue
28
+ ]
29
+ },
30
+
31
+ externals: {
32
+ '@vue/composition-api': { module: '@vue/composition-api' },
33
+ 'zipify-colorpicker': { module: 'zipify-colorpicker' }
34
+ },
35
+
36
+ experiments: {
37
+ outputModule: true
38
+ },
39
+
40
+ plugins: [
41
+ new VueLoaderPlugin(),
42
+ new MiniCssExtractPlugin({ filename: 'wysiwyg.css' })
43
+ ]
44
+ };
@@ -1,7 +1,9 @@
1
+ const MiniCssExtractPlugin = require('mini-css-extract-plugin');
2
+
1
3
  module.exports = {
2
4
  test: /\.s?css$/,
3
5
  use: [
4
- 'vue-style-loader',
6
+ MiniCssExtractPlugin.loader,
5
7
  'css-loader'
6
8
  ]
7
9
  };
@@ -1,4 +1,4 @@
1
1
  module.exports = {
2
2
  test: /\.svg$/,
3
- type: 'asset/resource'
3
+ type: 'asset/source'
4
4
  };