mirror of
https://github.com/Kong/insomnia.git
synced 2026-10-23 07:09:08 -04:00
Revert codemirror to working version
This commit is contained in:
1 parent
f3f215ec6e
commit
de040fb3ad
4 files changed
+22
-15
No files matched your search
@@ -6,7 +6,7 @@ import classnames from 'classnames';
|
||||
import {DEBOUNCE_MILLIS} from '../../lib/constants';
|
||||
|
||||
// Modes
|
||||
import '../../../node_modules/codemirror/mode/css/css'
|
||||
import 'codemirror/mode/css/css'
|
||||
import 'codemirror/mode/htmlmixed/htmlmixed'
|
||||
import 'codemirror/mode/javascript/javascript'
|
||||
|
||||
@@ -28,6 +28,8 @@ import 'codemirror/addon/display/autorefresh'
|
||||
import 'codemirror/addon/search/search'
|
||||
import 'codemirror/addon/search/searchcursor'
|
||||
|
||||
import 'codemirror/addon/edit/matchbrackets'
|
||||
|
||||
import 'codemirror/addon/search/matchesonscrollbar'
|
||||
import 'codemirror/addon/search/matchesonscrollbar.css'
|
||||
|
||||
@@ -52,6 +54,7 @@ const BASE_CODEMIRROR_OPTIONS = {
|
||||
lineWrapping: true,
|
||||
lint: true,
|
||||
tabSize: 4,
|
||||
matchBrackets: true,
|
||||
indentUnit: 4,
|
||||
indentWithTabs: true,
|
||||
gutters: [
|
||||
@@ -125,7 +128,7 @@ class Editor extends Component {
|
||||
// Strip of charset if there is one
|
||||
options.mode = options.mode ? options.mode.split(';')[0] : 'text/plain';
|
||||
|
||||
if (options.mode === 'application/json') {
|
||||
if (options.mode.indexOf('application/json') !== -1) {
|
||||
// ld+json looks better because keys are a different color
|
||||
options.mode = 'application/ld+json';
|
||||
}
|
||||
@@ -177,6 +180,10 @@ class Editor extends Component {
|
||||
this.codeMirror.setValue(code);
|
||||
}
|
||||
|
||||
componentDidUpdate () {
|
||||
this._codemirrorSetOptions();
|
||||
}
|
||||
|
||||
render () {
|
||||
const {value, readOnly, fontSize, lightTheme} = this.props;
|
||||
|
||||
|
||||
@@ -192,7 +192,7 @@
|
||||
|
||||
.cm-s-default .CodeMirror-matchingbracket {
|
||||
text-decoration: underline;
|
||||
color: white !important;
|
||||
color: inherit !important;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -220,5 +220,6 @@
|
||||
|
||||
.cm-s-default .CodeMirror-matchingbracket {
|
||||
text-decoration: underline;
|
||||
color: inherit !important;
|
||||
}
|
||||
}
|
||||
+7
-8
@@ -42,8 +42,8 @@
|
||||
"dependencies": {
|
||||
"analytics-node": "^2.1.0",
|
||||
"classnames": "^2.2.3",
|
||||
"codemirror": "^5.12.0",
|
||||
"electron-prebuilt": "^1.2.6",
|
||||
"codemirror": "~5.16.0",
|
||||
"electron-prebuilt": "~1.2.6",
|
||||
"electron-squirrel-startup": "^1.0.0",
|
||||
"json-lint": "^0.1.0",
|
||||
"jsonschema": "^1.1.0",
|
||||
@@ -56,17 +56,16 @@
|
||||
"react-dnd-html5-backend": "^2.1.2",
|
||||
"react-dom": "^15.1.0",
|
||||
"react-redux": "^4.4.1",
|
||||
"react-tabs": "^0.5.5",
|
||||
"react-tabs": "^0.7.0",
|
||||
"redux": "^3.3.1",
|
||||
"redux-logger": "^2.6.1",
|
||||
"redux-shortcuts": "0.0.1",
|
||||
"redux-thunk": "^2.0.1",
|
||||
"request": "^2.74.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-core": "^6.7.2",
|
||||
"babel-loader": "^6.2.4",
|
||||
"babel-plugin-add-module-exports": "^0.1.2",
|
||||
"babel-plugin-add-module-exports": "^0.2.1",
|
||||
"babel-plugin-transform-object-rest-spread": "^6.6.5",
|
||||
"babel-polyfill": "^6.7.2",
|
||||
"babel-preset-es2015": "^6.6.0",
|
||||
@@ -74,16 +73,16 @@
|
||||
"babel-preset-react-hmre": "^1.1.1",
|
||||
"concurrently": "^2.0.0",
|
||||
"css-loader": "^0.23.1",
|
||||
"electron-builder": "^5.16.0",
|
||||
"electron-builder": "^5.19.1",
|
||||
"electron-packager": "^7.3.0",
|
||||
"express": "latest",
|
||||
"file-loader": "^0.8.5",
|
||||
"file-loader": "^0.9.0",
|
||||
"json-loader": "^0.5.4",
|
||||
"node-sass": "^3.4.2",
|
||||
"react-addons-test-utils": "^15.1.0",
|
||||
"react-hot-loader": "^1.3.0",
|
||||
"redux-mock-store": "^1.0.2",
|
||||
"sass-loader": "^3.2.0",
|
||||
"sass-loader": "^4.0.0",
|
||||
"style-loader": "^0.13.0",
|
||||
"url-loader": "^0.5.7",
|
||||
"webpack": "^1.12.14",
|
||||
|
||||
+4
-4
@@ -5,14 +5,14 @@ echo "-- STARTING PACKAGING PROCESS... --"
|
||||
say "Beginning platform packaging"
|
||||
cp assets/* build/
|
||||
|
||||
echo "-- PACKAGING WINDOWS --"
|
||||
node node_modules/electron-builder/out/build-cli.js --publish='never' --x64 --win
|
||||
say "Windows packaging complete"
|
||||
|
||||
echo "-- PACKAGING MAC --"
|
||||
node node_modules/electron-builder/out/build-cli.js --publish='never' --x64 --mac
|
||||
say "Mac packaging complete"
|
||||
|
||||
echo "-- PACKAGING WINDOWS --"
|
||||
node node_modules/electron-builder/out/build-cli.js --publish='never' --x64 --win
|
||||
say "Windows packaging complete"
|
||||
|
||||
echo "-- PACKAGING LINUX --"
|
||||
node node_modules/electron-builder/out/build-cli.js --publish='never' --x64 --linux
|
||||
say "Linux packaging complete"
|
||||
|
||||
Reference in new issue
Block a user