mirror of
https://github.com/radareorg/radare2-webui.git
synced 2026-11-07 06:36:01 -10:00
Fixes for /p and lib/ (aka r2core.js)
This commit is contained in:
1 parent
7e885114a0
commit
6b4ac2496c
7 files changed
+38
-11
No files matched your search
@@ -1,3 +1,5 @@
|
||||
// builds r2core.js from lib/*.js
|
||||
|
||||
var gulp = require('gulp'),
|
||||
bower = require('gulp-bower');
|
||||
|
||||
|
||||
+1
-1
@@ -294,7 +294,7 @@ r2.load_settings = function() {
|
||||
r2.flags = {};
|
||||
|
||||
r2.update_flags = function() {
|
||||
r2.cmd('fs *;fj', function(x) {
|
||||
r2.cmd('fs *;fj|', function(x) {
|
||||
|
||||
var fs = JSON.parse(x);
|
||||
if (fs !== undefined && fs !== null) {
|
||||
|
||||
+1
-1
@@ -182,7 +182,7 @@ r2ui.seek = function(addr, push, scroll) {
|
||||
if (a !== null) {
|
||||
addr = address_canonicalize(a);
|
||||
} else {
|
||||
r2.cmd('s ' + addr + ';s', function(x) {
|
||||
r2.cmd('s ' + addr + ';s|', function(x) {
|
||||
addr = address_canonicalize(x.replace('\n', ''));
|
||||
});
|
||||
}
|
||||
|
||||
+8
-4
@@ -1,17 +1,21 @@
|
||||
build:
|
||||
npm install
|
||||
build: node_modules
|
||||
$(shell npm bin)/gulp
|
||||
|
||||
node_modules:
|
||||
npm install
|
||||
|
||||
release:
|
||||
npm install
|
||||
$(shell npm bin)/gulp release
|
||||
|
||||
all: build
|
||||
|
||||
run: build
|
||||
r2 -q -e http.ui=p -e http.root=$(PWD)/../ -c=H /bin/ls
|
||||
run:
|
||||
r2 -q -e scr.html=0 -e http.sandbox=false -e http.ui=p -e http.root=$(PWD)/../../dev -c=H /bin/ls
|
||||
|
||||
watch:
|
||||
$(shell npm bin)/gulp watch
|
||||
|
||||
indent:
|
||||
# TODO: use semistandard
|
||||
jsfmt -w lib/js/*.js
|
||||
+21
-4
@@ -1,5 +1,6 @@
|
||||
var gulp = require('gulp'),
|
||||
uglify = require('gulp-uglify'),
|
||||
merge = require('merge-stream'),
|
||||
cleanCSS = require('gulp-clean-css'),
|
||||
concat = require('gulp-concat'),
|
||||
bower = require('gulp-bower');
|
||||
@@ -35,6 +36,12 @@ gulp.task('js', function() {
|
||||
.pipe(gulp.dest(paths.dev));
|
||||
});
|
||||
|
||||
gulp.task('watch', ['default'] , function() {
|
||||
gulp.watch('./*.html', ['html']);
|
||||
gulp.watch(['./lib/js/*.js'], ['js:main']);
|
||||
gulp.watch(['./lib/js/**/*.js'], ['js:app']);
|
||||
gulp.watch(['./lib/css/**/*.css'], ['js:css']);
|
||||
});
|
||||
|
||||
gulp.task('css', function() {
|
||||
|
||||
@@ -75,17 +82,27 @@ gulp.task('default', ['vendors', 'js', 'css', 'common'], function() {
|
||||
});
|
||||
|
||||
gulp.task('release', ['default'], function() {
|
||||
var tasks = merge();
|
||||
tasks.add(
|
||||
gulp.src([paths.dev + 'index.html', paths.dev + '*.png'])
|
||||
.pipe(gulp.dest(paths.dist));
|
||||
.pipe(gulp.dest(paths.dist))
|
||||
);
|
||||
|
||||
tasks.add(
|
||||
gulp.src([paths.dev + '*.css'])
|
||||
.pipe(cleanCSS())
|
||||
.pipe(gulp.dest(paths.dist));
|
||||
.pipe(gulp.dest(paths.dist))
|
||||
);
|
||||
|
||||
tasks.add(
|
||||
gulp.src([paths.dev + '*.js'])
|
||||
.pipe(uglify())
|
||||
.pipe(gulp.dest(paths.dist));
|
||||
.pipe(gulp.dest(paths.dist))
|
||||
);
|
||||
|
||||
tasks.add(
|
||||
gulp.src([paths.dev + 'vendors/*.*'])
|
||||
.pipe(gulp.dest(paths.dist + 'vendors/'));
|
||||
.pipe(gulp.dest(paths.dist + 'vendors/'))
|
||||
);
|
||||
return tasks;
|
||||
});
|
||||
@@ -2,6 +2,7 @@ var myLayout;
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
r2.cmd('e scr.html=false');
|
||||
// create tabs FIRST so elems are correct size BEFORE Layout measures them
|
||||
$('#main_panel').tabs({
|
||||
select: function(event, ui) {
|
||||
@@ -152,7 +153,9 @@ $(document).ready(function() {
|
||||
$('#pnotes').donetyping(function() {
|
||||
r2.cmd('Pnj ' + btoa($('#pnotes').val()));
|
||||
r2.cmd('Po', function(x) {
|
||||
if (x === '') alert('Notes won\'t be persited until a project is opened. Use Project\'s tab or \'Ps name\' to save current project');
|
||||
if (x === '') {
|
||||
alert('Notes won\'t be persited until a project is opened. Use Project\'s tab or \'Ps name\' to save current project');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
"gulp": "^3.9.1",
|
||||
"gulp-bower": "0.0.13",
|
||||
"gulp-clean-css": "^2.0.12",
|
||||
"merge-stream": "^1.0.0",
|
||||
"gulp-concat": "^2.6.0",
|
||||
"gulp-uglify": "^2.0.0"
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user