Skip to content

Commit 61afe75

Browse files
westonrutersirreal
andauthored
Use actual package version
Co-authored-by: Jon Surrell <sirreal@users.noreply.github.com>
1 parent 807b691 commit 61afe75

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

tools/webpack/codemirror-banner.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
/* jshint node:true */
22
/* jshint esversion: 6 */
3-
const pkg = require( '../../package.json' );
3+
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+
}
47

5-
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 }
69
710
CodeMirror, copyright (c) by Marijn Haverbeke and others
811
Distributed under an MIT license: http://codemirror.net/LICENSE

0 commit comments

Comments
 (0)