Revert "Merge pull request +6023 from c9/profile-integration"

This reverts commit 584e691a3f, reversing
changes made to 7af49ff62b.

Conflicts:
	configs/monitor.js
	scripts/makestatic.js
	scripts/makestatic.sh
pull/39/head^2
Lennart Kats 2015-02-27 14:26:25 +01:00
rodzic ab9cb53cf8
commit e6fc5d467d
7 zmienionych plików z 75 dodań i 100 usunięć

34
node_modules/c9/git.js wygenerowano vendored
Wyświetl plik

@ -1,16 +1,44 @@
"use strict";
require("amd-loader");
var Url = require("url");
var Fs = require("fs");
var Path = require("path");
var exec = require("child_process").exec;
exports.parse = require("./git_url_parse");
exports.isValidUrl = function(url) {
return !!exports.parse(url);
};
exports.parse = function(url) {
var m = url.match(/^(git)@([\w\.\d\-\_]+)(?:\/|:)([\w\.\d\-\_\/]+)/);
if (m) {
return {
protocol: "ssh:",
auth: m[1],
hostname: m[2],
pathname: m[3]
};
}
var parsed = Url.parse(url);
if (
parsed &&
parsed.protocol &&
parsed.protocol.match(/^(git|http|https):$/) &&
parsed.hostname &&
parsed.slashes &&
parsed.pathname
)
return {
protocol: parsed.protocol,
auth: parsed.auth || "",
hostname: parsed.hostname,
pathname: parsed.pathname.replace(/^\/+/, ""),
full: url
};
else
return null;
};
exports.getHeadRevision = function(path, callback) {
exec("git rev-parse HEAD", {

2
node_modules/c9/git_test.js wygenerowano vendored
Wyświetl plik

@ -62,7 +62,7 @@ module.exports = {
assert.equal(rev.length, 40);
next();
},
},
"test get head branch": function(next) {
git.getHeadBranch(__dirname, function(err, rev) {

36
node_modules/c9/git_url_parse.js wygenerowano vendored
Wyświetl plik

@ -1,36 +0,0 @@
define(function(require, exports, module) {
"use strict";
var Url = require("url");
module.exports = function(url) {
var m = url.match(/^(git)@([\w\.\d\-\_]+)(?:\/|:)([\w\.\d\-\_\/]+)/);
if (m) {
return {
protocol: "ssh:",
auth: m[1],
hostname: m[2],
pathname: m[3]
};
}
var parsed = Url.parse(url);
if (
parsed &&
parsed.protocol &&
parsed.protocol.match(/^(git|http|https):$/) &&
parsed.hostname &&
parsed.slashes &&
parsed.pathname
)
return {
protocol: parsed.protocol,
auth: parsed.auth || "",
hostname: parsed.hostname,
pathname: parsed.pathname.replace(/^\/+/, ""),
full: url
};
else
return null;
};
});

32
node_modules/vfs-local/localfs.js wygenerowano vendored
Wyświetl plik

@ -1157,7 +1157,6 @@ module.exports = function setup(fsOptions) {
}
try {
removeFromList();
fileWatchers[path] = fileWatchers[path] || [];
fileWatchers[path].push(_self);
@ -1235,15 +1234,14 @@ module.exports = function setup(fsOptions) {
}
}
var handleWatchEvent = this.handleWatchEvent = function(event, filename, isVfsWrite) {
function handleWatchEvent(event, filename) {
console.log("watch event", event, filename, path);
// it is a temp file
if (filename && filename.substr(-1) == "~"
&& filename.charAt(0) == ".")
return;
createStatEntry(pathBasename(path), path, function(entry) {
entry.vfsWrite = isVfsWrite || false;
if (entry.err) {
event = "delete";
close();
@ -1294,7 +1292,7 @@ module.exports = function setup(fsOptions) {
}
var sendToAllListeners = this.sendToAllListeners = function(event, filename, entry, files) {
listeners.forEach(function(fn) {
listeners.forEach(function(fn){
fn(event, filename, entry, files);
});
};
@ -1370,33 +1368,27 @@ module.exports = function setup(fsOptions) {
function writeToWatchedFile(path, callback) {
if (!fileWatchers[path])
return callback(function(c) { c(); });
var watchers = fileWatchers[path].slice();
var parentDir = dirname(path) + "/";
var dirWatchers = (fileWatchers[parentDir] || []).slice();
watchers.forEach(function(w) {
w.pause();
});
callback(done);
function loop(watchers, path, event, callback) {
function done(callback) {
if (!watchers.length)
return callback();
// Notify each watcher of changes and reactivate it
var watcher = watchers.pop();
watcher.handleWatchEvent(event, basename(path), true);
fs.stat(path, function(err, stat) {
if (err || !stat) return;
stat.vfsWrite = true;
watcher.sendToAllListeners("change", basename(path), stat);
});
watcher.resume(function() {
loop(watchers, path, event, callback);
done(callback);
});
}
function done(callback) {
loop(watchers, path, "change", function() {
loop(dirWatchers, parentDir, "directory", callback);
});
}
}
function connect(port, options, callback) {

Wyświetl plik

@ -175,39 +175,33 @@ define(function(require, exports, module) {
if (WAIT_FOR_SIGNAL)
ignore(path, 200);
// console.warn("[watchers] ignored event for", path, stat.vfsWrite ? "(was vfsWrite)" : "(was on ignore list)");
fireWatcherEvent(".all");
} else {
fireWatcherEvent("");
fireWatcherEvent(".all");
return;
}
function fireWatcherEvent(eventSuffix) {
if (event == "error") {
// console.error("[watchers] received error for", path, err, stat);
}
else if (event == "delete") {
fs.unwatch(path, handler);
delete handlers[path];
// console.log("[watchers] received", event, "event for", path, stat);
emit("delete" + eventSuffix, { path : path });
}
else if (event == "directory") {
emit("directory" + eventSuffix, {
path: path,
files: files,
stat: stat
});
}
else {
// console.log("[watchers] received", event, "event for", path, stat);
emit("change" + eventSuffix, {
type: event, // change || rename
filename: filename,
path: path,
stat: stat
});
}
if (event == "error") {
// console.error("[watchers] received error for", path, err, stat);
}
else if (event == "delete") {
fs.unwatch(path, handler);
delete handlers[path];
// console.log("[watchers] received", event, "event for", path, stat);
emit("delete", { path : path });
}
else if (event == "directory") {
emit("directory", {
path: path,
files: files,
stat: stat
});
}
else {
// console.log("[watchers] received", event, "event for", path, stat);
emit("change", {
type: event, //change || rename
filename: filename,
path: path,
stat: stat
});
}
});
}

Wyświetl plik

@ -206,7 +206,12 @@ function main(options, imports, register) {
function sharedModules() {
return [
"lib/architect/architect"
"lib/architect/architect",
"ace/mode/html",
"ace/mode/javascript",
"ace/mode/css",
"ace/mode/c9search",
"ace/multi_select"
];
}

Wyświetl plik

@ -20,8 +20,6 @@ if (!module.parent) {
.boolean("symlink")
.describe("compress", "Compress output files")
.boolean("compress")
.describe("react-style", "compile react less CSS")
.boolean("react-style")
.describe("dest", "destination folder for the static files")
.boolean("help")
.describe("help", "Show command line options.");
@ -108,12 +106,6 @@ function main(config, settings, options, callback) {
app.services.makestatic.getMounts(options.dest, callback);
else if (options.symlink)
app.services.makestatic.symlink(options.dest, callback);
else if (options["react-style"])
app.services["react.style"].compile(function(err, code) {
if (err) return callback(err);
console.log(code);
callback();
});
else
app.services.makestatic.copy(options.dest, callback);
});