@vixoniccom/module-packager 2.7.0 → 2.8.1-dev.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.
package/CHANGELOG.md CHANGED
@@ -2,143 +2,10 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
- ## [2.7.0](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.7.0-test.17...v2.7.0) (2022-07-21)
5
+ ### [2.8.1-dev.0](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.6.3-dev.0...v2.8.1-dev.0) (2022-07-18)
6
6
 
7
- ## [2.7.0-test.17](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.7.0-test.16...v2.7.0-test.17) (2022-07-19)
7
+ ### [2.6.3-dev.0](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.6.2...v2.6.3-dev.0) (2022-07-13)
8
8
 
9
-
10
- ### Bug Fixes
11
-
12
- * **release:** json-loader package was removed ([52e59eb](https://gitlab.com/mandomedio/vixonic/module-packager/commit/52e59ebde04e7186433c891adbd53c17348108fd))
13
-
14
- ## [2.7.0-test.16](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.7.0-test.15...v2.7.0-test.16) (2022-07-19)
15
-
16
-
17
- ### Bug Fixes
18
-
19
- * **release:** json-loader was added to modules loaders ([55fc98f](https://gitlab.com/mandomedio/vixonic/module-packager/commit/55fc98fb8638b4ea796007345045b4ca3efb7db2))
20
-
21
- ## [2.7.0-test.15](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.7.0-test.14...v2.7.0-test.15) (2022-07-15)
22
-
23
-
24
- ### Bug Fixes
25
-
26
- * **release:** some comments and console.logs were removed ([d717b11](https://gitlab.com/mandomedio/vixonic/module-packager/commit/d717b1177718410498ad60fe933cb28675cd5373))
27
-
28
- ## [2.7.0-test.14](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.7.0-test.13...v2.7.0-test.14) (2022-07-15)
29
-
30
-
31
- ### Bug Fixes
32
-
33
- * **reease:** imports changes were reverted ([a449420](https://gitlab.com/mandomedio/vixonic/module-packager/commit/a449420bc9e48695aba99576caa592e209ba33ca))
34
-
35
- ## [2.7.0-test.13](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.7.0-test.12...v2.7.0-test.13) (2022-07-15)
36
-
37
-
38
- ### Bug Fixes
39
-
40
- * **release:** all requires were updated by imports and also new webpack properties were added to the configuration ([d9a73d6](https://gitlab.com/mandomedio/vixonic/module-packager/commit/d9a73d6e7f2ae31cbbdb475a38bd07fa7159e7ca))
41
-
42
- ## [2.7.0-test.12](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.7.0-test.11...v2.7.0-test.12) (2022-07-15)
43
-
44
-
45
- ### Bug Fixes
46
-
47
- * **release:** copy-webpack-plugin was upgrated ([291d1b9](https://gitlab.com/mandomedio/vixonic/module-packager/commit/291d1b9d5dda24a220cf2eabfef6d31059ca3d4f))
48
-
49
- ## [2.7.0-test.11](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.7.0-test.10...v2.7.0-test.11) (2022-07-15)
50
-
51
-
52
- ### Bug Fixes
53
-
54
- * **release:** html-webpack-plugin was updated ([ae99388](https://gitlab.com/mandomedio/vixonic/module-packager/commit/ae99388e82ba7fe16ffca89f2f7cbc842dbb6739))
55
-
56
- ## [2.7.0-test.10](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.7.0-test.9...v2.7.0-test.10) (2022-07-15)
57
-
58
-
59
- ### Bug Fixes
60
-
61
- * **release:** exclude variable was updated ([a40d017](https://gitlab.com/mandomedio/vixonic/module-packager/commit/a40d017ad5744ecfae966e5e60edeaaa167a2265))
62
-
63
- ## [2.7.0-test.9](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.7.0-test.8...v2.7.0-test.9) (2022-07-15)
64
-
65
-
66
- ### Bug Fixes
67
-
68
- * **release:** __dirname was removed ([cad88bb](https://gitlab.com/mandomedio/vixonic/module-packager/commit/cad88bba27d41590fdecab04dddf511dc9fb1df1))
69
-
70
- ## [2.7.0-test.8](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.7.0-test.7...v2.7.0-test.8) (2022-07-15)
71
-
72
-
73
- ### Bug Fixes
74
-
75
- * **release:** exclude variable was updated ([6eca779](https://gitlab.com/mandomedio/vixonic/module-packager/commit/6eca7795b42e32e84afeffe74a98bb7e4b970dd1))
76
-
77
- ## [2.7.0-test.7](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.7.0-test.6...v2.7.0-test.7) (2022-07-15)
78
-
79
-
80
- ### Bug Fixes
81
-
82
- * **Release:** revert __dirname changes ([bb25fe1](https://gitlab.com/mandomedio/vixonic/module-packager/commit/bb25fe10ed9a9368c145530aecdc91f539877a26))
83
-
84
- ## [2.7.0-test.6](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.7.0-test.5...v2.7.0-test.6) (2022-07-15)
85
-
86
-
87
- ### Bug Fixes
88
-
89
- * **release:** contentBase porperty was removed ([8b364cc](https://gitlab.com/mandomedio/vixonic/module-packager/commit/8b364cc84298210491844856564ada198c356561))
90
-
91
- ## [2.7.0-test.5](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.7.0-test.4...v2.7.0-test.5) (2022-07-15)
92
-
93
-
94
- ### Bug Fixes
95
-
96
- * **Release:** default value of config in options variable was reverted ([9c75fac](https://gitlab.com/mandomedio/vixonic/module-packager/commit/9c75fac9c189bfe5a7857c9a5f68ef50dcc3cc6b))
97
-
98
- ## [2.7.0-test.4](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.7.0-test.3...v2.7.0-test.4) (2022-07-15)
99
-
100
-
101
- ### Bug Fixes
102
-
103
- * **release:** __dirname was added to path resolves and joins ([7312c9a](https://gitlab.com/mandomedio/vixonic/module-packager/commit/7312c9a316c4039dd63c979754d97733c6159a90))
104
-
105
- ## [2.7.0-test.3](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.7.0-test.2...v2.7.0-test.3) (2022-07-15)
106
-
107
- ## [2.7.0-test.2](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.7.0-test.1...v2.7.0-test.2) (2022-07-15)
108
-
109
-
110
- ### Bug Fixes
111
-
112
- * **Release:** ts-node and ts-loader versions were changed ([e108c3f](https://gitlab.com/mandomedio/vixonic/module-packager/commit/e108c3f4e1983ed59d932cfc5db0754a6500088a))
113
-
114
- ## [2.7.0-test.1](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.7.0-test.0...v2.7.0-test.1) (2022-07-15)
115
-
116
-
117
- ### Bug Fixes
118
-
119
- * **release:** loaders module was changed by rules in webpack config ([5de2994](https://gitlab.com/mandomedio/vixonic/module-packager/commit/5de29944e6f1bb7e634bf9d6c1a0acb5b7c10ae5))
120
-
121
- ## [2.7.0-test.0](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.7.0-dev.2...v2.7.0-test.0) (2022-07-15)
122
-
123
- ## [2.7.0-dev.2](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.7.0-dev.1...v2.7.0-dev.2) (2022-07-15)
124
-
125
-
126
- ### Features
127
-
128
- * **release:** awesome-typescript-loader was replaced by ts-loader ([f0829ec](https://gitlab.com/mandomedio/vixonic/module-packager/commit/f0829ecd7640232be95ea029bd415ca9bfb83e10))
129
-
130
- ## [2.7.0-dev.1](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.6.2...v2.7.0-dev.1) (2022-07-15)
131
-
132
-
133
- ### Features
134
-
135
- * **release:** a new vixoniccom/modules was added to the project ([d2cb117](https://gitlab.com/mandomedio/vixonic/module-packager/commit/d2cb117eb368391a1c4307602fd18741655943c6))
136
-
137
- ## [2.7.0-dev.0](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.6.1...v2.7.0-dev.0) (2022-06-16)
138
-
139
- ### Features
140
-
141
- * **release:** a new vixoniccom/modules was added to the project ([0f4e503](https://gitlab.com/mandomedio/vixonic/module-packager/commit/0f4e50326d8c8e2582347f690705bc4ecb619c5a))
142
9
  ### [2.6.2](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.6.1...v2.6.2) (2022-06-24)
143
10
 
144
11
 
@@ -175,6 +42,8 @@ All notable changes to this project will be documented in this file. See [standa
175
42
 
176
43
  ### Bug Fixes
177
44
 
45
+ * **Release:** typescript was upgrated to the last version - 4.7.3 ([43fb1e3](https://gitlab.com/mandomedio/vixonic/module-packager/commit/43fb1e375e9c3ffb8e79384ab67cb74957d9ea8a))
46
+
178
47
  ### [2.6.1](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.6.1-dev.0...v2.6.1) (2022-05-16)
179
48
 
180
49
  ### [2.6.1-dev.0](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.6.0...v2.6.1-dev.0) (2022-04-07)
package/main.js CHANGED
@@ -114,7 +114,7 @@ function zip (callback) {
114
114
 
115
115
  function watch () {
116
116
  var server = new WebpackDevServer(webpack(require(options.config)(options)), {
117
- static: path.join(__dirname, options.src, '..')
117
+ contentBase: path.join(__dirname, options.src, '..')
118
118
  })
119
119
  server.listen(options.port)
120
120
 
package/package.json CHANGED
@@ -52,8 +52,9 @@
52
52
  },
53
53
  "dependencies": {
54
54
  "@vixoniccom/module-controller": "^1.2.2",
55
- "@vixoniccom/modules": "^2.14.0",
55
+ "@vixoniccom/modules": "^2.15.1-dev.0",
56
56
  "archiver": "^5.3.0",
57
+ "awesome-typescript-loader": "^4.0.1",
57
58
  "babel-core": "^6.14.0",
58
59
  "babel-loader": "^6.2.5",
59
60
  "babel-polyfill": "^6.26.0",
@@ -62,24 +63,24 @@
62
63
  "clean-webpack-plugin": "^0.1.10",
63
64
  "cli-color": "^1.2.0",
64
65
  "command-line-args": "^3.0.1",
65
- "copy-webpack-plugin": "^4.6.0",
66
+ "copy-webpack-plugin": "^3.0.1",
66
67
  "css-loader": "^0.24.0",
67
68
  "electron": "^11.4.12",
68
69
  "electron-debug": "^3.2.0",
69
70
  "file-loader": "^0.9.0",
70
71
  "html-loader": "^0.4.3",
71
- "html-webpack-plugin": "^4.5.2",
72
+ "html-webpack-plugin": "^2.22.0",
73
+ "json-loader": "^0.5.4",
72
74
  "lodash": "^4.17.21",
73
75
  "node-sass": "^6.0.1",
74
76
  "raw-loader": "^0.5.1",
75
77
  "sass-loader": "^4.0.2",
76
78
  "style-loader": "^0.13.1",
77
- "ts-loader": "^8.2.0",
78
- "ts-node": "^10.9.1",
79
+ "ts-node": "^10.8.1",
79
80
  "typescript": "^4.7.3",
80
81
  "uglifyjs-webpack-plugin": "^1.3.0",
81
- "webpack": "^4.46.0",
82
- "webpack-dev-server": "^4.9.3"
82
+ "webpack": "^3.12.0",
83
+ "webpack-dev-server": "^2.11.5"
83
84
  },
84
85
  "directories": {},
85
86
  "dist": {
@@ -94,7 +95,6 @@
94
95
  }
95
96
  ],
96
97
  "name": "@vixoniccom/module-packager",
97
- "optionalDependencies": {},
98
98
  "readme": "ERROR: No README data found!",
99
99
  "scripts": {
100
100
  "start": "electron",
@@ -103,7 +103,7 @@
103
103
  "prerelease-test": "standard-version --prerelease test",
104
104
  "release": "standard-version"
105
105
  },
106
- "version": "2.7.0",
106
+ "version": "2.8.1-dev.0",
107
107
  "devDependencies": {
108
108
  "standard-version": "^9.3.1"
109
109
  }
package/webpack.config.js CHANGED
@@ -7,26 +7,28 @@ const webpack = require('webpack')
7
7
  const path = require('path')
8
8
  const _ = require('lodash')
9
9
  const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
10
+ const fs = require('fs')
10
11
 
11
12
  module.exports = (options) => {
12
13
  if (options.target === 'web') {
13
14
  options.externals = [...(options.externals || []), 'electron']
14
15
  }
15
16
 
16
- let exclude = [path.resolve(options.src, 'static'), path.resolve(options.src, 'test')]
17
+ let tsconfigPath = fs.existsSync(path.join(options.src, '..', 'tsconfig.json')) ? path.join(options.src, '..', 'tsconfig.json') : path.join(__dirname, 'tsconfig.json')
18
+ const typescriptPath = path.join(options.src, '..', 'node_modules', 'typescript', '/')
19
+ const typescript = fs.existsSync(typescriptPath) ? path.join(__dirname, path.relative(__dirname, typescriptPath), '/') : 'typescript'
20
+
21
+ let exclude = options.mode === 'watch'
22
+ ? [path.join(options.src, 'static'), path.join(options.src, 'test')]
23
+ : [path.resolve(options.src, 'static'), path.resolve(options.src, 'test')]
17
24
 
18
25
  let config = {
19
- mode: 'production',
20
26
  context: __dirname,
21
27
  entry: ['babel-polyfill', path.resolve(options.src, 'main')],
22
28
  output: {
23
29
  path: path.resolve(options.build),
24
30
  filename: 'main.js'
25
31
  },
26
- performance: {
27
- maxAssetSize: 1000000,
28
- maxEntrypointSize: 1000000
29
- },
30
32
  node: {
31
33
  __dirname: options.mode === 'watch',
32
34
  fs: 'empty',
@@ -42,19 +44,26 @@ module.exports = (options) => {
42
44
  ]
43
45
  },
44
46
  module: {
45
- rules: [
47
+ loaders: [
48
+ {
49
+ test: /\.json$/,
50
+ exclude: exclude,
51
+ loader: 'json-loader'
52
+ },
46
53
  {
47
54
  test: /\.(j|t)sx?$/,
48
55
  include: [path.resolve(options.src)],
49
56
  exclude: exclude,
50
- rules: [
57
+ loaders: [
51
58
  {
52
59
  loader: 'babel-loader?babelrc=false&extends=' + path.join(__dirname, '/.babelrc')
53
60
  },
54
61
  {
55
- loader: 'ts-loader',
62
+ loader: 'awesome-typescript-loader',
56
63
  options: {
57
- transpileOnly: options.transpileOnly
64
+ configFileName: tsconfigPath,
65
+ transpileOnly: options.transpileOnly,
66
+ compiler: typescript
58
67
  }
59
68
  }
60
69
  ]
@@ -80,7 +89,7 @@ module.exports = (options) => {
80
89
  }
81
90
  ]
82
91
  },
83
- externals: (_context, request, callback) => {
92
+ externals: (context, request, callback) => {
84
93
  if (_.indexOf(options.externals, request) !== -1) {
85
94
  if (options.mode !== 'watch' || request === 'electron') {
86
95
  return callback(null, "require('" + request + "')")
@@ -120,7 +129,7 @@ module.exports = (options) => {
120
129
  config.output.publicPath = `http://localhost:${options.port}/`
121
130
  config.devtool = 'source-map'
122
131
  config.devServer = {
123
- static: path.resolve(options.src),
132
+ contentBase: path.resolve(options.src),
124
133
  publicPath: `http://localhost:${options.port}/`,
125
134
  inline: true
126
135
  }