forked from reactioncommerce/reaction
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request reactioncommerce#5016 from reactioncommerce/releas…
…e-v2.0.0-rc.10 Release v2.0.0 rc.10
- Loading branch information
Showing
638 changed files
with
15,589 additions
and
10,019 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
METEOR@1.8 | ||
METEOR@1.8.0.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import fs from 'fs'; | ||
import path from 'path'; | ||
import Log from './logger'; | ||
|
||
/** | ||
* Synchronously check if a file or directory exists | ||
* @param {String} searchPath - path to file or directory | ||
* @return {Boolean} - returns true if file or directory exists | ||
*/ | ||
export function exists(searchPath) { | ||
try { | ||
fs.statSync(searchPath); | ||
return true; | ||
} catch (e) { | ||
return false; | ||
} | ||
} | ||
|
||
/** | ||
* Synchronously check if a file or directory is empty or doesn't exist | ||
* @param {String} searchPath - path to file or directory | ||
* @return {Boolean} returns true if file or directory is empty or missing | ||
*/ | ||
export function isEmptyOrMissing(searchPath) { | ||
let stat; | ||
try { | ||
stat = fs.statSync(searchPath); | ||
} catch (e) { | ||
return true; | ||
} | ||
if (stat.isDirectory()) { | ||
const items = fs.readdirSync(searchPath); | ||
return !items || !items.length; | ||
} | ||
const file = fs.readFileSync(searchPath); | ||
return !file || !file.length; | ||
} | ||
|
||
|
||
/** | ||
* Get an array of directory names in a given path | ||
* @param {String} dir - path to a directory | ||
* @return {Array} returns an array of directory names | ||
*/ | ||
export function getDirectories(dir) { | ||
try { | ||
const files = fs.readdirSync(dir).filter((file) => { | ||
return fs.statSync(path.join(dir, file)).isDirectory(); | ||
}); | ||
return files; | ||
} catch(e) { | ||
Log.error('Directory not found: ' + dir); | ||
Log.error(e); | ||
process.exit(1); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
// Assumes Node 8.x | ||
import _ from "lodash"; | ||
import childProcess from "child_process"; | ||
import Log from "./logger"; | ||
import loadPlugins from "./loadPlugins"; | ||
import loadStyles from "./loadStyles"; | ||
import provisionAssets from "./provisionAssets"; | ||
|
||
function run() { | ||
let start, sec, ns; | ||
|
||
start = process.hrtime(); | ||
Log.info("Setting up plugin imports...\n"); | ||
loadPlugins(); | ||
[sec, ns] = process.hrtime(start); | ||
Log.info(`Setting up plugin imports took ${sec}s ${ns / 1000000}ms\n`); | ||
|
||
start = process.hrtime(); | ||
Log.info("Setting up style imports...\n"); | ||
loadStyles(); | ||
[sec, ns] = process.hrtime(start); | ||
Log.info(`Setting up style imports took ${sec}s ${ns / 1000000}ms\n`); | ||
|
||
start = process.hrtime(); | ||
Log.info("Provisioning assets...\n"); | ||
provisionAssets(); | ||
[sec, ns] = process.hrtime(start); | ||
Log.info(`Provisioning assets took ${sec}s ${ns / 1000000}ms\n`); | ||
|
||
// Whatever debugging-related command line arguments were passed in to | ||
// the first node process, forward them along through meteor | ||
const inspect = process.argv | ||
.filter((arg) => arg.startsWith("--inspect")) | ||
.join(" "); | ||
let cmd = `meteor run --no-lint --no-release-check --raw-logs ${inspect}`; | ||
|
||
Log.info(`Running command: ${cmd}`); | ||
cmd = `REACTION_METEOR_APP_COMMAND_START_TIME=${Date.now()} ${cmd}`; | ||
|
||
try { | ||
childProcess.execSync(cmd, { stdio: "inherit" }); | ||
} catch (err) { | ||
Log.default(err); | ||
Log.error("\nError: App failed to start"); | ||
process.exit(1); | ||
} | ||
} | ||
|
||
run(); |
Oops, something went wrong.