Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename --pathToMake to --pathToElm #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const jsEmitterFilename = "emitter.js";
module.exports = function(
projectDir /*: string*/,
outputDir /*: string */,
pathToMake /*: ?string */
pathToElm /*: ?string */
) {
const cssSourceDir = path.join(projectDir, "css");
const cssElmPackageJson = path.join(cssSourceDir, "elm.json");
Expand Down Expand Up @@ -76,7 +76,7 @@ module.exports = function(
return Promise.all([
writeGeneratedElmPackage(generatedDir, generatedSrc, cssSourceDir),
makeGeneratedSrcDir,
compileAll(pathToMake, cssSourceDir, elmFilePaths)
compileAll(pathToElm, cssSourceDir, elmFilePaths)
]).then(function(promiseOutputs) {
const repository /*: string */ = promiseOutputs[0];

Expand Down Expand Up @@ -107,7 +107,7 @@ module.exports = function(
repository,
path.join(generatedDir, jsEmitterFilename),
generatedDir,
pathToMake
pathToElm
).then(writeResults(outputDir));
});
});
Expand All @@ -119,13 +119,13 @@ function emit(
repository /*: string */,
dest /*: string */,
cwd /*: string */,
pathToMake /*: ?string */
pathToElm /*: ?string */
) {
// Compile the js file.
return compileEmitter(src, {
output: dest,
cwd: cwd,
pathToMake: pathToMake
pathToElm: pathToElm
})
//.then(function() {
// return hackMain(repository, dest);
Expand Down
4 changes: 2 additions & 2 deletions js/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ program
"(optional) directory in which to write CSS files. Defaults to build/",
path.join(process.cwd(), "build")
)
.option("-m, --pathToMake [pathToMake]", "(optional) path to elm-make")
.option("-m, --pathToElm [pathToElm]", "(optional) path to elm")
.parse(process.argv);

const cssSourceDir = path.join(process.cwd(), "css");
Expand All @@ -34,7 +34,7 @@ const bar = _.repeat("-", headline.length);

console.log("\n" + headline + "\n" + bar + "\n");

elmCss(process.cwd(), program.output, program.pathToMake)
elmCss(process.cwd(), program.output, program.pathToElm)
.then(function(results) {
console.log(chalk.green("Success! I created these css files:"));
results.forEach(function(result) {
Expand Down
4 changes: 2 additions & 2 deletions js/compile-all.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const compile = require("node-elm-compiler").compile,
// This compiles all the tests so that we generate *.elmi files for them,
// which we can then read to determine which tests need to be run.
module.exports = function compileAll(
pathToMake /*: ?string */,
pathToElm /*: ?string */,
cwd /*: string */,
testFilePaths /*: Array<string> */
) {
Expand All @@ -20,7 +20,7 @@ module.exports = function compileAll(
output: "/dev/null",
verbose: false,
cwd: cwd,
pathToMake: pathToMake,
pathToElm: pathToElm,
processOpts: { stdio: ["ignore", "ignore", "inherit"] }
});

Expand Down