-
Notifications
You must be signed in to change notification settings - Fork 10
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 #114 from reactioncommerce/fix/clone-plugins-monorepo
fix: get plugins.json from correct url
- Loading branch information
Showing
3 changed files
with
28 additions
and
27 deletions.
There are no files selected for viewing
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
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,20 @@ | ||
import wget from "./wget.js"; | ||
import Logger from "./logger.js"; | ||
|
||
export const reactionAppRoot = "https://raw.githubusercontent.com/reactioncommerce/reaction/trunk/apps/reaction"; | ||
export const reactionRoot = "https://raw.githubusercontent.com/reactioncommerce/reaction/trunk/"; | ||
|
||
/** | ||
* @summary get a single file via HTTP | ||
* @param {String} fileName - The file to get | ||
* @param {String} rootDir - path to root for file | ||
* @returns {Promise<string|*>} The contents of the file | ||
*/ | ||
export default async function getFileFromCore(fileName, rootDir = reactionAppRoot) { | ||
try { | ||
return wget(`${rootDir}/${fileName}`); | ||
} catch (error) { | ||
Logger.error(`Unable to get file from ${rootDir}/${fileName}`); | ||
throw error; | ||
} | ||
} |