@hxa-rn/react-native-gcanvas 6.0.24-beta.1 → 6.0.26

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 (86) hide show
  1. package/CHANGELOG.md +2 -2
  2. package/LICENSE +203 -21
  3. package/README.md +207 -207
  4. package/harmony/gcanvas/LICENSE +203 -21
  5. package/harmony/gcanvas/NOTICE +32 -32
  6. package/harmony/gcanvas/OAT.xml +37 -37
  7. package/harmony/gcanvas/build-profile.json5 +16 -16
  8. package/harmony/gcanvas/hvigorfile.ts +1 -1
  9. package/harmony/gcanvas/index.ets +1 -1
  10. package/harmony/gcanvas/oh-package.json5 +14 -14
  11. package/harmony/gcanvas/src/main/cpp/CMakeLists.txt +126 -126
  12. package/harmony/gcanvas/src/main/cpp/GCanvasNapi.cpp +485 -485
  13. package/harmony/gcanvas/src/main/cpp/GCanvasXComponent.cpp +106 -106
  14. package/harmony/gcanvas/src/main/cpp/GcanvasPackage.h +24 -24
  15. package/harmony/gcanvas/src/main/ets/GCanvasModuleTurboModule.ts +448 -448
  16. package/harmony/gcanvas/src/main/ets/GCanvasNativeEngine.ts +206 -206
  17. package/harmony/gcanvas/src/main/ets/components/GCanvasView.ets +64 -64
  18. package/harmony/gcanvas/src/main/module.json5 +21 -21
  19. package/harmony/gcanvas/src/main/resources/base/element/string.json +12 -12
  20. package/harmony/gcanvas/src/main/resources/en_US/element/string.json +8 -8
  21. package/harmony/gcanvas/src/main/resources/zh_CN/element/string.json +12 -12
  22. package/harmony/gcanvas.har +0 -0
  23. package/package.json +4 -4
  24. package/packages/gcanvas/.babelrc +4 -4
  25. package/packages/gcanvas/.eslintrc.js +133 -133
  26. package/packages/gcanvas/package.json +19 -19
  27. package/packages/gcanvas/rollup.config.js +13 -13
  28. package/packages/gcanvas/src/bridge/react-native.js +286 -286
  29. package/packages/gcanvas/src/bridge/weex.js +210 -210
  30. package/packages/gcanvas/src/context/2d/FillStyleLinearGradient.js +16 -16
  31. package/packages/gcanvas/src/context/2d/FillStylePattern.js +7 -7
  32. package/packages/gcanvas/src/context/2d/FillStyleRadialGradient.js +16 -16
  33. package/packages/gcanvas/src/context/2d/OffScreenRenderingContext.js +48 -48
  34. package/packages/gcanvas/src/context/2d/RenderingContext.js +787 -787
  35. package/packages/gcanvas/src/context/webgl/ActiveInfo.js +10 -10
  36. package/packages/gcanvas/src/context/webgl/Buffer.js +20 -20
  37. package/packages/gcanvas/src/context/webgl/Framebuffer.js +20 -20
  38. package/packages/gcanvas/src/context/webgl/GLenum.js +300 -300
  39. package/packages/gcanvas/src/context/webgl/GLmethod.js +141 -141
  40. package/packages/gcanvas/src/context/webgl/GLtype.js +22 -22
  41. package/packages/gcanvas/src/context/webgl/Program.js +20 -20
  42. package/packages/gcanvas/src/context/webgl/Renderbuffer.js +20 -20
  43. package/packages/gcanvas/src/context/webgl/RenderingContext.js +1479 -1479
  44. package/packages/gcanvas/src/context/webgl/Shader.js +21 -21
  45. package/packages/gcanvas/src/context/webgl/ShaderPrecisionFormat.js +10 -10
  46. package/packages/gcanvas/src/context/webgl/Texture.js +21 -21
  47. package/packages/gcanvas/src/context/webgl/UniformLocation.js +21 -21
  48. package/packages/gcanvas/src/context/webgl/classUtils.js +2 -2
  49. package/packages/gcanvas/src/env/canvas.js +210 -210
  50. package/packages/gcanvas/src/env/image.js +76 -76
  51. package/packages/gcanvas/src/env/off-screen-canvas.js +74 -74
  52. package/packages/gcanvas/src/index.js +56 -56
  53. package/src/components/CanvasView.js +20 -20
  54. package/src/components/GCanvasComponent.js +408 -408
  55. package/src/index.js +69 -69
  56. package/src/packages/gcanvas/.babelrc +4 -4
  57. package/src/packages/gcanvas/.eslintrc.js +133 -133
  58. package/src/packages/gcanvas/package.json +19 -19
  59. package/src/packages/gcanvas/rollup.config.js +13 -13
  60. package/src/packages/gcanvas/src/bridge/react-native.js +288 -288
  61. package/src/packages/gcanvas/src/bridge/weex.js +210 -210
  62. package/src/packages/gcanvas/src/context/2d/FillStyleLinearGradient.js +16 -16
  63. package/src/packages/gcanvas/src/context/2d/FillStylePattern.js +7 -7
  64. package/src/packages/gcanvas/src/context/2d/FillStyleRadialGradient.js +16 -16
  65. package/src/packages/gcanvas/src/context/2d/OffScreenRenderingContext.js +48 -48
  66. package/src/packages/gcanvas/src/context/2d/RenderingContext.js +801 -801
  67. package/src/packages/gcanvas/src/context/webgl/ActiveInfo.js +10 -10
  68. package/src/packages/gcanvas/src/context/webgl/Buffer.js +20 -20
  69. package/src/packages/gcanvas/src/context/webgl/Framebuffer.js +20 -20
  70. package/src/packages/gcanvas/src/context/webgl/GLenum.js +300 -300
  71. package/src/packages/gcanvas/src/context/webgl/GLmethod.js +141 -141
  72. package/src/packages/gcanvas/src/context/webgl/GLtype.js +22 -22
  73. package/src/packages/gcanvas/src/context/webgl/Program.js +20 -20
  74. package/src/packages/gcanvas/src/context/webgl/Renderbuffer.js +20 -20
  75. package/src/packages/gcanvas/src/context/webgl/RenderingContext.js +1479 -1479
  76. package/src/packages/gcanvas/src/context/webgl/Shader.js +21 -21
  77. package/src/packages/gcanvas/src/context/webgl/ShaderPrecisionFormat.js +10 -10
  78. package/src/packages/gcanvas/src/context/webgl/Texture.js +21 -21
  79. package/src/packages/gcanvas/src/context/webgl/UniformLocation.js +21 -21
  80. package/src/packages/gcanvas/src/context/webgl/classUtils.js +2 -2
  81. package/src/packages/gcanvas/src/env/canvas.js +210 -210
  82. package/src/packages/gcanvas/src/env/image.js +76 -76
  83. package/src/packages/gcanvas/src/env/off-screen-canvas.js +74 -74
  84. package/src/packages/gcanvas/src/index.js +56 -56
  85. package/src/specs/v1/GCanvasViewNativeComponent.ts +42 -42
  86. package/src/specs/v1/NativeGCanvasModule.ts +140 -140
package/src/index.js CHANGED
@@ -1,69 +1,69 @@
1
- import {Platform} from 'react-native';
2
- import GCanvasView from './components/GCanvasComponent';
3
- import GImage from './packages/gcanvas/src/env/image';
4
- import {ReactNativeBridge} from './packages/gcanvas';
5
-
6
- const createCanvas = (width, height) => {
7
- const canvas = document.createElement('canvas');
8
-
9
- canvas.width = width;
10
- canvas.height = height;
11
- return canvas;
12
- };
13
-
14
- const getFontNames = () => {
15
- return ReactNativeBridge.GCanvasModule ? ReactNativeBridge.GCanvasModule.getFontNames() : [];
16
- }
17
-
18
- let extraFontLocation = null;
19
-
20
- const setExtraFontLocation = (location) => {
21
- if (Platform.OS === 'android' || Platform.OS === 'harmony') {
22
- const fontLocation = location.endsWith('/') ? location : `${location}/`;
23
- if ('/system/fonts/' === fontLocation) {
24
- // SYSTEM_FONT_LOCATION = "/system/fonts/" in
25
- // android/gcanvas_library/src/main/java/com/taobao/gcanvas/GFontConfigParser.java
26
- // so just return here if e.g. registerFont('/system/fonts/NotoSansThai-Regular.ttf')
27
- return;
28
- }
29
- if (extraFontLocation !== fontLocation) {
30
- ReactNativeBridge.GCanvasModule.setExtraFontLocation(fontLocation);
31
- extraFontLocation = fontLocation;
32
- }
33
- }
34
- };
35
-
36
- /**
37
- * Register a custom font on Android, so that can `ctx.font = `, and can be included in the return of getFontNames().
38
- *
39
- * Ref to <https://mehrankhandev.medium.com/ultimate-guide-to-use-custom-fonts-in-react-native-77fcdf859cf4>
40
- * and <https://github.com/callstack/react-native-paper/blob/291d9a90ea2bf2d9a3416170a9a3a1791cf051b0/docs/docs/guides/04-fonts.md?plain=1#L32>
41
- * to also reuse custom fonts in React `<Text/>`, need rename font file name, maybe
42
- * <https://gist.github.com/keighl/5434540> can do the rename work.
43
- *
44
- * @param src {string} Path to font file, e.g. `${RNFS.ExternalDirectoryPath}/fonts/KaiTi.ttf`
45
- * @param fontFace {{
46
- * family?: string, // fontName that getFontNames() will return, if undefined, fontName will be font file name e.g. `KaiTi`
47
- * weight?: string, // useless
48
- * style?: string, // useless
49
- * }} Object, can be undefined
50
- */
51
- const registerFont = (src, fontFace) => {
52
- if (Platform.OS === 'android' || Platform.OS === 'harmony') {
53
- const fontFile = src.substring(src.lastIndexOf('/') + 1);
54
- const fontLocation = src.substring(0, src.lastIndexOf('/') + 1);
55
- setExtraFontLocation(fontLocation);
56
-
57
- const fontFileName = fontFile.includes('.') ? fontFile.substring(0, fontFile.lastIndexOf('.')) : fontFile;
58
- const fontName = fontFace && fontFace.family ? fontFace.family : fontFileName;
59
- ReactNativeBridge.GCanvasModule.addFontFamily([fontName], [fontFile]);
60
- }
61
- }
62
-
63
- export {
64
- GCanvasView,
65
- GImage,
66
- createCanvas,
67
- getFontNames,
68
- registerFont,
69
- }
1
+ import {Platform} from 'react-native';
2
+ import GCanvasView from './components/GCanvasComponent';
3
+ import GImage from './packages/gcanvas/src/env/image';
4
+ import {ReactNativeBridge} from './packages/gcanvas';
5
+
6
+ const createCanvas = (width, height) => {
7
+ const canvas = document.createElement('canvas');
8
+
9
+ canvas.width = width;
10
+ canvas.height = height;
11
+ return canvas;
12
+ };
13
+
14
+ const getFontNames = () => {
15
+ return ReactNativeBridge.GCanvasModule ? ReactNativeBridge.GCanvasModule.getFontNames() : [];
16
+ }
17
+
18
+ let extraFontLocation = null;
19
+
20
+ const setExtraFontLocation = (location) => {
21
+ if (Platform.OS === 'android' || Platform.OS === 'harmony') {
22
+ const fontLocation = location.endsWith('/') ? location : `${location}/`;
23
+ if ('/system/fonts/' === fontLocation) {
24
+ // SYSTEM_FONT_LOCATION = "/system/fonts/" in
25
+ // android/gcanvas_library/src/main/java/com/taobao/gcanvas/GFontConfigParser.java
26
+ // so just return here if e.g. registerFont('/system/fonts/NotoSansThai-Regular.ttf')
27
+ return;
28
+ }
29
+ if (extraFontLocation !== fontLocation) {
30
+ ReactNativeBridge.GCanvasModule.setExtraFontLocation(fontLocation);
31
+ extraFontLocation = fontLocation;
32
+ }
33
+ }
34
+ };
35
+
36
+ /**
37
+ * Register a custom font on Android, so that can `ctx.font = `, and can be included in the return of getFontNames().
38
+ *
39
+ * Ref to <https://mehrankhandev.medium.com/ultimate-guide-to-use-custom-fonts-in-react-native-77fcdf859cf4>
40
+ * and <https://github.com/callstack/react-native-paper/blob/291d9a90ea2bf2d9a3416170a9a3a1791cf051b0/docs/docs/guides/04-fonts.md?plain=1#L32>
41
+ * to also reuse custom fonts in React `<Text/>`, need rename font file name, maybe
42
+ * <https://gist.github.com/keighl/5434540> can do the rename work.
43
+ *
44
+ * @param src {string} Path to font file, e.g. `${RNFS.ExternalDirectoryPath}/fonts/KaiTi.ttf`
45
+ * @param fontFace {{
46
+ * family?: string, // fontName that getFontNames() will return, if undefined, fontName will be font file name e.g. `KaiTi`
47
+ * weight?: string, // useless
48
+ * style?: string, // useless
49
+ * }} Object, can be undefined
50
+ */
51
+ const registerFont = (src, fontFace) => {
52
+ if (Platform.OS === 'android' || Platform.OS === 'harmony') {
53
+ const fontFile = src.substring(src.lastIndexOf('/') + 1);
54
+ const fontLocation = src.substring(0, src.lastIndexOf('/') + 1);
55
+ setExtraFontLocation(fontLocation);
56
+
57
+ const fontFileName = fontFile.includes('.') ? fontFile.substring(0, fontFile.lastIndexOf('.')) : fontFile;
58
+ const fontName = fontFace && fontFace.family ? fontFace.family : fontFileName;
59
+ ReactNativeBridge.GCanvasModule.addFontFamily([fontName], [fontFile]);
60
+ }
61
+ }
62
+
63
+ export {
64
+ GCanvasView,
65
+ GImage,
66
+ createCanvas,
67
+ getFontNames,
68
+ registerFont,
69
+ }
@@ -1,5 +1,5 @@
1
- {
2
- "plugins": [
3
- "@babel/plugin-proposal-class-properties"
4
- ]
1
+ {
2
+ "plugins": [
3
+ "@babel/plugin-proposal-class-properties"
4
+ ]
5
5
  }
@@ -1,133 +1,133 @@
1
- module.exports = {
2
- 'root': true,
3
- 'parser': 'babel-eslint',
4
- 'env': {
5
- 'browser': true,
6
- 'node': true,
7
- 'es6': true,
8
- 'jest': true,
9
- 'commonjs': true
10
- },
11
- 'parserOptions': {
12
- 'sourceType': 'module',
13
- 'ecmaVersion': 6,
14
- 'ecmaFeatures': {
15
- 'generators': true,
16
- 'experimentalObjectRestSpread': true
17
- }
18
- },
19
- 'globals': {
20
- '__weex_data__': true,
21
- '__weex_options__': true,
22
- '__weex_downgrade__': true,
23
- '__weex_define__': true,
24
- '__weex_require__': true,
25
- 'WXEnvironment': true,
26
- 'weex': true,
27
- 'callGCanvasLinkNative': true
28
- },
29
- 'rules': {
30
- 'max-len': 'off',
31
- // ES6
32
- 'prefer-const': 'off',
33
- 'no-const-assign': 'error',
34
- 'no-class-assign': 'error',
35
- 'no-dupe-class-members': 'error',
36
- 'rest-spread-spacing': 'error',
37
- 'no-duplicate-imports': 'error',
38
- 'no-useless-rename': 'error',
39
- 'arrow-spacing': 'error',
40
- 'no-useless-computed-key': 'error',
41
- 'template-curly-spacing': 'error',
42
- 'generator-star-spacing': ['error', {'before': false, 'after': true}],
43
- 'yield-star-spacing': ['error', {'before': false, 'after': true}],
44
- 'strict': ['off', 'global'],
45
- 'global-strict': ['off', 'always'],
46
- 'no-extra-strict': 'off',
47
- 'no-shadow': 'off',
48
- 'no-unused-vars': ['off', {
49
- 'vars': 'local',
50
- 'args': 'after-used',
51
- 'varsIgnorePattern': 'createElement'
52
- }],
53
- 'no-undef': 'error',
54
- 'no-unused-expressions': 'off',
55
- 'no-use-before-define': 'off',
56
- 'yoda': 'off',
57
- 'eqeqeq': 'off',
58
- 'no-new': 'off',
59
- 'consistent-return': 'off',
60
- 'dot-notation': ['error', {
61
- 'allowKeywords': true
62
- }],
63
- 'no-extend-native': 'error',
64
- 'no-native-reassign': 'error',
65
- 'no-return-assign': 'off',
66
- 'no-constant-condition': ['error', {
67
- 'checkLoops': false
68
- }],
69
- 'no-caller': 'error',
70
- 'no-loop-func': 'off',
71
-
72
- // Node.js
73
- 'no-console': 'off',
74
- 'no-catch-shadow': 'error',
75
- 'no-new-require': 'off',
76
- 'no-mixed-requires': ['off', false],
77
- 'no-path-concat': 'off',
78
- 'handle-callback-err': 'off',
79
-
80
- 'no-empty': 'off',
81
- 'indent': ['error', 2, {
82
- 'SwitchCase': 1,
83
- 'MemberExpression': 'off'
84
- }],
85
- 'camelcase': ['off', {
86
- 'properties': 'always'
87
- }],
88
- 'quotes': ['error', 'single', 'avoid-escape'],
89
- 'brace-style': ['error', '1tbs', {
90
- 'allowSingleLine': false
91
- }],
92
- 'comma-spacing': ['error', {
93
- 'before': false,
94
- 'after': true
95
- }],
96
- 'comma-style': ['error', 'last'],
97
- 'eol-last': 'off',
98
- 'func-names': 'off',
99
- 'new-cap': ['error', {
100
- 'capIsNewExceptions': ['App', 'Page', 'Component']
101
- }],
102
- 'key-spacing': ['error', {
103
- 'beforeColon': false,
104
- 'afterColon': true
105
- }],
106
- 'no-mixed-spaces-and-tabs': 'error',
107
- 'no-multi-spaces': 'error',
108
- 'no-multiple-empty-lines': 'error',
109
- 'no-new-object': 'error',
110
- 'no-spaced-func': 'error',
111
- 'no-tabs': 'error',
112
- 'no-trailing-spaces': 'error',
113
- 'no-extra-parens': ['error', 'all', { ignoreJSX: 'all' }],
114
- 'padded-blocks': ['error', 'never'],
115
- 'semi': 'error',
116
- 'semi-spacing': 'error',
117
- 'keyword-spacing': 'error',
118
- 'space-before-blocks': 'error',
119
- 'space-before-function-paren': ['error', 'never'],
120
- 'space-infix-ops': 'error',
121
- 'spaced-comment': ['error', 'always', {
122
- 'line': {
123
- 'markers': ['/'],
124
- 'exceptions': ['-', '+']
125
- },
126
- 'block': {
127
- 'markers': ['!'],
128
- 'exceptions': ['*'],
129
- 'balanced': true
130
- }
131
- }]
132
- }
133
- };
1
+ module.exports = {
2
+ 'root': true,
3
+ 'parser': 'babel-eslint',
4
+ 'env': {
5
+ 'browser': true,
6
+ 'node': true,
7
+ 'es6': true,
8
+ 'jest': true,
9
+ 'commonjs': true
10
+ },
11
+ 'parserOptions': {
12
+ 'sourceType': 'module',
13
+ 'ecmaVersion': 6,
14
+ 'ecmaFeatures': {
15
+ 'generators': true,
16
+ 'experimentalObjectRestSpread': true
17
+ }
18
+ },
19
+ 'globals': {
20
+ '__weex_data__': true,
21
+ '__weex_options__': true,
22
+ '__weex_downgrade__': true,
23
+ '__weex_define__': true,
24
+ '__weex_require__': true,
25
+ 'WXEnvironment': true,
26
+ 'weex': true,
27
+ 'callGCanvasLinkNative': true
28
+ },
29
+ 'rules': {
30
+ 'max-len': 'off',
31
+ // ES6
32
+ 'prefer-const': 'off',
33
+ 'no-const-assign': 'error',
34
+ 'no-class-assign': 'error',
35
+ 'no-dupe-class-members': 'error',
36
+ 'rest-spread-spacing': 'error',
37
+ 'no-duplicate-imports': 'error',
38
+ 'no-useless-rename': 'error',
39
+ 'arrow-spacing': 'error',
40
+ 'no-useless-computed-key': 'error',
41
+ 'template-curly-spacing': 'error',
42
+ 'generator-star-spacing': ['error', {'before': false, 'after': true}],
43
+ 'yield-star-spacing': ['error', {'before': false, 'after': true}],
44
+ 'strict': ['off', 'global'],
45
+ 'global-strict': ['off', 'always'],
46
+ 'no-extra-strict': 'off',
47
+ 'no-shadow': 'off',
48
+ 'no-unused-vars': ['off', {
49
+ 'vars': 'local',
50
+ 'args': 'after-used',
51
+ 'varsIgnorePattern': 'createElement'
52
+ }],
53
+ 'no-undef': 'error',
54
+ 'no-unused-expressions': 'off',
55
+ 'no-use-before-define': 'off',
56
+ 'yoda': 'off',
57
+ 'eqeqeq': 'off',
58
+ 'no-new': 'off',
59
+ 'consistent-return': 'off',
60
+ 'dot-notation': ['error', {
61
+ 'allowKeywords': true
62
+ }],
63
+ 'no-extend-native': 'error',
64
+ 'no-native-reassign': 'error',
65
+ 'no-return-assign': 'off',
66
+ 'no-constant-condition': ['error', {
67
+ 'checkLoops': false
68
+ }],
69
+ 'no-caller': 'error',
70
+ 'no-loop-func': 'off',
71
+
72
+ // Node.js
73
+ 'no-console': 'off',
74
+ 'no-catch-shadow': 'error',
75
+ 'no-new-require': 'off',
76
+ 'no-mixed-requires': ['off', false],
77
+ 'no-path-concat': 'off',
78
+ 'handle-callback-err': 'off',
79
+
80
+ 'no-empty': 'off',
81
+ 'indent': ['error', 2, {
82
+ 'SwitchCase': 1,
83
+ 'MemberExpression': 'off'
84
+ }],
85
+ 'camelcase': ['off', {
86
+ 'properties': 'always'
87
+ }],
88
+ 'quotes': ['error', 'single', 'avoid-escape'],
89
+ 'brace-style': ['error', '1tbs', {
90
+ 'allowSingleLine': false
91
+ }],
92
+ 'comma-spacing': ['error', {
93
+ 'before': false,
94
+ 'after': true
95
+ }],
96
+ 'comma-style': ['error', 'last'],
97
+ 'eol-last': 'off',
98
+ 'func-names': 'off',
99
+ 'new-cap': ['error', {
100
+ 'capIsNewExceptions': ['App', 'Page', 'Component']
101
+ }],
102
+ 'key-spacing': ['error', {
103
+ 'beforeColon': false,
104
+ 'afterColon': true
105
+ }],
106
+ 'no-mixed-spaces-and-tabs': 'error',
107
+ 'no-multi-spaces': 'error',
108
+ 'no-multiple-empty-lines': 'error',
109
+ 'no-new-object': 'error',
110
+ 'no-spaced-func': 'error',
111
+ 'no-tabs': 'error',
112
+ 'no-trailing-spaces': 'error',
113
+ 'no-extra-parens': ['error', 'all', { ignoreJSX: 'all' }],
114
+ 'padded-blocks': ['error', 'never'],
115
+ 'semi': 'error',
116
+ 'semi-spacing': 'error',
117
+ 'keyword-spacing': 'error',
118
+ 'space-before-blocks': 'error',
119
+ 'space-before-function-paren': ['error', 'never'],
120
+ 'space-infix-ops': 'error',
121
+ 'spaced-comment': ['error', 'always', {
122
+ 'line': {
123
+ 'markers': ['/'],
124
+ 'exceptions': ['-', '+']
125
+ },
126
+ 'block': {
127
+ 'markers': ['!'],
128
+ 'exceptions': ['*'],
129
+ 'balanced': true
130
+ }
131
+ }]
132
+ }
133
+ };
@@ -1,19 +1,19 @@
1
- {
2
- "name": "@gcanvas/core",
3
- "version": "1.0.0",
4
- "description": "Javascript Bridge for GCanvas",
5
- "main": "src/index.js",
6
- "scripts": {
7
- "build": "rollup --config",
8
- "lint": "npm run lint:nofix -- --fix",
9
- "lint:nofix": "eslint --ext .js --ext .jsx ./"
10
- },
11
- "devDependencies": {
12
- "@babel/core": "^7.7.2",
13
- "@babel/plugin-proposal-class-properties": "^7.7.0",
14
- "babel-eslint": "^10.0.3",
15
- "eslint": "^6.6.0",
16
- "rollup": "^1.27.0",
17
- "rollup-plugin-babel": "^4.3.3"
18
- }
19
- }
1
+ {
2
+ "name": "@gcanvas/core",
3
+ "version": "1.0.0",
4
+ "description": "Javascript Bridge for GCanvas",
5
+ "main": "src/index.js",
6
+ "scripts": {
7
+ "build": "rollup --config",
8
+ "lint": "npm run lint:nofix -- --fix",
9
+ "lint:nofix": "eslint --ext .js --ext .jsx ./"
10
+ },
11
+ "devDependencies": {
12
+ "@babel/core": "^7.7.2",
13
+ "@babel/plugin-proposal-class-properties": "^7.7.0",
14
+ "babel-eslint": "^10.0.3",
15
+ "eslint": "^6.6.0",
16
+ "rollup": "^1.27.0",
17
+ "rollup-plugin-babel": "^4.3.3"
18
+ }
19
+ }
@@ -1,14 +1,14 @@
1
- import babel from 'rollup-plugin-babel';
2
-
3
- module.exports = {
4
- input: 'src/index.js',
5
- output: {
6
- file: 'dist/gcanvas.js',
7
- format: 'cjs'
8
- },
9
- plugins: [
10
- babel({
11
- exclude: 'node_modules/**'
12
- })
13
- ]
1
+ import babel from 'rollup-plugin-babel';
2
+
3
+ module.exports = {
4
+ input: 'src/index.js',
5
+ output: {
6
+ file: 'dist/gcanvas.js',
7
+ format: 'cjs'
8
+ },
9
+ plugins: [
10
+ babel({
11
+ exclude: 'node_modules/**'
12
+ })
13
+ ]
14
14
  };