Skip to content

Commit

Permalink
rewrite createEmptyMeteorProject
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbutler committed Jan 4, 2017
1 parent 7520ac1 commit 0efc400
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
4 changes: 4 additions & 0 deletions History.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
1.6.0 / 2017-1-4
==================
* use meteor create --bare instead of deleting files

1.5.5 / 2017-1-4
==================
* use default meteor es6 support (remove babel)
Expand Down
8 changes: 1 addition & 7 deletions lib/tools/meteor.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ var Future = require('fibers/future');
var path = require('path');
var fs = require('fs');
var _ = require('underscore');
var del = require('delete');

module.exports = {};

Expand All @@ -29,12 +28,7 @@ module.exports.createEmptyMeteorProject = function createEmptyMeteorProject(name
try {
var spinHandle = this.logWithSpinner('Creating project ', name);
var appDirectory = path.join(opts.cwd, name);
this.execSync('meteor create ' + name, {cwd: opts.cwd, silent: true});
_.each(fs.readdirSync(appDirectory), function (entryPath) {
if (entryPath === '.git') return;
if (entryPath === '.meteor') return;
del.sync(path.join(appDirectory, entryPath));
});
this.execSync(`meteor create ${name} --bare`, {cwd: opts.cwd, silent: true});
} finally {
// stop the spinny thing
spinHandle.stop();
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": "iron-meteor",
"version": "1.5.5",
"version": "1.6.0",
"description": "A command line tool for scaffolding Meteor applications.",
"homepage": "https://github.com/iron-meteor/iron-cli",
"bugs": {
Expand Down

0 comments on commit 0efc400

Please sign in to comment.