Skip to content

Commit

Permalink
update jquery, jquery.terminal
Browse files Browse the repository at this point in the history
  • Loading branch information
Recca Tsai committed Jun 19, 2016
1 parent e30a163 commit 4f1eb4c
Show file tree
Hide file tree
Showing 8 changed files with 118 additions and 29 deletions.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
"dependencies": {
"bootstrap-sass": "^3.3.6",
"codemirror": "^5.15.2",
"jquery": "^2.2.4",
"jquery": "^3.0.0",
"jquery-migrate": "^3.0.0",
"jquery-mousewheel": "^3.1.13",
"jquery.terminal": "^0.10.11",
"jquery.terminal": "^0.10.12",
"laravel-elixir": "^6.0.0-2"
}
}
6 changes: 3 additions & 3 deletions public/css/bundle.css

Large diffs are not rendered by default.

32 changes: 16 additions & 16 deletions public/js/bundle.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions resources/assets/js/bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ class Terminal extends Commands {
let parent = this.$element.parent();
let width, height;
if (parent.prop('tagName').toLowerCase() === 'body') {
width = parent.width()-20;
height = parent.height()-20;
width = parent.width() - 20;
height = parent.height() - 20;
} else {
width = parent.width();
height = parent.height();
Expand Down
8 changes: 5 additions & 3 deletions resources/assets/js/jquery.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
'user strict';

let $;
if (!window.jQuery) {
$ = window.jQuery = window.$ = require('jquery');
if (!global.jQuery) {
$ = global.jQuery = global.$ = require('jquery');
$.migrateMute = true;
require('jquery-migrate');
} else {
$ = window.jQuery;
$ = global.jQuery;
}

export default $;
53 changes: 52 additions & 1 deletion resources/assets/sass/bundle.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,63 @@
@import 'node_modules/codemirror/theme/monokai';

#terminal-shell,
#panel-terminal-shell
{
padding: 10px 10px !important;
min-width: 480px;
}

.terminal-panel {
padding: 10px 10px !important;
color: rgb(170, 170, 170) !important;
font-family: monospace !important;
font-style: normal !important;
font-variant: normal !important;
font-weight: normal !important;
font-size: 12px;
overflow-x: hidden;
a {
color: #0f60ff !important;
&:hover {
color: red !important;
text-decoration: underline !important;
}
}
}

.CodeMirror-fullscreen {
z-index: 50000 !important;
}
//
// <style class="tracy-debug">
// .Laravel-TerminalPanel {
// min-width: 700px;
// min-height: 500px;
// background: #000;
// overflow-x: hidden !important;
// }
//
// .Laravel-TerminalPanel #panel-shell {
// margin: 10px 15px;
// }
//
// .Laravel-TerminalPanel div,
// .Laravel-TerminalPanel span,
// .Laravel-TerminalPanel a {
// background: #000;
// color: rgb(170, 170, 170);
// font-family: monospace;
// font-size: 12px;
// font-style: normal;
// font-variant: normal;
// font-weight: normal;
// }
//
// .Laravel-TerminalPanel a {
// color: #0f60ff !important;
// }
//
// .Laravel-TerminalPanel a:hover {
// color: red !important;
// text-decoration: underline !important;
// }
// </style>
7 changes: 5 additions & 2 deletions resources/views/panel.blade.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<div id="panel-terminal-shell"></div>
@php
$id = str_random(30);
@endphp
<div id="panel-terminal-shell-{{ $id }}" class="terminal-panel"></div>
<script>
(function() {
var loadStyle = function(id, filename) {
Expand Down Expand Up @@ -55,7 +58,7 @@
};
loadScript('terminal' ,scripts.terminal, function () {
new Terminal("#panel-terminal-shell", {!! $options !!});
new Terminal("#panel-terminal-shell-{{ $id }}", {!! $options !!});
});
})();
</script>
32 changes: 32 additions & 0 deletions src/Console/Commands/Cleanup.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ class Cleanup extends Command
*/
protected $description = 'cleanup vendor folder';

/**
* $filesystem.
*
* @var \Illuminate\Filesystem\Filesystem
*/
protected $filesystem;

/**
Expand Down Expand Up @@ -51,6 +56,12 @@ public function handle(Filesystem $filesystem)
$this->cleanupComposer(realpath($root.'/vendor'));
}

/**
* cleanupDirectories.
* @method cleanupDirectories
*
* @param array $directories
*/
public function cleanupDirectories($directories)
{
foreach ($directories as $directory) {
Expand All @@ -59,6 +70,13 @@ public function cleanupDirectories($directories)
}
}

/**
* cleanupComposer.
*
* @method cleanupComposer
*
* @param string $vendorDirectory
*/
public function cleanupComposer($vendorDirectory)
{
$rules = static::getRules();
Expand All @@ -77,6 +95,13 @@ public function cleanupComposer($vendorDirectory)
}
}

/**
* cleanup.
*
* @method cleanup
*
* @param array $files
*/
public function cleanup($files)
{
if (count($files) === 0) {
Expand All @@ -97,6 +122,13 @@ public function cleanup($files)
}
}

/**
* getRules.
*
* @method getRules
*
* @return array
*/
public static function getRules()
{
// Default patterns for common files
Expand Down

0 comments on commit 4f1eb4c

Please sign in to comment.