Skip to content
Snippets Groups Projects
Commit bbaef7df authored by David Sehnal's avatar David Sehnal
Browse files

mol-plugin: include build date to version

parent 6371d95e
No related branches found
No related tags found
No related merge requests found
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
......@@ -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",
......
......@@ -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 = ;
......
/**
* 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
......@@ -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
......@@ -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: [
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment