Created
December 28, 2012 00:17
-
-
Save zenorocha/4393426 to your computer and use it in GitHub Desktop.
Docpad Tasks on Yogi Alloy
This file contains hidden or 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
| /* | |
| * Copyright (c) 2012, Liferay Inc. All rights reserved. | |
| * Code licensed under the BSD License: | |
| * https://github.com/liferay/alloy-ui/blob/master/LICENSE.txt | |
| * | |
| * @author Zeno Rocha <zeno.rocha@liferay.com> | |
| */ | |
| // -- Yogi Alloy Header -------------------------------------------------------- | |
| var YOGI_PATH = process.env.YOGI_PATH, | |
| YOGI_ALLOY_PATH = __dirname + '/../'; | |
| var path = require('path'); | |
| function requireAlloy(p) { | |
| return require(path.join(YOGI_ALLOY_PATH, p)); | |
| } | |
| function requireYogi(p) { | |
| return require(path.join(YOGI_PATH, p)); | |
| } | |
| // -- Requires ----------------------------------------------------------------- | |
| var log = requireYogi('lib/log'), | |
| exec = require('child_process').exec; | |
| // -- Docpad ------------------------------------------------------------------ | |
| exports.run = function() { | |
| var runner = exec('docpad run'); | |
| runner.on('stdout', function(data) { | |
| log.info(data); | |
| }); | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment