Skip to content

fix(): exists-sync is a dev dependency, we should not use it in tasks… #232

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

Merged
merged 1 commit into from
Feb 20, 2016
Merged
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
13 changes: 12 additions & 1 deletion addon/ng2/tasks/lib-install.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
var Promise = require('ember-cli/lib/ext/promise');
var Task = require('ember-cli/lib/models/task');
var shellPromise = require ('../utilities/shell-promise');
var existsSync = require('exists-sync');
var chalk = require('chalk');
var path = require('path');
var fs = require('fs');
Expand All @@ -13,6 +12,18 @@ var glob = require('glob');
var appRoot = path.resolve('./src');
var nodeModules = path.resolve('./node_modules');


function existsSync(path) {
try {
fs.accessSync(path);
return true;
}
catch (e) {
return false;
}
}


module.exports = Task.extend({
command: '',
completionOKMessage: '',
Expand Down
13 changes: 12 additions & 1 deletion addon/ng2/tasks/lib-uninstall.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
var Promise = require('ember-cli/lib/ext/promise');
var Task = require('ember-cli/lib/models/task');
var shellPromise = require ('../utilities/shell-promise');
var existsSync = require('exists-sync');
var chalk = require('chalk');
var path = require('path');
var fs = require('fs');
Expand All @@ -14,6 +13,18 @@ var appRoot = path.resolve('./src');
var nodeModules = path.resolve('./node_modules');
var checkDirs = ['components', 'providers', 'directives', 'pipes'];


function existsSync(path) {
try {
fs.accessSync(path);
return true;
}
catch (e) {
return false;
}
}


module.exports = Task.extend({
command: '',
completionOKMessage: '',
Expand Down