diff --git a/package-lock.json b/package-lock.json index cb657e43817f3b68b6fc4b57e3a02f027a15d01a..1da5d5be1c5d3772395d954677aef4f451a7ba62 100644 Binary files a/package-lock.json and b/package-lock.json differ diff --git a/package.json b/package.json index b139054660070dab572be66c51017642c92bcb75..7f7083981e95cc500350361f17b10e3eff29a452 100644 --- a/package.json +++ b/package.json @@ -104,6 +104,7 @@ "raw-loader": "^1.0.0", "resolve-url-loader": "^3.0.0", "sass-loader": "^7.1.0", + "string-replace-loader": "^2.1.1", "style-loader": "^0.23.1", "ts-jest": "^23.10.5", "tslint": "^5.12.1", diff --git a/src/mol-plugin/context.ts b/src/mol-plugin/context.ts index 17cd0f5eddb3f8617f2f41ac038f44de15363019..5f616a0fb05e8f6c2c0b9df655e7076ae16dc948 100644 --- a/src/mol-plugin/context.ts +++ b/src/mol-plugin/context.ts @@ -26,7 +26,7 @@ import { LociLabelEntry, LociLabelManager } from './util/loci-label-manager'; import { ajaxGet } from 'mol-util/data-source'; import { CustomPropertyRegistry } from './util/custom-prop-registry'; import { VolumeRepresentationRegistry } from 'mol-repr/volume/registry'; -import { PLUGIN_VERSION } from './version'; +import { PLUGIN_VERSION, PLUGIN_VERSION_DATE } from './version'; export class PluginContext { private disposed = false; @@ -174,7 +174,7 @@ export class PluginContext { this.lociLabels = new LociLabelManager(this); // TODO: find a better solution for this. - setTimeout(() => this.log.message(`Mol* Plugin ${PLUGIN_VERSION}`), 500); + setTimeout(() => this.log.message(`Mol* Plugin ${PLUGIN_VERSION} [${PLUGIN_VERSION_DATE}]`), 500); } // settings = ; diff --git a/src/mol-plugin/layout.ts b/src/mol-plugin/layout.ts new file mode 100644 index 0000000000000000000000000000000000000000..7c7fe83382a744be37fe5118239b71702aebc60d --- /dev/null +++ b/src/mol-plugin/layout.ts @@ -0,0 +1,7 @@ +/** + * Copyright (c) 2018 mol* contributors, licensed under MIT, See LICENSE file for more info. + * + * @author David Sehnal <david.sehnal@gmail.com> + */ + +// TODO \ No newline at end of file diff --git a/src/mol-plugin/version.ts b/src/mol-plugin/version.ts index 42890943f875aa49d1781879adc27137843fb3ba..26b3a278fa756d18483913935f0542796e8a8ab9 100644 --- a/src/mol-plugin/version.ts +++ b/src/mol-plugin/version.ts @@ -4,4 +4,5 @@ * @author David Sehnal <david.sehnal@gmail.com> */ -export const PLUGIN_VERSION = '0.1.0'; \ No newline at end of file +export const PLUGIN_VERSION = '0.5.0'; +export const PLUGIN_VERSION_DATE = '$PLUGIN_VERSION_DATE$'; \ No newline at end of file diff --git a/webpack.config.js b/webpack.config.js index 382ff11e2943f8f23a0b42e505f0d09062e930ab..50f0a8527b5b35631aa9128e46cf3514aaa9615f 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -28,7 +28,15 @@ const sharedConfig = { { test: /\.(s*)css$/, use: [MiniCssExtractPlugin.loader, 'css-loader', 'resolve-url-loader', 'sass-loader'] - } + }, + { + test: /version\.js$/, + loader: 'string-replace-loader', + options: { + search: '$PLUGIN_VERSION_DATE$', + replace: function (date) { return date.getFullYear() + '/' + (date.getMonth() + 1) + '/' + date.getDate() } (new Date()), + } + } ] }, plugins: [