@vixoniccom/module-packager 2.10.1 → 2.10.2-test.1

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/dist/main.js ADDED
@@ -0,0 +1,208 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+ const commandLineArgs = require('command-line-args');
4
+ const optionDefinitions = [
5
+ { name: 'externals', type: String, defaultValue: [], multiple: true },
6
+ { name: 'target', type: String, defaultValue: 'web' },
7
+ { name: 'src', type: String, defaultValue: './src' },
8
+ { name: 'build', type: String, defaultValue: './build' },
9
+ { name: 'confDefinition', type: String, defaultValue: './configuration' },
10
+ { name: 'config', type: String, defaultValue: './webpack.config.js' },
11
+ { name: 'port', type: Number, defaultValue: 8080 },
12
+ { name: 'mode', type: String, defaultValue: 'build' },
13
+ { name: 'transpileOnly', type: Boolean },
14
+ { name: 'tsOverride', type: Boolean }
15
+ ];
16
+ const options = commandLineArgs(optionDefinitions);
17
+ const path = require('path');
18
+ const webpack = require('webpack');
19
+ const WebpackDevServer = require('webpack-dev-server');
20
+ const { exec } = require('child_process');
21
+ const electronPath = path.resolve(__dirname, '..', 'electron.js');
22
+ const fs = require('fs');
23
+ const archiver = require('archiver');
24
+ const clc = require('cli-color');
25
+ const pjson = require(path.resolve(__dirname, '../package.json'));
26
+ console.log(`VIXONIC PACKAGER: Version ${pjson.version}`);
27
+ if (options.target !== 'electron-renderer' && options.externals.length > 0) {
28
+ throw new Error(`Can't use external dependencies if target is not electron-renderer.`);
29
+ }
30
+ if (options.mode === 'build') {
31
+ pack(() => {
32
+ // Install externals only if not web.
33
+ if (options.target === 'electron-renderer') {
34
+ installExternals(() => {
35
+ zip();
36
+ });
37
+ }
38
+ else {
39
+ zip();
40
+ }
41
+ });
42
+ }
43
+ else if (options.mode === 'watch') {
44
+ watch();
45
+ }
46
+ else if (options.mode === 'run') {
47
+ run();
48
+ }
49
+ else if (options.mode === 'generate-configuration') {
50
+ generateConfiguration();
51
+ }
52
+ else if (options.mode === 'validate-configuration') {
53
+ validateConfiguration();
54
+ }
55
+ function pack(callback) {
56
+ console.log(clc.blue('Building module...'));
57
+ validateConfiguration();
58
+ const configPath = path.resolve(__dirname, '../', options.config);
59
+ webpack(require(options.config)(options), function (err, stats) {
60
+ if (err) {
61
+ // Imprime el error como string y con detalles si existen
62
+ console.error('Build error:', err);
63
+ if (err.details) {
64
+ console.error('Details:', err.details);
65
+ }
66
+ if (err.errors) {
67
+ console.error('TS Errors:', JSON.stringify(err.errors, null, 2));
68
+ }
69
+ throw err;
70
+ }
71
+ else {
72
+ if (stats.hasErrors()) {
73
+ // Imprime los errores de Webpack de forma legible
74
+ const info = stats.toJson('errors-only');
75
+ console.error(clc.red('Webpack errors:'));
76
+ if (info.errors && info.errors.length) {
77
+ info.errors.forEach((e) => {
78
+ console.error(clc.red(typeof e === 'object' ? JSON.stringify(e, null, 2) : e));
79
+ });
80
+ }
81
+ else {
82
+ console.error(clc.red(JSON.stringify(info, null, 2)));
83
+ }
84
+ callback && callback(stats);
85
+ }
86
+ else {
87
+ console.log(clc.green('Build OK.'));
88
+ callback && callback(null);
89
+ }
90
+ }
91
+ });
92
+ }
93
+ function installExternals(callback) {
94
+ // Get external versions.
95
+ let externals = options.externals.map((x) => {
96
+ return `${x}@${JSON.parse(fs.readFileSync(path.resolve(options.src, '..', 'node_modules', x, 'package.json'))).version}`;
97
+ });
98
+ // Install external versions.
99
+ if (externals.length) {
100
+ externals = externals.join(' ');
101
+ console.log(clc.blue(`Installing externals ${externals}...`));
102
+ exec(`npm install --prefix ./ --production ${externals}`, {
103
+ cwd: options.build
104
+ }, (err, _stdout) => {
105
+ if (err)
106
+ throw err;
107
+ console.log(clc.green('Externals installed.'));
108
+ callback && callback(null);
109
+ });
110
+ }
111
+ else {
112
+ callback && callback(null);
113
+ }
114
+ }
115
+ function zip() {
116
+ console.log(clc.blue('Archiving...'));
117
+ let output = fs.createWriteStream(path.resolve(options.build, '../', 'build.zip'));
118
+ let archive = archiver('zip');
119
+ archive.pipe(output);
120
+ archive.directory(path.resolve(options.build), './');
121
+ archive.finalize();
122
+ output.on('close', function () {
123
+ console.log(clc.green('Generated build.zip.'));
124
+ });
125
+ archive.on('error', function (err) {
126
+ throw err;
127
+ });
128
+ clc.move(-2, 0);
129
+ }
130
+ function watch() {
131
+ const devServerOptions = {
132
+ static: path.join(__dirname, options.src, '..'),
133
+ port: options.port
134
+ };
135
+ let webpackConfigPath;
136
+ try {
137
+ webpackConfigPath = path.resolve(process.cwd(), options.config);
138
+ require.resolve(webpackConfigPath);
139
+ }
140
+ catch (e) {
141
+ webpackConfigPath = path.resolve(__dirname, options.config);
142
+ }
143
+ const compiler = webpack(require(webpackConfigPath)(options));
144
+ const server = new WebpackDevServer(devServerOptions, compiler);
145
+ server.start().then(() => {
146
+ console.log(`Dev server is listening on port ${options.port}`);
147
+ });
148
+ var environment = process.env;
149
+ environment.NODE_ENV = 'development';
150
+ console.log(`build ${path.resolve(options.build)}`);
151
+ console.log('[DEBUG] Ejecutando Electron con comando:');
152
+ console.log(`npx electron ${electronPath} --src ${path.resolve(options.src)} --build ${path.resolve(options.build)} --port ${options.port} --mode ${options.mode} --config ${options.config} --externals ${options.externals}`);
153
+ exec(`npx electron ${electronPath} --src ${path.resolve(options.src)} --build ${path.resolve(options.build)} --port ${options.port} --mode ${options.mode} --config ${options.config} --externals ${options.externals}`, {
154
+ cwd: __dirname,
155
+ env: environment
156
+ }, (err) => {
157
+ if (err)
158
+ throw err;
159
+ process.exit();
160
+ });
161
+ }
162
+ function run() {
163
+ pack((err) => {
164
+ if (err) {
165
+ throw err;
166
+ }
167
+ else {
168
+ exec(`npx electron ${electronPath} --src ${path.resolve(options.src)} --build ${path.resolve(options.build)} --port ${options.port} --mode ${options.mode} --config ${options.config} --externals ${options.externals}`, {
169
+ cwd: __dirname
170
+ });
171
+ }
172
+ });
173
+ }
174
+ function loadConfiguration() {
175
+ require('@vixoniccom/modules');
176
+ require('ts-node').register({ compilerOptions: { moduleResolution: 'node', module: 'commonjs', target: 'es2015', checkJs: false } });
177
+ return require(path.resolve(options.confDefinition, 'index.ts')).configuration;
178
+ }
179
+ function generateConfiguration() {
180
+ try {
181
+ let configuration = loadConfiguration();
182
+ fs.writeFileSync(path.resolve(options.src, 'parameters.d.ts'), configuration.declarationFileString);
183
+ fs.writeFileSync(path.resolve(options.src, '..', 'configuration.json'), JSON.stringify(configuration, undefined, 2));
184
+ console.log(clc.green(`Configuration generated`));
185
+ }
186
+ catch (e) {
187
+ console.log(clc.red('Configuration generation failed'));
188
+ throw e;
189
+ }
190
+ }
191
+ function validateConfiguration() {
192
+ try {
193
+ const { Configuration } = require('@vixoniccom/modules');
194
+ const json = require(path.resolve(options.src, '../', 'configuration.json'));
195
+ const conf = Configuration.fromJSON(json);
196
+ if (conf.durationFormula) {
197
+ const values = require(path.resolve(options.src, 'test', 'parameters.json'));
198
+ console.log('Validate duration');
199
+ console.log('Duration on undefined:', conf.getDuration({}), 'seconds');
200
+ console.log('Duration:', conf.getDuration(values.parameters), 'seconds');
201
+ }
202
+ console.log(clc.green('Valid configuration'));
203
+ }
204
+ catch (e) {
205
+ console.log(clc.red('Invalid configuration'));
206
+ throw e;
207
+ }
208
+ }
@@ -0,0 +1,112 @@
1
+ const path = require('path')
2
+ const HtmlWebpackPlugin = require('html-webpack-plugin')
3
+ const { CleanWebpackPlugin } = require('clean-webpack-plugin')
4
+ const CopyWebpackPlugin = require('copy-webpack-plugin')
5
+ const TerserPlugin = require('terser-webpack-plugin')
6
+
7
+ module.exports = (options) => {
8
+ const isDev = options.mode === 'watch'
9
+ const buildPath = path.resolve(options.build)
10
+ const controllerHtmlPath = path.resolve(options.src, 'index.html')
11
+ const controllerStaticPath = path.resolve(path.dirname(controllerHtmlPath), '../static')
12
+ const controllerFontsPath = path.resolve(path.dirname(controllerHtmlPath), '../fonts')
13
+
14
+ return {
15
+ mode: isDev ? 'development' : 'production',
16
+ target: 'electron-renderer',
17
+ entry: path.resolve(options.src, 'main'),
18
+ output: {
19
+ path: buildPath,
20
+ filename: '[name].bundle.js',
21
+ publicPath: '/'
22
+ },
23
+ resolve: {
24
+ extensions: ['.tsx', '.ts', '.js', '.jsx', '.mjs'],
25
+ mainFields: ['module', 'browser', 'main'],
26
+ fullySpecified: false,
27
+ modules: [
28
+ 'node_modules',
29
+ path.resolve(__dirname, '../../node_modules')
30
+ ]
31
+ },
32
+ module: {
33
+ rules: [
34
+ {
35
+ test: /\.(ts|tsx|js|jsx)$/,
36
+ exclude: /node_modules/,
37
+ use: {
38
+ loader: 'babel-loader',
39
+ options: {
40
+ presets: [
41
+ '@babel/preset-env',
42
+ '@babel/preset-react',
43
+ '@babel/preset-typescript'
44
+ ]
45
+ }
46
+ }
47
+ },
48
+ {
49
+ test: /\.css$/,
50
+ use: ['style-loader', 'css-loader'],
51
+ exclude: /node_modules/
52
+ },
53
+ {
54
+ test: /\.(png|jpe?g|gif|svg|woff2?|ttf|eot)$/,
55
+ type: 'asset/resource',
56
+ generator: {
57
+ filename: 'assets/[hash][ext][query]'
58
+ }
59
+ },
60
+ {
61
+ test: /\.html$/,
62
+ use: {
63
+ loader: 'html-loader',
64
+ options: {
65
+ sources: false,
66
+ }
67
+ }
68
+ }
69
+ ]
70
+ },
71
+ plugins: [
72
+ new CleanWebpackPlugin(),
73
+ new HtmlWebpackPlugin({
74
+ template: controllerHtmlPath,
75
+ inject: 'body'
76
+ }),
77
+ new CopyWebpackPlugin({
78
+ patterns: [
79
+ { from: controllerStaticPath, to: 'static', noErrorOnMissing: true },
80
+ { from: controllerFontsPath, to: 'fonts', noErrorOnMissing: true }
81
+ ]
82
+ })
83
+ ],
84
+ optimization: isDev ? undefined : {
85
+ minimize: true,
86
+ minimizer: [
87
+ new TerserPlugin({
88
+ extractComments: false,
89
+ terserOptions: {
90
+ format: {
91
+ comments: false
92
+ },
93
+ compress: true,
94
+ mangle: true
95
+ }
96
+ })
97
+ ]
98
+ },
99
+ devtool: isDev ? 'source-map' : false,
100
+ devServer: isDev ? {
101
+ static: {
102
+ directory: path.resolve(options.src)
103
+ },
104
+ port: options.port || 8080,
105
+ hot: true,
106
+ historyApiFallback: true,
107
+ devMiddleware: {
108
+ publicPath: '/'
109
+ }
110
+ } : undefined
111
+ }
112
+ }
package/index.html CHANGED
@@ -8,7 +8,8 @@
8
8
  <script type="text/javascript">
9
9
  const path = require('path')
10
10
  const ModuleController = require('@vixoniccom/module-controller')
11
- const { ipcRenderer, remote } = require('electron')
11
+ const { ipcRenderer } = require('electron')
12
+ const remote = require('@electron/remote')
12
13
 
13
14
  ipcRenderer.on('init', (event, options) => {
14
15
  let webview = document.getElementById('webview')
@@ -18,7 +19,9 @@
18
19
  win.show()
19
20
  win.focus()
20
21
  })
21
- webview.src = options.mode === 'watch' ? `http://localhost:${options.port}/index.html` : `file://${path.join(options.build, 'index.html')}`
22
+ webview.src = options.mode === 'watch'
23
+ ? `http://localhost:${options.port}/index.html`
24
+ : `file://${path.join(options.build, 'index.html')}`
22
25
 
23
26
  function getData () {
24
27
  let data = {}
package/package.json CHANGED
@@ -48,38 +48,35 @@
48
48
  "name": "tdadone"
49
49
  },
50
50
  "bin": {
51
- "vixonic-module-packager": "main.js"
51
+ "vixonic-module-packager": "./dist/main.js"
52
52
  },
53
+ "files": [
54
+ "dist",
55
+ "index.html"
56
+ ],
53
57
  "dependencies": {
54
- "@vixoniccom/module-controller": "^1.2.2",
58
+ "@electron/remote": "^2.1.2",
59
+ "@vixoniccom/module-controller": "1.3.0-dev.4",
55
60
  "@vixoniccom/modules": "^2.20.0",
56
61
  "archiver": "^5.3.0",
57
62
  "babel-core": "^6.14.0",
58
- "babel-loader": "^6.2.5",
63
+ "babel-loader": "^8.2.5",
59
64
  "babel-polyfill": "^6.26.0",
60
65
  "babel-preset-env": "^1.7.0",
61
66
  "babel-preset-react": "^6.24.1",
62
- "clean-webpack-plugin": "^0.1.10",
63
67
  "cli-color": "^1.2.0",
64
68
  "command-line-args": "^3.0.1",
65
- "copy-webpack-plugin": "^4.6.0",
66
- "css-loader": "^0.24.0",
67
- "electron": "^11.4.12",
69
+ "copy-webpack-plugin": "^13.0.0",
70
+ "electron": "^36.1.0",
68
71
  "electron-debug": "^3.2.0",
69
72
  "file-loader": "^0.9.0",
70
- "html-loader": "^0.4.3",
73
+ "html-loader": "^0.4.5",
71
74
  "html-webpack-plugin": "^4.5.2",
72
75
  "lodash": "^4.17.21",
73
- "node-sass": "^6.0.1",
74
76
  "raw-loader": "^0.5.1",
75
- "sass-loader": "^4.0.2",
76
- "style-loader": "^0.13.1",
77
77
  "ts-loader": "^8.2.0",
78
78
  "ts-node": "^10.9.1",
79
- "typescript": "^4.7.3",
80
- "uglifyjs-webpack-plugin": "^1.3.0",
81
- "webpack": "^4.46.0",
82
- "webpack-dev-server": "^4.9.3"
79
+ "typescript": "^5.8.3"
83
80
  },
84
81
  "directories": {},
85
82
  "dist": {
@@ -97,14 +94,26 @@
97
94
  "readme": "ERROR: No README data found!",
98
95
  "scripts": {
99
96
  "start": "electron",
97
+ "clean": "rimraf dist",
98
+ "build-test": "npm run clean && tsc && webpack --config webpack.config.js --mode=production",
99
+ "build": "tsc && cp webpack.config.js dist/",
100
+ "prepare": "npm run build",
100
101
  "prerelease-dev": "standard-version --prerelease dev",
101
102
  "prerelease-rc": "standard-version --prerelease rc",
102
103
  "prerelease-test": "standard-version --prerelease test",
103
104
  "release": "standard-version"
104
105
  },
105
- "version": "2.10.1",
106
+ "version": "2.10.2-test.1",
106
107
  "license": "ISC",
107
108
  "devDependencies": {
108
- "standard-version": "^9.3.1"
109
+ "@babel/preset-env": "^7.26.9",
110
+ "@babel/preset-react": "^7.26.3",
111
+ "@babel/preset-typescript": "^7.27.0",
112
+ "@types/node": "^20.11.25",
113
+ "clean-webpack-plugin": "^4.0.0",
114
+ "standard-version": "^9.3.1",
115
+ "webpack": "5",
116
+ "webpack-cli": "^4.10.0",
117
+ "webpack-dev-server": "^4.15.2"
109
118
  }
110
119
  }
package/.babelrc DELETED
@@ -1,3 +0,0 @@
1
- {
2
- "presets": ["env", "react"]
3
- }
package/.eslintrc DELETED
@@ -1,3 +0,0 @@
1
- {
2
- "extends": ["standard", "standard-react"]
3
- }
package/CHANGELOG.md DELETED
@@ -1,478 +0,0 @@
1
- # Changelog
2
-
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
-
5
- ### [2.10.1](https://bitbucket.org/vixonic_dev/module-packager/compare/v2.10.1-dev.2...v2.10.1) (2025-02-17)
6
-
7
-
8
- ### Bug Fixes
9
-
10
- * modules were upgrated to 2.20.0 ([9f12e57](https://bitbucket.org/vixonic_dev/module-packager/commit/9f12e57d84d52911b954e35be5888d3d93b5b12b))
11
-
12
- ### [2.10.1-dev.2](https://bitbucket.org/vixonic_dev/module-packager/compare/v2.10.1-dev.1...v2.10.1-dev.2) (2025-02-11)
13
-
14
- ### [2.10.1-dev.1](https://bitbucket.org/vixonic_dev/module-packager/compare/v2.10.1-dev.0...v2.10.1-dev.1) (2025-01-29)
15
-
16
-
17
- ### Bug Fixes
18
-
19
- * second update @vixoniccom/modules version ([1ba37d7](https://bitbucket.org/vixonic_dev/module-packager/commit/1ba37d76f8ed8e9d4cda24058ca4efb68c49134a))
20
-
21
- ### [2.10.1-dev.0](https://bitbucket.org/vixonic_dev/module-packager/compare/v2.10.0...v2.10.1-dev.0) (2025-01-29)
22
-
23
-
24
- ### Bug Fixes
25
-
26
- * update @vixoniccom/modules version ([a7a5d8f](https://bitbucket.org/vixonic_dev/module-packager/commit/a7a5d8f4e009da41c230d92485ba92fda3b55813))
27
-
28
- ## [2.10.0](https://bitbucket.org/vixonic_dev/module-packager/compare/v2.10.0-dev.0...v2.10.0) (2024-11-29)
29
-
30
-
31
- ### Features
32
-
33
- * @vixoniccom/modules was updated to v2.19 ([0907eb3](https://bitbucket.org/vixonic_dev/module-packager/commit/0907eb3df966093b908c47fbe6d2d3e2c11edc06))
34
-
35
- ## [2.10.0-dev.0](https://bitbucket.org/vixonic_dev/module-packager/compare/v2.9.1...v2.10.0-dev.0) (2024-07-17)
36
-
37
-
38
- ### Features
39
-
40
- * ISC license was added to the project ([78a67b2](https://bitbucket.org/vixonic_dev/module-packager/commit/78a67b28740c8ae90bbb6fd556bcd5a2335343ed))
41
-
42
- ### [2.9.1](https://bitbucket.org/vixonic_dev/module-packager/compare/v2.9.1-test.4...v2.9.1) (2024-05-10)
43
-
44
- ### [2.9.1-test.4](https://bitbucket.org/vixonic_dev/module-packager/compare/v2.9.1-test.2...v2.9.1-test.4) (2024-04-18)
45
-
46
- ### [2.9.1-test.3](https://bitbucket.org/vixonic_dev/module-packager/compare/v2.9.1-test.2...v2.9.1-test.3) (2024-04-17)
47
-
48
- ### [2.9.1-test.2](https://bitbucket.org/vixonic_dev/module-packager/compare/v2.9.1-test.1...v2.9.1-test.2) (2024-04-15)
49
-
50
- ### [2.9.1-test.1](https://bitbucket.org/vixonic_dev/module-packager/compare/v2.9.1-test.0...v2.9.1-test.1) (2024-04-12)
51
-
52
- ### [2.9.1-test.0](https://bitbucket.org/vixonic_dev/module-packager/compare/v2.9.0...v2.9.1-test.0) (2024-04-03)
53
-
54
- ## [2.9.0](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.9.0-dev.2...v2.9.0) (2022-11-09)
55
-
56
- ## [2.9.0-dev.2](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.9.0-dev.1...v2.9.0-dev.2) (2022-10-03)
57
-
58
- ## [2.9.0-dev.1](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.9.0-dev.0...v2.9.0-dev.1) (2022-08-25)
59
-
60
-
61
- ### Bug Fixes
62
-
63
- * **release:** hints false was added to webpack conf ([17c3c77](https://gitlab.com/mandomedio/vixonic/module-packager/commit/17c3c77ab9b114f9cb7fcd32c22ffe68a256d5b2))
64
-
65
- ## [2.9.0-dev.0](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.8.1...v2.9.0-dev.0) (2022-08-25)
66
-
67
-
68
- ### Features
69
-
70
- * **release:** modules with timezoneService was added to the project ([13ed978](https://gitlab.com/mandomedio/vixonic/module-packager/commit/13ed9785e4f50408c5e104c36cc80a86aca4f547))
71
-
72
- ### [2.8.1](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.8.1-dev.1...v2.8.1) (2022-08-10)
73
-
74
- ### [2.8.1-dev.1](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.7.0...v2.8.1-dev.1) (2022-07-21)
75
-
76
- ## [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)
77
-
78
- ## [2.7.0](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.7.0-test.17...v2.7.0) (2022-07-21)
79
-
80
- ## [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)
81
-
82
-
83
- ### Bug Fixes
84
-
85
- * **release:** json-loader package was removed ([52e59eb](https://gitlab.com/mandomedio/vixonic/module-packager/commit/52e59ebde04e7186433c891adbd53c17348108fd))
86
-
87
- ## [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)
88
-
89
-
90
- ### Bug Fixes
91
-
92
- * **release:** json-loader was added to modules loaders ([55fc98f](https://gitlab.com/mandomedio/vixonic/module-packager/commit/55fc98fb8638b4ea796007345045b4ca3efb7db2))
93
-
94
- ## [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)
95
-
96
-
97
- ### Bug Fixes
98
-
99
- * **release:** some comments and console.logs were removed ([d717b11](https://gitlab.com/mandomedio/vixonic/module-packager/commit/d717b1177718410498ad60fe933cb28675cd5373))
100
-
101
- ## [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)
102
-
103
-
104
- ### Bug Fixes
105
-
106
- * **reease:** imports changes were reverted ([a449420](https://gitlab.com/mandomedio/vixonic/module-packager/commit/a449420bc9e48695aba99576caa592e209ba33ca))
107
-
108
- ## [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)
109
-
110
-
111
- ### Bug Fixes
112
-
113
- * **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))
114
-
115
- ## [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)
116
-
117
-
118
- ### Bug Fixes
119
-
120
- * **release:** copy-webpack-plugin was upgrated ([291d1b9](https://gitlab.com/mandomedio/vixonic/module-packager/commit/291d1b9d5dda24a220cf2eabfef6d31059ca3d4f))
121
-
122
- ## [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)
123
-
124
-
125
- ### Bug Fixes
126
-
127
- * **release:** html-webpack-plugin was updated ([ae99388](https://gitlab.com/mandomedio/vixonic/module-packager/commit/ae99388e82ba7fe16ffca89f2f7cbc842dbb6739))
128
-
129
- ## [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)
130
-
131
-
132
- ### Bug Fixes
133
-
134
- * **release:** exclude variable was updated ([a40d017](https://gitlab.com/mandomedio/vixonic/module-packager/commit/a40d017ad5744ecfae966e5e60edeaaa167a2265))
135
-
136
- ## [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)
137
-
138
-
139
- ### Bug Fixes
140
-
141
- * **release:** __dirname was removed ([cad88bb](https://gitlab.com/mandomedio/vixonic/module-packager/commit/cad88bba27d41590fdecab04dddf511dc9fb1df1))
142
-
143
- ## [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)
144
-
145
-
146
- ### Bug Fixes
147
-
148
- * **release:** exclude variable was updated ([6eca779](https://gitlab.com/mandomedio/vixonic/module-packager/commit/6eca7795b42e32e84afeffe74a98bb7e4b970dd1))
149
-
150
- ## [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)
151
-
152
-
153
- ### Bug Fixes
154
-
155
- * **Release:** revert __dirname changes ([bb25fe1](https://gitlab.com/mandomedio/vixonic/module-packager/commit/bb25fe10ed9a9368c145530aecdc91f539877a26))
156
-
157
- ## [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)
158
-
159
-
160
- ### Bug Fixes
161
-
162
- * **release:** contentBase porperty was removed ([8b364cc](https://gitlab.com/mandomedio/vixonic/module-packager/commit/8b364cc84298210491844856564ada198c356561))
163
-
164
- ## [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)
165
-
166
-
167
- ### Bug Fixes
168
-
169
- * **Release:** default value of config in options variable was reverted ([9c75fac](https://gitlab.com/mandomedio/vixonic/module-packager/commit/9c75fac9c189bfe5a7857c9a5f68ef50dcc3cc6b))
170
-
171
- ## [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)
172
-
173
-
174
- ### Bug Fixes
175
-
176
- * **release:** __dirname was added to path resolves and joins ([7312c9a](https://gitlab.com/mandomedio/vixonic/module-packager/commit/7312c9a316c4039dd63c979754d97733c6159a90))
177
-
178
- ## [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)
179
-
180
- ## [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)
181
-
182
-
183
- ### Bug Fixes
184
-
185
- * **Release:** ts-node and ts-loader versions were changed ([e108c3f](https://gitlab.com/mandomedio/vixonic/module-packager/commit/e108c3f4e1983ed59d932cfc5db0754a6500088a))
186
-
187
- ## [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)
188
-
189
-
190
- ### Bug Fixes
191
-
192
- * **release:** loaders module was changed by rules in webpack config ([5de2994](https://gitlab.com/mandomedio/vixonic/module-packager/commit/5de29944e6f1bb7e634bf9d6c1a0acb5b7c10ae5))
193
-
194
- ## [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)
195
-
196
- ## [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)
197
-
198
-
199
- ### Features
200
-
201
- * **release:** awesome-typescript-loader was replaced by ts-loader ([f0829ec](https://gitlab.com/mandomedio/vixonic/module-packager/commit/f0829ecd7640232be95ea029bd415ca9bfb83e10))
202
-
203
- ## [2.7.0-dev.1](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.6.2...v2.7.0-dev.1) (2022-07-15)
204
-
205
-
206
- ### Features
207
-
208
- * **release:** a new vixoniccom/modules was added to the project ([d2cb117](https://gitlab.com/mandomedio/vixonic/module-packager/commit/d2cb117eb368391a1c4307602fd18741655943c6))
209
-
210
- ## [2.7.0-dev.0](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.6.1...v2.7.0-dev.0) (2022-06-16)
211
-
212
- ### Features
213
-
214
- * **release:** a new vixoniccom/modules was added to the project ([0f4e503](https://gitlab.com/mandomedio/vixonic/module-packager/commit/0f4e50326d8c8e2582347f690705bc4ecb619c5a))
215
-
216
- ### [2.6.3-dev.0](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.6.2...v2.6.3-dev.0) (2022-07-13)
217
-
218
- ### [2.6.2](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.6.1...v2.6.2) (2022-06-24)
219
-
220
-
221
- ### Bug Fixes
222
-
223
- * **release:** awesome-typescript was downgrade to v4 ([0437594](https://gitlab.com/mandomedio/vixonic/module-packager/commit/0437594af08a645d563c61aafe36599ad755e8ec))
224
- * **release:** awesome-typescript-loader was updated to last version ([f79248c](https://gitlab.com/mandomedio/vixonic/module-packager/commit/f79248c80902d8dffc91ad20525f48b12ac3f244))
225
- * **release:** ts-node was upgrated to 10.8.1 ([f3c977f](https://gitlab.com/mandomedio/vixonic/module-packager/commit/f3c977fae37c56e53ae54d3e899e10aef80a45cf))
226
- * **Release:** typescript was upgrated to the last version - 4.7.3 ([d7329a1](https://gitlab.com/mandomedio/vixonic/module-packager/commit/d7329a13b93ed9dd812c8b9b281559c8058a708b))
227
-
228
- ### [2.6.2-test.3](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.6.2-test.2...v2.6.2-test.3) (2022-06-14)
229
-
230
-
231
- ### Bug Fixes
232
-
233
- * **release:** awesome-typescript was downgrade to v4 ([bd275f5](https://gitlab.com/mandomedio/vixonic/module-packager/commit/bd275f5098bec782fa9155da6077d0f79b885465))
234
-
235
- ### [2.6.2-test.2](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.6.2-test.1...v2.6.2-test.2) (2022-06-14)
236
-
237
-
238
- ### Bug Fixes
239
-
240
- * **release:** awesome-typescript-loader was updated to last version ([8b18685](https://gitlab.com/mandomedio/vixonic/module-packager/commit/8b18685f5f70345cd00b5358421be7902fa73168))
241
-
242
- ### [2.6.2-test.1](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.6.2-test.0...v2.6.2-test.1) (2022-06-14)
243
-
244
-
245
- ### Bug Fixes
246
-
247
- * **release:** ts-node was upgrated to 10.8.1 ([36f9a88](https://gitlab.com/mandomedio/vixonic/module-packager/commit/36f9a883779cfcbd453384a5894381f5cb3c7e12))
248
-
249
- ### [2.6.2-test.0](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.6.1...v2.6.2-test.0) (2022-06-14)
250
-
251
-
252
- ### Bug Fixes
253
-
254
- ### [2.6.1](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.6.1-dev.0...v2.6.1) (2022-05-16)
255
-
256
- ### [2.6.1-dev.0](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.6.0...v2.6.1-dev.0) (2022-04-07)
257
-
258
-
259
- ### Bug Fixes
260
-
261
- * **release:** UglifyJsPlugin downgraded to v1 ([7c762cb](https://gitlab.com/mandomedio/vixonic/module-packager/commit/7c762cb21a24a2263be8110b7d045a8f02b15b98))
262
- * **release:** UglifyJsPlugin was added ([0a904e3](https://gitlab.com/mandomedio/vixonic/module-packager/commit/0a904e33d250ac774a85a34e6befc685177a409c))
263
- * **release:** UglifyJsPlugin was added - v2 ([4d73a8d](https://gitlab.com/mandomedio/vixonic/module-packager/commit/4d73a8d6fa60ad024792fff96ff7da535c8bd830))
264
-
265
- ### [2.5.2-test.4](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.5.2-test.3...v2.5.2-test.4) (2022-03-31)
266
-
267
-
268
- ### Bug Fixes
269
-
270
- * **release:** UglifyJsPlugin downgraded to v1 ([c69b3b5](https://gitlab.com/mandomedio/vixonic/module-packager/commit/c69b3b55328f7233e838fdbfd7c61edaed5ca53c))
271
-
272
- ### [2.5.2-test.3](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.5.2-test.2...v2.5.2-test.3) (2022-03-31)
273
-
274
-
275
- ### Bug Fixes
276
-
277
- * **release:** UglifyJsPlugin was added - v2 ([0e32e2f](https://gitlab.com/mandomedio/vixonic/module-packager/commit/0e32e2f4f3fa5e47320b53ec8e6fef3f50c9bdd5))
278
-
279
- ### [2.5.2-test.2](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.5.2-test.1...v2.5.2-test.2) (2022-03-31)
280
-
281
-
282
- ### Bug Fixes
283
-
284
- * **release:** UglifyJsPlugin was added ([da15fbe](https://gitlab.com/mandomedio/vixonic/module-packager/commit/da15fbe78714e302bbd1c8071f268b97ae9d9bf9))
285
-
286
- ### [2.5.2-test.1](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.5.2-test.0...v2.5.2-test.1) (2022-03-31)
287
-
288
- ### [2.5.2-test.0](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.5.1...v2.5.2-test.0) (2022-03-31)
289
-
290
- ## [2.6.0](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.6.0-rc.0...v2.6.0) (2022-04-07)
291
-
292
- ## [2.6.0-rc.0](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.6.0-dev.3...v2.6.0-rc.0) (2022-03-10)
293
-
294
- ## [2.6.0-dev.3](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.6.0-dev.2...v2.6.0-dev.3) (2022-03-01)
295
-
296
-
297
- ### Bug Fixes
298
-
299
- * **release:** new modules package version was added to this project ([57711fe](https://gitlab.com/mandomedio/vixonic/module-packager/commit/57711fefd448e128a2465fa0f5483666e43d579c))
300
-
301
- ## [2.6.0-dev.2](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.6.0-dev.1...v2.6.0-dev.2) (2022-03-01)
302
-
303
-
304
- ### Bug Fixes
305
-
306
- * **release:** modules package was updated again ([0f229b8](https://gitlab.com/mandomedio/vixonic/module-packager/commit/0f229b84bf46be6eb9e4534ee9fe03a8cb1885b8))
307
-
308
- ## [2.6.0-dev.1](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.6.0-dev.0...v2.6.0-dev.1) (2022-03-01)
309
-
310
-
311
- ### Bug Fixes
312
-
313
- * **release:** modules was updated ([6f0d4e1](https://gitlab.com/mandomedio/vixonic/module-packager/commit/6f0d4e16aa23405114a1738a1be8d337499ea433))
314
-
315
- ## [2.6.0-dev.0](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.5.1...v2.6.0-dev.0) (2022-03-01)
316
-
317
-
318
- ### Features
319
-
320
- ### [2.5.1](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.5.1-dev.0...v2.5.1) (2021-11-12)
321
-
322
- ### [2.5.1-dev.0](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.5.0...v2.5.1-dev.0) (2021-10-20)
323
-
324
-
325
- ### Bug Fixes
326
-
327
- * **release:** modules was upgrated to 2.12.1-rc.0 ([c73c236](https://gitlab.com/mandomedio/vixonic/module-packager/commit/c73c236abaa240a4aa4f0ae53687625e33abbb82))
328
-
329
- ## [2.5.0](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.5.0-rc.2...v2.5.0) (2021-09-13)
330
-
331
- ## [2.5.0-rc.2](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.5.0-dev.54...v2.5.0-rc.2) (2021-08-25)
332
-
333
- ## [2.5.0-dev.54](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.5.0-dev.53...v2.5.0-dev.54) (2021-08-25)
334
-
335
- ## [2.5.0-dev.53](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.5.0-rc.1...v2.5.0-dev.53) (2021-08-25)
336
-
337
- ## [2.5.0-rc.1](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.5.0-dev.49...v2.5.0-rc.1) (2021-08-24)
338
-
339
- ## [2.5.0-dev.49](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.5.0-dev.48...v2.5.0-dev.49) (2021-08-24)
340
-
341
-
342
- ### Bug Fixes
343
-
344
- * **release:** revert copy-wapack-plugin version ([a563590](https://gitlab.com/mandomedio/vixonic/module-packager/commit/a563590477d5c9a1d16c8ab237124c854ffa8884))
345
-
346
- ## [2.5.0-dev.48](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.5.0-rc.0...v2.5.0-dev.48) (2021-08-24)
347
-
348
- ## [2.5.0-rc.0](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.5.0-dev.44...v2.5.0-rc.0) (2021-08-24)
349
-
350
- ## [2.5.0-dev.44](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.5.0-dev.43...v2.5.0-dev.44) (2021-08-23)
351
-
352
- ## [2.5.0-dev.43](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.5.0-dev.42...v2.5.0-dev.43) (2021-08-23)
353
-
354
-
355
- ### Bug Fixes
356
-
357
- * **release:** enableRemoteModule was added to webPreferences in Browser window ([a716409](https://gitlab.com/mandomedio/vixonic/module-packager/commit/a7164091e883c6d12f8442a79cba8b1c0571219d))
358
-
359
- ## [2.5.0-dev.42](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.5.0-dev.41...v2.5.0-dev.42) (2021-08-23)
360
-
361
- ## [2.5.0-dev.41](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.5.0-dev.40...v2.5.0-dev.41) (2021-08-23)
362
-
363
- ## [2.5.0-dev.40](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.5.0-dev.39...v2.5.0-dev.40) (2021-08-23)
364
-
365
- ## [2.5.0-dev.39](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.5.0-dev.38...v2.5.0-dev.39) (2021-08-23)
366
-
367
-
368
- ### Bug Fixes
369
-
370
- * **release:** webpreferences were added in webview tag ([20fd01c](https://gitlab.com/mandomedio/vixonic/module-packager/commit/20fd01c1c04ae79d5241320f62a3333e387ad271))
371
-
372
- ## [2.5.0-dev.38](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.5.0-dev.37...v2.5.0-dev.38) (2021-08-23)
373
-
374
-
375
- ### Bug Fixes
376
-
377
- * **release:** webpreferences electron were added in browserWindow ([415e1b7](https://gitlab.com/mandomedio/vixonic/module-packager/commit/415e1b7129c9f77a5d84b90a7822025ae77a5e4b))
378
-
379
- ## [2.5.0-dev.37](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.5.0-dev.36...v2.5.0-dev.37) (2021-08-23)
380
-
381
-
382
- ### Bug Fixes
383
-
384
- * **release:** nodeintegration was added to webview tag ([763d5db](https://gitlab.com/mandomedio/vixonic/module-packager/commit/763d5db5947a6640c40afe5858d9904357b6abd5))
385
-
386
- ## [2.5.0-dev.36](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.5.0-dev.35...v2.5.0-dev.36) (2021-08-23)
387
-
388
- ## [2.5.0-dev.35](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.5.0-dev.31...v2.5.0-dev.35) (2021-08-23)
389
-
390
- ## [2.5.0-dev.31](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.4.2...v2.5.0-dev.31) (2021-08-23)
391
-
392
- <a name="2.4.2"></a>
393
- ## 2.4.2 (2019-07-11)
394
-
395
-
396
-
397
- <a name="2.4.0"></a>
398
- # [2.4.0](https://bitbucket.org/vixonicmodules/module-packager/compare/v2.3.1...v2.4.0) (2019-06-14)
399
-
400
-
401
- ### Features
402
-
403
- * added transpileOnly and tsOverride options ([a7227de](https://bitbucket.org/vixonicmodules/module-packager/commits/a7227de))
404
- * update typescript ([95f7b64](https://bitbucket.org/vixonicmodules/module-packager/commits/95f7b64))
405
-
406
-
407
-
408
- <a name="2.3.1"></a>
409
- ## [2.3.1](https://bitbucket.org/vixonicmodules/module-packager/compare/v2.3.0...v2.3.1) (2018-11-07)
410
-
411
-
412
-
413
- <a name="2.3.0"></a>
414
- # 2.3.0 (2018-09-24)
415
-
416
-
417
- ### Bug Fixes
418
-
419
- * conflicts resolved ([ab8264e](https://bitbucket.org/vixonicmodules/module-packager/commits/ab8264e))
420
- * escaped downloadsPath in windows. ([11347b8](https://bitbucket.org/vixonicmodules/module-packager/commits/11347b8))
421
- * externals not working with npm 3. ([6ad554a](https://bitbucket.org/vixonicmodules/module-packager/commits/6ad554a))
422
- * merge conflict ([2829371](https://bitbucket.org/vixonicmodules/module-packager/commits/2829371))
423
- * merge duplicated node property ([abc0232](https://bitbucket.org/vixonicmodules/module-packager/commits/abc0232))
424
- * missing dependencies and default tsconfig modules mode set to es2015 ([12cbc21](https://bitbucket.org/vixonicmodules/module-packager/commits/12cbc21))
425
- * package-lock error ([8c7f54c](https://bitbucket.org/vixonicmodules/module-packager/commits/8c7f54c))
426
- * prevent installing externals if target is not electron-renderer ([49aa362](https://bitbucket.org/vixonicmodules/module-packager/commits/49aa362))
427
- * ts-node configuration chechJs set to false ([648b0a8](https://bitbucket.org/vixonicmodules/module-packager/commits/648b0a8))
428
- * updated dependencies ([bbc7c20](https://bitbucket.org/vixonicmodules/module-packager/commits/bbc7c20))
429
- * watch paths not relative to filesystem. ([f91d680](https://bitbucket.org/vixonicmodules/module-packager/commits/f91d680))
430
-
431
-
432
- ### Features
433
-
434
- * added babel env and polyfill. ([95c8a8a](https://bitbucket.org/vixonicmodules/module-packager/commits/95c8a8a))
435
- * added default tsconfig. ([64c85a4](https://bitbucket.org/vixonicmodules/module-packager/commits/64c85a4))
436
- * added target as an option. ([8a0ea52](https://bitbucket.org/vixonicmodules/module-packager/commits/8a0ea52))
437
- * added typescript loader and changed to webpack 2. ([651d805](https://bitbucket.org/vixonicmodules/module-packager/commits/651d805))
438
- * added typescript loader. ([5b3eddf](https://bitbucket.org/vixonicmodules/module-packager/commits/5b3eddf))
439
- * added vixonic modules definition. ([de80168](https://bitbucket.org/vixonicmodules/module-packager/commits/de80168))
440
- * added web mode to generate Android compatible apps. ([80431a9](https://bitbucket.org/vixonicmodules/module-packager/commits/80431a9))
441
- * duration calculation ([19175f6](https://bitbucket.org/vixonicmodules/module-packager/commits/19175f6))
442
- * electron 2.0.2 + vixonic modules 1.1.0 ([dcd6b67](https://bitbucket.org/vixonicmodules/module-packager/commits/dcd6b67))
443
- * tsx support and hot loading ([dc6c03e](https://bitbucket.org/vixonicmodules/module-packager/commits/dc6c03e))
444
- * updated [@vixonic](https://bitbucket.org/vixonic)/modules dependency ([dc92913](https://bitbucket.org/vixonicmodules/module-packager/commits/dc92913))
445
- * upgrade module-controler dependency ([8502347](https://bitbucket.org/vixonicmodules/module-packager/commits/8502347))
446
-
447
-
448
-
449
- <a name="2.2.0"></a>
450
- # 2.2.0 (2018-08-22)
451
-
452
-
453
- ### Bug Fixes
454
-
455
- * conflicts resolved ([ab8264e](https://bitbucket.org/vixonicmodules/module-packager/commits/ab8264e))
456
- * escaped downloadsPath in windows. ([11347b8](https://bitbucket.org/vixonicmodules/module-packager/commits/11347b8))
457
- * externals not working with npm 3. ([6ad554a](https://bitbucket.org/vixonicmodules/module-packager/commits/6ad554a))
458
- * merge conflict ([2829371](https://bitbucket.org/vixonicmodules/module-packager/commits/2829371))
459
- * merge duplicated node property ([abc0232](https://bitbucket.org/vixonicmodules/module-packager/commits/abc0232))
460
- * missing dependencies and default tsconfig modules mode set to es2015 ([12cbc21](https://bitbucket.org/vixonicmodules/module-packager/commits/12cbc21))
461
- * package-lock error ([8c7f54c](https://bitbucket.org/vixonicmodules/module-packager/commits/8c7f54c))
462
- * prevent installing externals if target is not electron-renderer ([49aa362](https://bitbucket.org/vixonicmodules/module-packager/commits/49aa362))
463
- * updated dependencies ([bbc7c20](https://bitbucket.org/vixonicmodules/module-packager/commits/bbc7c20))
464
- * watch paths not relative to filesystem. ([f91d680](https://bitbucket.org/vixonicmodules/module-packager/commits/f91d680))
465
-
466
-
467
- ### Features
468
-
469
- * added babel env and polyfill. ([95c8a8a](https://bitbucket.org/vixonicmodules/module-packager/commits/95c8a8a))
470
- * added default tsconfig. ([64c85a4](https://bitbucket.org/vixonicmodules/module-packager/commits/64c85a4))
471
- * added target as an option. ([8a0ea52](https://bitbucket.org/vixonicmodules/module-packager/commits/8a0ea52))
472
- * added typescript loader and changed to webpack 2. ([651d805](https://bitbucket.org/vixonicmodules/module-packager/commits/651d805))
473
- * added typescript loader. ([5b3eddf](https://bitbucket.org/vixonicmodules/module-packager/commits/5b3eddf))
474
- * added vixonic modules definition. ([de80168](https://bitbucket.org/vixonicmodules/module-packager/commits/de80168))
475
- * added web mode to generate Android compatible apps. ([80431a9](https://bitbucket.org/vixonicmodules/module-packager/commits/80431a9))
476
- * electron 2.0.2 + vixonic modules 1.1.0 ([dcd6b67](https://bitbucket.org/vixonicmodules/module-packager/commits/dcd6b67))
477
- * tsx support and hot loading ([dc6c03e](https://bitbucket.org/vixonicmodules/module-packager/commits/dc6c03e))
478
- * upgrade module-controler dependency ([8502347](https://bitbucket.org/vixonicmodules/module-packager/commits/8502347))
package/electron.js DELETED
@@ -1,50 +0,0 @@
1
- 'use strict'
2
- const { app, BrowserWindow } = require('electron')
3
-
4
- let mainWindow = null
5
-
6
- const path = require('path')
7
- const commandLineArgs = require('command-line-args')
8
- const optionDefinitions = [
9
- { name: 'externals', type: String, defaultValue: [], multiple: true },
10
- { name: 'src', type: String, defaultValue: '../../src' },
11
- { name: 'build', type: String, defaultValue: '../../build' },
12
- { name: 'config', type: String, defaultValue: './webpack.config.js' },
13
- { name: 'port', type: Number, defaultValue: 8080 },
14
- { name: 'mode', type: String, defaultValue: 'build' }
15
- ]
16
- const options = commandLineArgs(optionDefinitions)
17
-
18
- if (options.mode === 'watch') {
19
- require('electron-debug')()
20
- }
21
-
22
- app.on('window-all-closed', () => {
23
- app.quit()
24
- })
25
-
26
- app.on('ready', () => {
27
- mainWindow = new BrowserWindow({
28
- show: false,
29
- width: 600,
30
- height: 400,
31
- plugins: true,
32
- webPreferences: {
33
- nodeIntegration: true,
34
- plugins: true,
35
- webSecurity: false,
36
- enableRemoteModule: true,
37
- webviewTag: true
38
- }
39
- })
40
-
41
- mainWindow.loadURL(`file://${path.join(__dirname, 'index.html')}`)
42
-
43
- mainWindow.webContents.on('did-finish-load', () => {
44
- mainWindow.webContents.send('init', options)
45
- })
46
-
47
- mainWindow.on('closed', () => {
48
- mainWindow = null
49
- })
50
- })
package/main.js DELETED
@@ -1,182 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- 'use strict'
4
- const commandLineArgs = require('command-line-args')
5
- const optionDefinitions = [
6
- { name: 'externals', type: String, defaultValue: [], multiple: true },
7
- { name: 'target', type: String, defaultValue: 'web' },
8
- { name: 'src', type: String, defaultValue: './src' },
9
- { name: 'build', type: String, defaultValue: './build' },
10
- { name: 'confDefinition', type: String, defaultValue: './configuration' },
11
- { name: 'config', type: String, defaultValue: './webpack.config.js' },
12
- { name: 'port', type: Number, defaultValue: 8080 },
13
- { name: 'mode', type: String, defaultValue: 'build' },
14
- { name: 'transpileOnly', type: Boolean },
15
- { name: 'tsOverride', type: Boolean }
16
- ]
17
- const options = commandLineArgs(optionDefinitions)
18
- const path = require('path')
19
- const webpack = require('webpack')
20
- const WebpackDevServer = require('webpack-dev-server')
21
- const { exec } = require('child_process')
22
- const fs = require('fs')
23
- const archiver = require('archiver')
24
- const clc = require('cli-color')
25
-
26
- var pjson = require('./package.json')
27
- console.log(`VIXONIC PACKAGER: Version ${pjson.version}`)
28
-
29
- if (options.target !== 'electron-renderer' && options.externals.length > 0) {
30
- throw new Error(`Can't use external dependencies if target is not electron-renderer.`)
31
- }
32
-
33
- if (options.mode === 'build') {
34
- pack(() => {
35
- // Install externals only if not web.
36
- if (options.target === 'electron-renderer') {
37
- installExternals(() => {
38
- zip()
39
- })
40
- } else {
41
- zip()
42
- }
43
- })
44
- } else if (options.mode === 'watch') {
45
- watch()
46
- } else if (options.mode === 'run') {
47
- run()
48
- } else if (options.mode === 'generate-configuration') {
49
- generateConfiguration()
50
- } else if (options.mode === 'validate-configuration') {
51
- validateConfiguration()
52
- }
53
-
54
- function pack (callback) {
55
- console.log(clc.blue('Building module...'))
56
- validateConfiguration()
57
- webpack(require(options.config)(options), function (err, stats) {
58
- if (err) {
59
- console.log(err)
60
- throw err
61
- } else {
62
- if (stats.hasErrors()) {
63
- console.log(clc.red(stats.toJson('errors-only')))
64
- callback && callback(stats)
65
- } else {
66
- console.log(clc.green('Build OK.'))
67
- callback && callback(null)
68
- }
69
- }
70
- })
71
- }
72
-
73
- function installExternals (callback) {
74
- // Get external versions.
75
- let externals = options.externals.map(x => {
76
- return `${x}@${JSON.parse(fs.readFileSync(path.resolve(options.src, '..', 'node_modules', x, 'package.json'))).version}`
77
- })
78
-
79
- // Install external versions.
80
- if (externals.length) {
81
- externals = externals.join(' ')
82
- console.log(clc.blue(`Installing externals ${externals}...`))
83
- exec(`npm install --prefix ./ --production ${externals}`, {
84
- cwd: options.build
85
- },
86
- (err, stdout) => {
87
- if (err) throw err
88
- console.log(clc.green('Externals installed.'))
89
- callback && callback(null)
90
- })
91
- } else {
92
- callback && callback(null)
93
- }
94
- }
95
-
96
- function zip (callback) {
97
- console.log(clc.blue('Archiving...'))
98
- let output = fs.createWriteStream(path.resolve(options.build, '../', 'build.zip'))
99
- let archive = archiver('zip')
100
- archive.pipe(output)
101
- archive.directory(path.resolve(options.build), './')
102
- archive.finalize()
103
-
104
- output.on('close', function () {
105
- console.log(clc.green('Generated build.zip.'))
106
- callback && callback(null)
107
- })
108
-
109
- archive.on('error', function (err) {
110
- throw err
111
- })
112
- clc.move(-2, 0)
113
- }
114
-
115
- function watch () {
116
- var server = new WebpackDevServer(webpack(require(options.config)(options)), {
117
- static: path.join(__dirname, options.src, '..')
118
- })
119
- server.listen(options.port)
120
-
121
- var environment = process.env
122
- environment.NODE_ENV = 'development'
123
-
124
- exec(`npm start -- ${path.join(__dirname, 'electron.js')} --src ${path.resolve(options.src)} --build ${path.resolve(options.build)} --port ${options.port} --mode ${options.mode} --config ${options.config} --externals ${options.externals}`,
125
- {
126
- cwd: __dirname,
127
- env: environment
128
- },
129
- (err) => {
130
- if (err) throw err
131
- process.exit()
132
- })
133
- }
134
-
135
- function run () {
136
- pack((err) => {
137
- if (err) {
138
- throw err
139
- } else {
140
- exec(`npm start -- ${path.join(__dirname, 'electron.js')} --src ${path.resolve(options.src)} --build ${path.resolve(options.build)} --port ${options.port} --mode ${options.mode} --config ${options.config} --externals ${options.externals}`,
141
- {
142
- cwd: __dirname
143
- })
144
- }
145
- })
146
- }
147
-
148
- function loadConfiguration () {
149
- require('@vixoniccom/modules')
150
- require('ts-node').register({compilerOptions: { moduleResolution: 'node', module: 'commonjs', target: 'es2015', checkJs: false }})
151
- return require(path.resolve(options.confDefinition, 'index.ts')).configuration
152
- }
153
-
154
- function generateConfiguration () {
155
- try {
156
- let configuration = loadConfiguration()
157
- fs.writeFileSync(path.resolve(options.src, 'parameters.d.ts'), configuration.declarationFileString)
158
- fs.writeFileSync(path.resolve(options.src, '..', 'configuration.json'), JSON.stringify(configuration, undefined, 2))
159
- console.log(clc.green(`Configuration generated`))
160
- } catch (e) {
161
- console.log(clc.red('Configuration generation failed'))
162
- throw e
163
- }
164
- }
165
-
166
- function validateConfiguration () {
167
- try {
168
- const { Configuration } = require('@vixoniccom/modules')
169
- const json = require(path.resolve(options.src, '../', 'configuration.json'))
170
- const conf = Configuration.fromJSON(json)
171
- if (conf.durationFormula) {
172
- const values = require(path.resolve(options.src, 'test', 'parameters.json'))
173
- console.log('Validate duration')
174
- console.log('Duration on undefined:', conf.getDuration({}), 'seconds')
175
- console.log('Duration:', conf.getDuration(values.parameters), 'seconds')
176
- }
177
- console.log(clc.green('Valid configuration'))
178
- } catch (e) {
179
- console.log(clc.red('Invalid configuration'))
180
- throw e
181
- }
182
- }
package/tsconfig.json DELETED
@@ -1,16 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "es5",
4
- "module": "es2015",
5
- "moduleResolution": "node",
6
- "jsx": "preserve",
7
- "outDir": "dist",
8
- "allowJs": true,
9
- "checkJs": false,
10
- "allowSyntheticDefaultImports": true,
11
- "sourceMap": true
12
- },
13
- "include": [
14
- "./src/**/*"
15
- ]
16
- }
package/webpack.config.js DELETED
@@ -1,154 +0,0 @@
1
- 'use strict'
2
-
3
- const CleanWebpackPlugin = require('clean-webpack-plugin')
4
- const CopyWebpackPlugin = require('copy-webpack-plugin')
5
- const HtmlWebpackPlugin = require('html-webpack-plugin')
6
- const webpack = require('webpack')
7
- const path = require('path')
8
- const _ = require('lodash')
9
- const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
10
-
11
- module.exports = (options) => {
12
- if (options.target === 'web') {
13
- options.externals = [...(options.externals || []), 'electron']
14
- }
15
-
16
- let exclude = [path.resolve(options.src, 'static'), path.resolve(options.src, 'test')]
17
-
18
- let config = {
19
- mode: 'production',
20
- context: __dirname,
21
- entry: ['babel-polyfill', path.resolve(options.src, 'main')],
22
- output: {
23
- path: path.resolve(options.build),
24
- filename: 'main.js'
25
- },
26
- performance: {
27
- hints: false,
28
- maxAssetSize: 1000000,
29
- maxEntrypointSize: 1000000
30
- },
31
- node: {
32
- __dirname: options.mode === 'watch',
33
- fs: 'empty',
34
- net: 'empty',
35
- tls: 'empty'
36
- },
37
- resolve: {
38
- extensions: ['.ts', '.tsx', '.js', '.jsx'],
39
- modules: [
40
- 'node_modules',
41
- 'src',
42
- 'static'
43
- ]
44
- },
45
- module: {
46
- rules: [
47
- {
48
- test: /\.(j|t)sx?$/,
49
- include: [path.resolve(options.src)],
50
- exclude: exclude,
51
- rules: [
52
- {
53
- loader: 'babel-loader?babelrc=false&extends=' + path.join(__dirname, '/.babelrc')
54
- },
55
- {
56
- loader: 'ts-loader',
57
- options: {
58
- transpileOnly: options.transpileOnly
59
- }
60
- }
61
- ]
62
- },
63
- {
64
- test: /\.scss$/,
65
- exclude: exclude,
66
- loaders: ['style', 'css', 'sass']
67
- },
68
- {
69
- test: /\.css$/,
70
- exclude: exclude,
71
- loader: 'style-loader!css-loader'
72
- },
73
- {
74
- test: /\.(png|jpg|jpeg|gif|svg|woff|woff2|ttf|eot|mp4)$/,
75
- exclude: exclude,
76
- loader: 'file-loader'
77
- },
78
- {
79
- test: /\.html$/,
80
- loader: 'raw-loader'
81
- }
82
- ]
83
- },
84
- externals: (_context, request, callback) => {
85
- if (_.indexOf(options.externals, request) !== -1) {
86
- if (options.mode !== 'watch' || request === 'electron') {
87
- return callback(null, "require('" + request + "')")
88
- } else {
89
- return callback(null, "require('" + path.resolve(options.src, '..', 'node_modules', request).replace(/\\/g, '\\\\') + "')")
90
- }
91
- }
92
- callback()
93
- },
94
- plugins: [
95
- new CopyWebpackPlugin([{ from: path.resolve(options.src, 'static'), to: 'static/' }], { copyUnmodified: true }),
96
- new HtmlWebpackPlugin({
97
- inject: 'head',
98
- template: path.resolve(options.src, 'index.html')
99
- }),
100
- new webpack.LoaderOptionsPlugin({
101
- options: {
102
- test: /\.tsx?$/,
103
- ts: {
104
- compiler: 'typescript',
105
- configFileName: 'tsconfig.json'
106
- },
107
- tslint: {
108
- emitErrors: true,
109
- failOnHint: true
110
- }
111
- }
112
- })
113
- ],
114
- target: options.target
115
- }
116
-
117
- if (options.mode === 'watch') {
118
- config.entry.unshift(`webpack-dev-server/client?http://localhost:${options.port}/`, 'webpack/hot/dev-server', path.resolve(options.src, 'index.html'))
119
- config.plugins.unshift(new CopyWebpackPlugin([{ from: path.resolve(options.src, 'test'), to: 'test/' }], { copyUnmodified: true }))
120
- config.plugins.unshift(new webpack.HotModuleReplacementPlugin())
121
- config.output.publicPath = `http://localhost:${options.port}/`
122
- config.devtool = 'source-map'
123
- config.devServer = {
124
- static: path.resolve(options.src),
125
- publicPath: `http://localhost:${options.port}/`,
126
- inline: true
127
- }
128
- } else {
129
- config.plugins.unshift(
130
- new CleanWebpackPlugin([path.basename(options.build), path.basename(options.build) + '.zip'], {
131
- root: path.resolve(options.build, '..'),
132
- verbose: false
133
- }),
134
- new webpack.DefinePlugin({
135
- 'process.env': {
136
- NODE_ENV: JSON.stringify('production')
137
- }
138
- }),
139
- new UglifyJsPlugin({
140
- uglifyOptions: {
141
- warnings: false,
142
- mangle: true,
143
- extractComments: false
144
- }
145
- })
146
- )
147
-
148
- if (options.mode === 'run') {
149
- config.plugins.unshift(new CopyWebpackPlugin([{ from: path.resolve(options.src, 'test'), to: 'test/' }], { copyUnmodified: true }))
150
- }
151
- }
152
-
153
- return config
154
- }