Permalink
Browse files

Use the term 'release' instead of 'main'

  • Loading branch information...
1 parent b822f07 commit b5f6d63beb3e9f9700a78db211113dbbfe57bdc1 @petkaantonov committed Feb 9, 2015
View
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
-./build --main --no-debug
+./build --release --no-debug
benchmark=$1
nodepath=${2:-node}
shift 2;
@@ -1,7 +1,7 @@
global.useBluebird = true;
global.useQ = false;
global.parallelQueries = 25;
-var Promise = require('../../js/main/bluebird.js');
+var Promise = require('../../js/release/bluebird.js');
require('../lib/fakesP');
module.exports = function upload(stream, idOrPath, tag, done) {
@@ -1,6 +1,6 @@
global.useBluebird = true;
global.useQ = false;
-var bluebird = require('../../js/main/bluebird.js');
+var bluebird = require('../../js/release/bluebird.js');
require('../lib/fakesP');
module.exports = function upload(stream, idOrPath, tag, done) {
@@ -1,6 +1,6 @@
global.useBluebird = true;
global.useQ = false;
-var bluebird = require('../../js/main/bluebird.js');
+var bluebird = require('../../js/release/bluebird.js');
require('../lib/fakesP');
module.exports = bluebird.coroutine(function* upload(stream, idOrPath, tag, done) {
@@ -46,4 +46,4 @@ module.exports = bluebird.coroutine(function* upload(stream, idOrPath, tag, done
tx.rollback();
done(err);
}
-});
+});
@@ -1,6 +1,6 @@
global.useBluebird = true;
global.useQ = false;
-var bluebird = require('../../js/main/bluebird.js');
+var bluebird = require('../../js/release/bluebird.js');
require('../lib/fakesP');
module.exports = function upload(stream, idOrPath, tag, done) {
@@ -1,6 +1,6 @@
global.useBluebird = true;
global.useQ = false;
-var bluebird = require('../../js/main/bluebird.js');
+var bluebird = require('../../js/release/bluebird.js');
require('../lib/fakesP');
module.exports = bluebird.coroutine(function* upload(stream, idOrPath, tag, done) {
@@ -1,6 +1,6 @@
global.useBluebird = true;
global.useQ = false;
-var bluebird = require('../../js/main/bluebird.js');
+var bluebird = require('../../js/release/bluebird.js');
require('../lib/fakesP');
module.exports = function upload(stream, idOrPath, tag, done) {
@@ -4,7 +4,7 @@ if (global.useQ)
var lifter = require('q').denodeify;
else if (global.useBluebird)
//Currently promisifies only Node style callbacks
- var lifter = require('../../js/main/bluebird.js').promisify;
+ var lifter = require('../../js/release/bluebird.js').promisify;
else if (global.useKew) {
var q = require('kew');
var slicer = [].slice;
@@ -1,6 +1,6 @@
global.useBluebird = true;
global.useQ = false;
-var bluebird = require('../../js/main/bluebird.js');
+var bluebird = require('../../js/release/bluebird.js');
require('../lib/fakesP');
module.exports = bluebird.coroutine(function* upload(stream, idOrPath, tag, done) {
@@ -1,6 +1,6 @@
global.useBluebird = true;
global.useQ = false;
-var Promise = require('../../js/main/bluebird.js');
+var Promise = require('../../js/release/bluebird.js');
require('../lib/fakesP');
module.exports = function upload(stream, idOrPath, tag, done) {
View
@@ -21,7 +21,7 @@
"lint": "node scripts/jshint.js",
"test": "node tools/test.js",
"istanbul": "istanbul",
- "prepublish": "node tools/build.js --no-debug --main --browser --minify"
+ "prepublish": "node tools/build.js --no-debug --release --browser --minify"
},
"homepage": "https://github.com/petkaantonov/bluebird",
"repository": {
@@ -63,11 +63,11 @@
"uglify-js": "~2.4.16"
},
"readmeFilename": "README.md",
- "main": "./js/main/bluebird.js",
+ "main": "./js/release/bluebird.js",
"browser": "./js/browser/bluebird.js",
"files": [
"js/browser",
- "js/main",
+ "js/release",
"LICENSE"
]
}
@@ -4,7 +4,7 @@ var async = require("./async.js");
var ASSERT = require("./assert.js");
var util = require("./util.js");
var bluebirdFramePattern =
- /[\\\/]bluebird[\\\/]js[\\\/](main|debug|instrumented)/;
+ /[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/;
var stackFramePattern = null;
var formatStack = null;
var indentStackFrames = false;
@@ -28,11 +28,11 @@ module.exports = function(tests, options) {
? readFile(path.join(baseDir, "promise_instrumented.js"), "utf8")
: readFile(path.join(baseDir, "promise_debug.js"), "utf8");
- var main = readFile(path.join(baseDir, "main.js"), "utf8")
+ var release = readFile(path.join(baseDir, "release.js"), "utf8")
- return Promise.join(promiseExport, main, function(promiseExport, main) {
+ return Promise.join(promiseExport, release, function(promiseExport, release) {
var browserify = require("browserify");
- var contents = promiseExport + "\n" + main + "\n" + testRequires;
+ var contents = promiseExport + "\n" + release + "\n" + testRequires;
var b = browserify({
basedir: baseDir,
entries: stringToStream(contents)
View
@@ -137,7 +137,7 @@ function ensureDirectory(dir, isUsed) {
});
}
-function buildMain(sources, depsRequireCode, dir) {
+function buildRelease(sources, depsRequireCode, dir) {
return dir.then(function(dir) {
return Promise.map(sources, function(source) {
return jobRunner.run(function() {
@@ -268,7 +268,7 @@ if (path.basename(root).toLowerCase() !== "bluebird") {
" " + process.cwd() + "\n");
}
var dirs = {
- main: path.join(root, "js", "main"),
+ release: path.join(root, "js", "release"),
debug: path.join(root, "js", "debug"),
browser: path.join(root, "js", "browser"),
browserTmp: path.join(root, "js", "tmp"),
@@ -280,7 +280,7 @@ function build(options) {
var npmPackage = fs.readFileAsync("./package.json").then(JSON.parse);
var sourceFileNames = getSourcePaths(options.features);
var license = utils.getLicense();
- var mainDir = ensureDirectory(dirs.main, options.main);
+ var releaseDir = ensureDirectory(dirs.release, options.release);
var debugDir = ensureDirectory(dirs.debug, options.debug);
var browserDir = ensureDirectory(dirs.browser, options.browser);
var browserTmpDir = ensureDirectory(dirs.browserTmp, options.browser);
@@ -312,15 +312,15 @@ function build(options) {
});
}).then(function(results) {
var depsRequireCode = getOptionalRequireCode(results);
- var main, debug, browser;
- if (options.main)
- main = buildMain(results, depsRequireCode, mainDir);
+ var release, debug, browser;
+ if (options.release)
+ release = buildRelease(results, depsRequireCode, releaseDir);
if (options.debug)
debug = buildDebug(results, depsRequireCode, debugDir);
if (options.browser)
browser = buildBrowser(results, browserDir, browserTmpDir, depsRequireCode, options.minify, npmPackage, license);
- return Promise.all([main, debug, browser]);
+ return Promise.all([release, debug, browser]);
});
}
@@ -336,7 +336,7 @@ if (require.main === module) {
minify: browser && (typeof argv.minify !== "boolean" ? true : argv.minify),
browser: browser,
debug: !!argv.debug,
- main: !!argv.main,
+ release: !!argv.release,
features: argv.features || null
});
}

0 comments on commit b5f6d63

Please sign in to comment.