File tree Expand file tree Collapse file tree 3 files changed +9138
-2
lines changed Expand file tree Collapse file tree 3 files changed +9138
-2
lines changed Original file line number Diff line number Diff line change 5
5
"backbone" : " components/backbone#~1.2" ,
6
6
"bootstrap" : " components/bootstrap#~3.3" ,
7
7
"bootstrap-tour" : " 0.9.0" ,
8
- "codemirror" : " components/codemirror#~5.16 " ,
8
+ "codemirror" : " components/codemirror#~5.22.2 " ,
9
9
"es6-promise" : " ~1.0" ,
10
10
"font-awesome" : " components/font-awesome#~4.2.0" ,
11
11
"google-caja" : " 5669" ,
Original file line number Diff line number Diff line change 15
15
16
16
import os
17
17
import sys
18
+ import shutil
18
19
19
20
import pipes
20
21
from distutils import log
@@ -348,7 +349,16 @@ def should_run_npm(self):
348
349
if not os .path .exists (self .node_modules ):
349
350
return True
350
351
return mtime (self .node_modules ) < mtime (pjoin (repo_root , 'package.json' ))
351
-
352
+
353
+ def patch_codemirror (self ):
354
+ """Patch CodeMirror until https://github.com/codemirror/CodeMirror/issues/4454 is resolved"""
355
+
356
+ try :
357
+ shutil .copyfile ('tools/patches/codemirror.js' , 'notebook/static/components/codemirror/lib/codemirror.js' )
358
+ except OSError as e :
359
+ print ("Failed to patch codemirror.js: %s" % e , file = sys .stderr )
360
+ raise
361
+
352
362
def run (self ):
353
363
if not self .should_run ():
354
364
print ("bower dependencies up to date" )
@@ -372,6 +382,8 @@ def run(self):
372
382
print ("Failed to run bower: %s" % e , file = sys .stderr )
373
383
print ("You can install js dependencies with `npm install`" , file = sys .stderr )
374
384
raise
385
+
386
+ self .patch_codemirror ()
375
387
os .utime (self .bower_dir , None )
376
388
# update package data in case this created new files
377
389
update_package_data (self .distribution )
You can’t perform that action at this time.
0 commit comments