Skip to content
This repository has been archived by the owner on May 21, 2019. It is now read-only.

Commit

Permalink
Remove jQuery dependency.
Browse files Browse the repository at this point in the history
  • Loading branch information
vlad-shatskyi committed May 30, 2016
1 parent 81cf5e7 commit b9f7eee
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 14 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"fuzzaldrin": "2.1.0",
"immutable": "3.8.1",
"jison": "0.4.17",
"jquery": "2.2.4",
"lodash": "4.13.1",
"node-ansiparser": "2.1.0",
"pty.js": "shockone/pty.js",
Expand Down
5 changes: 2 additions & 3 deletions src/views/4_PromptComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ export default class PromptComponent extends React.Component<Props, State> imple
}

return (
<div className="prompt-wrapper" style={css.promptWrapper(this.props.status)}>
<div className="prompt-wrapper" id={this.props.job.id} style={css.promptWrapper(this.props.status)}>
<div style={css.arrow(this.props.status)}>
<div style={css.arrowInner(this.props.status)}></div>
</div>
Expand Down Expand Up @@ -321,8 +321,7 @@ export default class PromptComponent extends React.Component<Props, State> imple
private handleScrollToTop(event: Event) {
stopBubblingUp(event);

const offset = $(reactDOM.findDOMNode(this.props.jobView)).offset().top - 10;
$("html, body").animate({scrollTop: offset}, 300);
document.location.href = `#${this.props.job.id}`;
}

private handleKeyPress(event: Event) {
Expand Down
10 changes: 4 additions & 6 deletions src/views/Main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@ import ApplicationComponent from "./1_ApplicationComponent";
import {loadAllPlugins} from "../PluginManager";
import {loadEnvironment} from "../Environment";

$(() => {
// FIXME: Remove loadAllPlugins after switching to Webpack (because all the files will be loaded at start anyway).
Promise.all([loadAllPlugins(), loadEnvironment()])
.then(() => reactDOM.render(<ApplicationComponent/>, document.getElementById("black-screen")));
// FIXME: Remove loadAllPlugins after switching to Webpack (because all the files will be loaded at start anyway).
Promise.all([loadAllPlugins(), loadEnvironment()])
.then(() => reactDOM.render(<ApplicationComponent/>, document.getElementById("black-screen")));

Aliases.all();
});
Aliases.all();
4 changes: 0 additions & 4 deletions src/views/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
<meta charset="utf-8"/>
<title>Black Screen</title>

<script>
window.jQuery = window.$ = require("jquery");
</script>

<script src="../../src/views/Main.js"></script>

<style>
Expand Down

0 comments on commit b9f7eee

Please sign in to comment.