mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
rename get_core_dir -> getEngineDir
This commit is contained in:
10
lib/files.js
10
lib/files.js
@@ -189,7 +189,7 @@ var files = module.exports = {
|
||||
// an installation.)
|
||||
in_checkout: function () {
|
||||
try {
|
||||
if (fs.existsSync(path.join(files.get_core_dir(), '.git')))
|
||||
if (fs.existsSync(path.join(files.getEngineDir(), '.git')))
|
||||
return true;
|
||||
} catch (e) { console.log(e);}
|
||||
|
||||
@@ -199,7 +199,7 @@ var files = module.exports = {
|
||||
// Read the '.engine_version.txt' file. If in a checkout, throw an error.
|
||||
getEngineVersion: function () {
|
||||
if (!files.in_checkout()) {
|
||||
return fs.readFileSync(path.join(files.get_core_dir(), '.engine_version.txt'));
|
||||
return fs.readFileSync(path.join(files.getEngineDir(), '.engine_version.txt'));
|
||||
} else {
|
||||
throw new Error("Unexpected. Git checkouts don't have engine versions.");
|
||||
}
|
||||
@@ -209,13 +209,13 @@ var files = module.exports = {
|
||||
// install, or (checkout root)/dev_bundle in a checkout..)
|
||||
get_dev_bundle: function () {
|
||||
if (files.in_checkout())
|
||||
return path.join(files.get_core_dir(), 'dev_bundle');
|
||||
return path.join(files.getEngineDir(), 'dev_bundle');
|
||||
else
|
||||
return files.get_core_dir();
|
||||
return files.getEngineDir();
|
||||
},
|
||||
|
||||
// Return the top-level directory for this meteor install or checkout
|
||||
get_core_dir: function () {
|
||||
getEngineDir: function () {
|
||||
return path.join(__dirname, '..');
|
||||
},
|
||||
|
||||
|
||||
@@ -408,7 +408,7 @@ var packages = module.exports = {
|
||||
_localPackageDirs: function () {
|
||||
var packageDirs = [];
|
||||
if (files.in_checkout())
|
||||
packageDirs.push(path.join(files.get_core_dir(), 'packages'));
|
||||
packageDirs.push(path.join(files.getEngineDir(), 'packages'));
|
||||
|
||||
if (process.env.PACKAGE_DIRS)
|
||||
packageDirs = process.env.PACKAGE_DIRS.split(':').concat(packageDirs);
|
||||
|
||||
@@ -330,7 +330,7 @@ var DependencyWatcher = function (deps, app_dir, relativeFiles, on_change) {
|
||||
// contain individual files)
|
||||
self.bulk_dirs = [];
|
||||
_.each(deps.core || [], function (filepath) {
|
||||
self.bulk_dirs.push(path.join(files.get_core_dir(), filepath));
|
||||
self.bulk_dirs.push(path.join(files.getEngineDir(), filepath));
|
||||
});
|
||||
_.each(deps.app || [], function (filepath) {
|
||||
self.bulk_dirs.push(path.join(self.app_dir, filepath));
|
||||
|
||||
@@ -244,7 +244,7 @@ assert.doesNotThrow(function () {
|
||||
// shared state, such as cached compiled packages
|
||||
try {
|
||||
var result = meteorNpm._execFileSync(
|
||||
path.join(files.get_core_dir(), "meteor"),
|
||||
path.join(files.getEngineDir(), "meteor"),
|
||||
["bundle", path.join(tmpDirToPutBundleTarball, "bundle.tar.gz")],
|
||||
{cwd: tmpAppDir});
|
||||
files.rm_recursive(tmpDirToPutBundleTarball);
|
||||
|
||||
@@ -53,7 +53,7 @@ updater.get_manifest(function (manifest) {
|
||||
|
||||
// Launch post-upgrade script
|
||||
var nodejs_path = path.join(files.get_dev_bundle(), 'bin', 'node');
|
||||
var postup_path = path.join(files.get_core_dir(), 'meteor', 'post-upgrade.js');
|
||||
var postup_path = path.join(files.getEngineDir(), 'meteor', 'post-upgrade.js');
|
||||
|
||||
if (fs.existsSync(nodejs_path) && fs.existsSync(postup_path)) {
|
||||
// setup environment.
|
||||
|
||||
@@ -37,7 +37,7 @@ var warehouse = module.exports = {
|
||||
return process.env.TEST_WAREHOUSE_DIR;
|
||||
|
||||
if (files.in_checkout())
|
||||
return path.join(files.get_core_dir(), '.meteor');
|
||||
return path.join(files.getEngineDir(), '.meteor');
|
||||
else
|
||||
return path.join(process.env.HOME, '.meteor');
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user