striven-editor

Maintained and contributed to an open source WYSIWYG editor as an internship project that made it to production and was adopted by the company I was working at.
git clone https://unitehenry.com/git/striven-editor.git
Log | Files | Refs | README | LICENSE

commit bcc76fb48f785753357c125a33cde791ababffab
parent 86d20dd6896cc86f7753f3cd676b038ee03721d7
Author: Henry Unite <unitehenry@gmail.com>
Date:   Wed,  2 Sep 2020 16:24:50 -0400

associate version to editor instance

Diffstat:
Msrc/striveneditor.js | 2+-
Mwebpack.config.js | 4++++
2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/striveneditor.js b/src/striveneditor.js @@ -80,7 +80,7 @@ export default class StrivenEditor { */ constructor(el, options) { // Webpack inserts the package.json version - // this['_version'] = __VERSION__; + this['_version'] = __VERSION__; // Establish the browser context this.establishBrowser(); diff --git a/webpack.config.js b/webpack.config.js @@ -1,3 +1,6 @@ +const { version } = require('./package.json'); +const webpack = require('webpack'); + const path = require('path'); const TerserPlugin = require('terser-webpack-plugin'); const VueLoaderPlugin = require('vue-loader/lib/plugin'); @@ -40,6 +43,7 @@ module.exports = { ] }, plugins: [ + new webpack.DefinePlugin({'__VERSION__': JSON.stringify(version)}), new VueLoaderPlugin() ], optimization: {