-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9cdf50e
commit 3cdfa0c
Showing
21 changed files
with
414 additions
and
231 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
Binary file not shown.
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,36 @@ | ||
"use strict"; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
return new (P || (P = Promise))(function (resolve, reject) { | ||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | ||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | ||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | ||
step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||
}); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.build = exports.do_build = void 0; | ||
const detect_project_type_1 = require("@merrymake/detect-project-type"); | ||
const utils_1 = require("../utils"); | ||
function do_build() { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
try { | ||
const projectType = (0, detect_project_type_1.detectProjectType)("."); | ||
(0, utils_1.output2)(`Building ${projectType} project...`); | ||
const buildCommands = detect_project_type_1.BUILD_SCRIPT_MAKERS[projectType]("."); | ||
for (let i = 0; i < buildCommands.length; i++) { | ||
const x = buildCommands[i]; | ||
yield (0, utils_1.spawnPromise)(x); | ||
} | ||
} | ||
catch (e) { | ||
throw e; | ||
} | ||
}); | ||
} | ||
exports.do_build = do_build; | ||
function build() { | ||
(0, utils_1.addToExecuteQueue)(() => do_build()); | ||
return (0, utils_1.finish)(); | ||
} | ||
exports.build = build; |
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,24 @@ | ||
import { | ||
BUILD_SCRIPT_MAKERS, | ||
detectProjectType, | ||
} from "@merrymake/detect-project-type"; | ||
import { addToExecuteQueue, finish, output2, spawnPromise } from "../utils"; | ||
|
||
export async function do_build() { | ||
try { | ||
const projectType = detectProjectType("."); | ||
output2(`Building ${projectType} project...`); | ||
const buildCommands = BUILD_SCRIPT_MAKERS[projectType]("."); | ||
for (let i = 0; i < buildCommands.length; i++) { | ||
const x = buildCommands[i]; | ||
await spawnPromise(x); | ||
} | ||
} catch (e) { | ||
throw e; | ||
} | ||
} | ||
|
||
export function build() { | ||
addToExecuteQueue(() => do_build()); | ||
return finish(); | ||
} |
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
Oops, something went wrong.