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

refactor: move exists-sync to a dev dependency #4311

Merged
merged 1 commit into from Feb 7, 2017
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
"ember-cli-normalize-entity-name": "^1.0.0",
"ember-cli-string-utils": "^1.0.0",
"enhanced-resolve": "^2.3.0",
"exists-sync": "0.0.3",
"extract-text-webpack-plugin": "^2.0.0-rc.1",
"file-loader": "^0.8.5",
"findup": "0.1.5",
Expand Down Expand Up @@ -136,6 +135,7 @@
"conventional-changelog": "^1.1.0",
"dtsgenerator": "^0.7.1",
"eslint": "^2.8.0",
"exists-sync": "0.0.3",
"express": "^4.14.0",
"jasmine": "^2.4.1",
"jasmine-spec-reporter": "^2.7.0",
Expand Down
1 change: 0 additions & 1 deletion packages/@angular/cli/ember-cli/lib/commands/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
var Command = require('../models/command');
var SilentError = require('silent-error');
var path = require('path');
var existsSync = require('exists-sync');

var defaultPort = 7357;

Expand Down
11 changes: 10 additions & 1 deletion packages/@angular/cli/ember-cli/lib/models/addon.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@module ember-cli
*/

var existsSync = require('exists-sync');
var fs = require('fs');
var path = require('path');
var assign = require('lodash/assign');
var SilentError = require('silent-error');
Expand All @@ -14,6 +14,15 @@ var CoreObject = require('../ext/core-object');

var walkSync = require('walk-sync');

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


/**
Expand Down
11 changes: 10 additions & 1 deletion packages/@angular/cli/ember-cli/lib/models/blueprint.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ var printableProperties = require('../utilities/printable-properties').blueprint
var sequence = require('../utilities/sequence');
var printCommand = require('../utilities/print-command');
var fs = require('fs-extra');
var existsSync = require('exists-sync');
var inflector = require('inflection');
var minimatch = require('minimatch');
var path = require('path');
Expand All @@ -35,6 +34,16 @@ var EOL = require('os').EOL;
var debug = require('debug')('ember-cli:blueprint');
var normalizeEntityName = require('ember-cli-normalize-entity-name');

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

module.exports = Blueprint;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,19 @@

var debug = require('debug')('ember-cli:installation-checker');
var fs = require('fs');
var existsSync = require('exists-sync');
var path = require('path');
var SilentError = require('silent-error');

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

module.exports = InstallationChecker;

function InstallationChecker(options) {
Expand Down
11 changes: 10 additions & 1 deletion packages/@angular/cli/ember-cli/lib/models/project.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ var path = require('path');
var findup = Promise.denodeify(require('findup'));
var resolve = Promise.denodeify(require('resolve'));
var fs = require('fs');
var existsSync = require('exists-sync');
var find = require('lodash/find');
var assign = require('lodash/assign');
var forOwn = require('lodash/forOwn');
Expand All @@ -19,6 +18,16 @@ var UI = require('../ui');
var nodeModulesPath = require('node-modules-path');
var getPackageBaseName = require('../utilities/get-package-base-name');

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

/**
The Project model is tied to your package.json. It is instiantiated
by giving Project.closest the path to your project.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,20 @@

var Promise = require('../ext/promise');
var fs = require('fs');
var existsSync = require('exists-sync');
var mkdir = Promise.denodeify(fs.mkdir);
var Task = require('../models/task');
var SilentError = require('silent-error');

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

module.exports = Task.extend({
// Options: String directoryName, Boolean: dryRun

Expand Down
1 change: 0 additions & 1 deletion packages/@angular/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
"diff": "^2.2.2",
"ember-cli-normalize-entity-name": "^1.0.0",
"ember-cli-string-utils": "^1.0.0",
"exists-sync": "0.0.3",
"extract-text-webpack-plugin": "^2.0.0-rc.1",
"file-loader": "^0.8.5",
"findup": "0.1.5",
Expand Down