We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 807b691 commit 61afe75Copy full SHA for 61afe75
1 file changed
tools/webpack/codemirror-banner.js
@@ -1,8 +1,11 @@
1
/* jshint node:true */
2
/* jshint esversion: 6 */
3
-const pkg = require( '../../package.json' );
+const codemirrorVersion = require( 'codemirror/package.json' ).version;
4
+if ( typeof codemirrorVersion !== 'string' ) {
5
+ throw new Error( 'Could not read CodeMirror version from package.json' );
6
+}
7
-module.exports = `/*! This file is auto-generated from CodeMirror - v${ pkg.dependencies.codemirror }
8
+module.exports = `/*! This file is auto-generated from CodeMirror - v${ codemirrorVersion }
9
10
CodeMirror, copyright (c) by Marijn Haverbeke and others
11
Distributed under an MIT license: http://codemirror.net/LICENSE
0 commit comments