Skip to content

Commit

Permalink
kill basics package
Browse files Browse the repository at this point in the history
  • Loading branch information
gschmidt committed Dec 8, 2011
1 parent 260d572 commit ce565dc
Show file tree
Hide file tree
Showing 14 changed files with 110 additions and 323 deletions.
10 changes: 3 additions & 7 deletions app/lib/bundler.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,6 @@ _.extend(Bundle.prototype, {
// underscore package
this.api.require('underscore');

// XXX this is some kind of legacy crap that someone might need
// but I don't know the details. it should go away.
this.api.require('basics');

// standard client packages (for now), for the classic skybreak stack
this.api.require('deps');
this.api.require('session');
Expand Down Expand Up @@ -295,15 +291,15 @@ exports.bundle = function (app_dir, output_path, options) {
// stuff' like minimongo
bundle.add_standard_packages();

require('./project.js').get_packages(app_dir).forEach(function (p) {
_.each(require('./project.js').get_packages(app_dir), function (p) {
bundle.api.require(p);
});

////////// User source //////////

var user_files = bundle.compute_user_files(app_dir);

user_files.forEach(function (rel_path) {
_.each(user_files, function (rel_path) {
var full_path = path.join(app_dir, rel_path);

// XXX at some point we should re-work our directory structure and
Expand Down Expand Up @@ -416,7 +412,7 @@ exports.bundle = function (app_dir, output_path, options) {

app_json.load = [];
files.mkdir_p(path.join(build_path, 'app'), 0755);
bundle.server_load.forEach(function (rel_path) {
_.each(bundle.server_load, function (rel_path) {
var path_in_bundle = path.join('app', rel_path);
var full_path = path.join(build_path, path_in_bundle);
app_json.load.push(path_in_bundle);
Expand Down
12 changes: 6 additions & 6 deletions app/lib/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ var files = module.exports = {
return;
}

fileNames.forEach(function (fileName) {
_.each(fileNames, function (fileName) {
files.file_list_async(path.join(filepath, fileName),
extensions, func);
});
});
} else if (extensions.indexOf(path.extname(filepath)) !== -1) {
} else if (_.indexOf(extensions, path.extname(filepath)) !== -1) {
func(filepath);
}
});
Expand All @@ -83,11 +83,11 @@ var files = module.exports = {
var stats = fs.statSync(filepath);
if (stats.isDirectory()) {
var fileNames = fs.readdirSync(filepath);
fileNames.forEach(function (fileName) {
_.each(fileNames, function (fileName) {
ret = ret.concat(files.file_list_sync(
path.join(filepath, fileName), extensions));
});
} else if (extensions.indexOf(path.extname(filepath)) !== -1) {
} else if (_.indexOf(extensions, path.extname(filepath)) !== -1) {
ret.push(filepath);
}

Expand Down Expand Up @@ -189,7 +189,7 @@ var files = module.exports = {
}

if (stat.isDirectory()) {
fs.readdirSync(p).forEach(function (file) {
_.each(fs.readdirSync(p), function (file) {
file = path.join(p, file);
files.rm_recursive(file);
});
Expand Down Expand Up @@ -238,7 +238,7 @@ var files = module.exports = {
cp_r: function (from, to, options) {
options = options || {};
files.mkdir_p(to, 0755);
fs.readdirSync(from).forEach(function (f) {
_.each(fs.readdirSync(from), function (f) {
if (_.any(options.ignore || [], function (pattern) {
return f.match(pattern);
})) return;
Expand Down
2 changes: 1 addition & 1 deletion app/lib/project.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ var project = module.exports = {
get_packages: function (app_dir) {
var ret = [];

project._get_lines(app_dir).forEach(function (line) {
_.each(project._get_lines(app_dir), function (line) {
line = project._trim_line(line);
if (line !== '')
ret.push(line);
Expand Down
2 changes: 1 addition & 1 deletion app/server/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ var run = function (bundle_dir) {
__skybreak_bootstrap__.mongo_url = mongo_url;

// load app code
info.load.forEach(function (filename) {
_.each(info.load, function (filename) {
var code = fs.readFileSync(path.join(bundle_dir, filename));
// it's tempting to run the code in a new context so we can
// precisely control the enviroment the user code sees. but,
Expand Down
2 changes: 1 addition & 1 deletion app/skybreak/skybreak.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ var usage = function() {
"Use 'skybreak create <name>' to create a new Skybreak project.\n" +
"\n" +
"Commands:\n");
Commands.forEach(function (cmd) {
_.each(Commands, function (cmd) {
if (cmd.help) {
var name = cmd.name + " ".substr(cmd.name.length);
process.stdout.write(" " + name + cmd.help + "\n");
Expand Down
209 changes: 0 additions & 209 deletions packages/basics/basics.js

This file was deleted.

7 changes: 0 additions & 7 deletions packages/basics/package.js

This file was deleted.

Loading

0 comments on commit ce565dc

Please sign in to comment.