Skip to content

Commit ca20dae

Browse files
committed
Add styles for code mirror
1 parent faa296a commit ca20dae

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

gulpfile.babel.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ import devConfig from './webpack/dev.config';
99
import prodConfig from './webpack/prod.config';
1010
import wrapConfig from './webpack/wrap.config';
1111

12+
function copy(dest) {
13+
gulp.src('./src/assets/**/*').pipe(gulp.dest(dest));
14+
gulp.src('./node_modules/codemirror/lib/codemirror.css').pipe(gulp.dest(`${dest}/css`));
15+
gulp.src('./node_modules/codemirror/theme/night.css').pipe(gulp.dest(`${dest}/css`));
16+
}
17+
1218
/*
1319
* common tasks
1420
*/
@@ -49,7 +55,7 @@ gulp.task('copy:dev', () => {
4955
gulp.src('./src/browser/extension/manifest.json')
5056
.pipe(rename('manifest.json'))
5157
.pipe(gulp.dest('./dev'));
52-
gulp.src('./src/assets/**/*').pipe(gulp.dest('./dev'));
58+
copy('./dev');
5359
});
5460

5561
/*
@@ -83,7 +89,7 @@ gulp.task('copy:build:extension', () => {
8389
gulp.src('./src/browser/extension/manifest.json')
8490
.pipe(rename('manifest.json'))
8591
.pipe(gulp.dest('./build/extension'));
86-
gulp.src('./src/assets/**/*').pipe(gulp.dest('./build/extension'));
92+
copy('./dev');
8793
});
8894

8995
gulp.task('copy:build:firefox', ['build:extension'], () => {
@@ -92,6 +98,7 @@ gulp.task('copy:build:firefox', ['build:extension'], () => {
9298
gulp.src('./src/browser/firefox/manifest.json')
9399
.pipe(gulp.dest('./build/firefox'));
94100
});
101+
copy('./dev');
95102
});
96103

97104
/*

src/browser/views/includes/style.jade

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,12 @@ style.
1717
#root > div {
1818
height: 100%;
1919
}
20+
.ReactCodeMirror {
21+
overflow: auto;
22+
height: 100%;
23+
}
24+
.CodeMirror {
25+
height: 100% !important;
26+
}
27+
link(href='/css/codemirror.css', rel="stylesheet")
28+
link(href='/css/night.css', rel="stylesheet")

0 commit comments

Comments
 (0)