Skip to content

Commit

Permalink
removed annoying console.log
Browse files Browse the repository at this point in the history
  • Loading branch information
frozeman committed May 6, 2020
1 parent e5de487 commit 70378a3
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .versions
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ecmascript-runtime@0.7.0
ecmascript-runtime-client@0.10.0
ecmascript-runtime-server@0.9.0
fetch@0.1.1
frozeman:build-client@0.4.2
frozeman:build-client@0.4.3
inter-process-messaging@0.1.1
meteor@1.9.3
minifier-css@1.5.0
Expand Down
23 changes: 11 additions & 12 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,35 +40,34 @@ program.parse(process.argv);
Q.try(function() {
if (!argPath) {
throw new Error("You need to provide a path for the build output, for example:\n\n$ meteor-build-client myBuildFolder");
}
}

if (!fs.lstatSync('./.meteor').isDirectory()) {
throw new Error('You\'re not in a Meteor app folder or inside a sub folder of your app.');
}

if(program.template && !fs.lstatSync(program.template).isFile()) {
throw new Error('The template file "'+ program.template +'" doesn\'t exist or is not a valid template file');
}
})
.then(function() {
/**
* Allow the user to decide whether or not they want to use the
/**
* Allow the user to decide whether or not they want to use the
* meteor-build-client build or their own
*/

console.log(program.usebuild,program);
if(program.usebuild && fs.lstatSync('../build').isDirectory()){
console.log('Using ../build');
console.log('Generating the index.html...');

return meteor.move();
}else{
console.log('Bundling Meteor app...');
console.log('Bundling Meteor app...');

return meteor.build(program)
.then(function(){
console.log('Generating the index.html...');

return meteor.move();
});
}
Expand All @@ -82,14 +81,14 @@ Q.try(function() {
.then(function() {
console.log('Done!');
console.log('-----');
console.log('You can find your files in "'+ require('path').resolve(argPath) +'".');
console.log('You can find your files in "'+ require('path').resolve(argPath) +'".');
})
.catch(function(err) {
if (err.stderr || err.stdout) {
console.error(err.stdout, err.stderr);
} else {
console.error(err);
}

process.exit(-1);
});
2 changes: 1 addition & 1 deletion package.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package.describe({
name: "frozeman:build-client",
summary: "Placeholder package for meteor-build-client (npm). Do not install!",
version: "0.4.2",
version: "0.4.3",
git: "https://github.com/frozeman/meteor-build-client"
});

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "meteor-build-client",
"version": "0.4.2",
"version": "0.4.3",
"description": "A bundles the client part of a Meteor app.",
"author": "Fabian Vogelsteller <fabian@frozeman.de>",
"contributors": [
Expand Down

0 comments on commit 70378a3

Please sign in to comment.