Skip to content

Commit aa2c930

Browse files
hanslMRHarrison
authored andcommitted
fix(dependencies): reduce the dependencies further. (angular#3488)
Added a script that tells you if you are missing dependencies and if any dependencies are not needed.
1 parent ead6349 commit aa2c930

File tree

18 files changed

+197
-339
lines changed

18 files changed

+197
-339
lines changed

package.json

+5-11
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,13 @@
1212
"build": "node ./scripts/publish/build.js",
1313
"build:patch": "node ./scripts/patch.js",
1414
"build:packages": "for PKG in packages/*; do echo Building $PKG...; tsc -p $PKG; done",
15-
"test": "npm-run-all -c test:packages test:cli",
15+
"test": "npm-run-all -c test:packages test:cli test:deps",
1616
"e2e": "npm run test:e2e",
1717
"e2e:nightly": "node tests/e2e_runner.js --nightly",
1818
"mobile_test": "mocha tests/e2e/e2e_workflow.spec.js",
1919
"test:e2e": "node tests/e2e_runner.js",
2020
"test:cli": "node tests/runner",
21+
"test:deps": "node scripts/publish/validate_dependencies.js",
2122
"test:inspect": "node --inspect --debug-brk tests/runner",
2223
"test:packages": "node scripts/run-packages-spec.js",
2324
"build-config-interface": "dtsgen packages/angular-cli/lib/config/schema.json --out packages/angular-cli/lib/config/schema.d.ts",
@@ -51,7 +52,6 @@
5152
"chalk": "^1.1.3",
5253
"common-tags": "^1.3.1",
5354
"configstore": "^2.0.0",
54-
"core-js": "^2.4.0",
5555
"css-loader": "^0.23.1",
5656
"debug": "^2.1.3",
5757
"denodeify": "^1.2.1",
@@ -73,31 +73,28 @@
7373
"inquirer": "^0.12.0",
7474
"is-git-url": "^0.2.0",
7575
"isbinaryfile": "^2.0.3",
76-
"istanbul-instrumenter-loader": "^0.2.0",
7776
"json-loader": "^0.5.4",
7877
"karma-sourcemap-loader": "^0.3.7",
7978
"karma-webpack": "^1.8.0",
8079
"leek": "0.0.21",
8180
"less": "^2.7.1",
8281
"less-loader": "^2.2.3",
82+
"loader-utils": "^0.2.16",
8383
"lodash": "^4.11.1",
8484
"magic-string": "^0.16.0",
8585
"markdown-it": "4.3.0",
8686
"markdown-it-terminal": "0.0.3",
8787
"minimatch": "^3.0.0",
88-
"mkdirp": "^0.5.1",
8988
"node-modules-path": "^1.0.0",
9089
"node-sass": "^3.10.1",
9190
"nopt": "^3.0.1",
9291
"npm-run-all": "^3.0.0",
9392
"offline-plugin": "^3.4.1",
9493
"opn": "4.0.1",
9594
"ora": "^0.2.0",
96-
"parse5": "^2.1.5",
9795
"portfinder": "1.0.9",
9896
"postcss-discard-comments": "^2.0.4",
9997
"postcss-loader": "^0.9.1",
100-
"protractor": "^3.3.0",
10198
"quick-temp": "0.1.5",
10299
"raw-loader": "^0.5.1",
103100
"readline2": "0.1.1",
@@ -106,21 +103,18 @@
106103
"resolve": "^1.1.7",
107104
"rimraf": "^2.5.3",
108105
"rsvp": "^3.0.17",
109-
"rxjs": "5.0.0-beta.12",
110106
"sass-loader": "^3.2.0",
111107
"script-loader": "^0.7.0",
112108
"semver": "^5.1.0",
113109
"silent-error": "^1.0.0",
114110
"source-map": "^0.5.6",
115111
"source-map-loader": "^0.1.5",
116112
"sourcemap-istanbul-instrumenter-loader": "^0.2.0",
117-
"string-replace-loader": "^1.0.5",
118113
"style-loader": "^0.13.1",
119114
"stylus": "^0.54.5",
120115
"stylus-loader": "^2.1.0",
121116
"temp": "0.8.3",
122117
"through": "^2.3.6",
123-
"ts-loader": "^0.8.2",
124118
"tslint": "^3.15.1",
125119
"tslint-loader": "^3.3.0",
126120
"typescript": "~2.0.3",
@@ -131,8 +125,8 @@
131125
"webpack-dev-server": "2.1.0-beta.9",
132126
"webpack-md5-hash": "0.0.5",
133127
"webpack-merge": "^0.14.0",
134-
"yam": "0.0.18",
135-
"zone.js": "^0.6.23"
128+
"webpack-sources": "^0.1.3",
129+
"yam": "0.0.18"
136130
},
137131
"ember-addon": {
138132
"paths": [

packages/@ngtools/webpack/package.json

+7-3
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,18 @@
2525
"npm": ">= 3.0.0"
2626
},
2727
"dependencies": {
28-
"@angular-cli/ast-tools": "^1.0.0",
28+
"enhanced-resolve": "^2.3.0",
29+
"loader-utils": "^0.2.16",
2930
"magic-string": "^0.16.0",
3031
"source-map": "^0.5.6"
3132
},
3233
"peerDependencies": {
33-
"typescript": "^2.0.2",
34+
"@angular/compiler": "2.2.3",
3435
"@angular/compiler-cli": "2.2.3",
3536
"@angular/core": "2.2.3",
36-
"reflect-metadata": "^0.1.8"
37+
"@angular/tsc-wrapped": "0.4.0",
38+
"typescript": "^2.0.2",
39+
"reflect-metadata": "^0.1.8",
40+
"webpack": "^2.1.0-beta.25"
3741
}
3842
}

packages/@ngtools/webpack/tsconfig.json

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
"sourceRoot": "/",
1616
"baseUrl": "./",
1717
"paths": {
18-
"@angular-cli/ast-tools": [ "../../../dist/ast-tools/src" ]
1918
},
2019
"typeRoots": [
2120
"../../node_modules/@types"

packages/angular-cli/blueprints/ng2/files/package.json

+1-8
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,7 @@
2626
"ts-helpers": "^1.1.1",
2727
"zone.js": "^0.6.23"
2828
},
29-
"devDependencies": {<% if(isMobile) { %>
30-
"@angular/platform-server": "2.2.3",
31-
"@angular/service-worker": "0.2.0",
32-
"@angular/app-shell": "0.0.0",
33-
"angular2-universal":"0.104.5",
34-
"angular2-universal-polyfills": "0.4.1",
35-
"preboot": "2.1.2",
36-
"parse5": "1.5.1",<% } %>
29+
"devDependencies": {
3730
"@angular/compiler-cli": "2.2.3",
3831
"@types/jasmine": "2.5.38",
3932
"@types/node": "^6.0.42",

packages/angular-cli/ember-cli/lib/cli/cli.js

-6
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
var lookupCommand = require('./lookup-command');
44
var Promise = require('../ext/promise');
5-
var UpdateChecker = require('../models/update-checker');
65
var getOptionArgs = require('../utilities/get-option-args');
76
var debug = require('debug')('ember-cli:cli');
87
var debugTesting = require('debug')('ember-cli:testing');
@@ -66,11 +65,6 @@ CLI.prototype.run = function(environment) {
6665

6766
debug('command: %s', commandName);
6867

69-
if (commandName !== 'update' && !this.testing) {
70-
var a = new UpdateChecker(this.ui, environment.settings);
71-
update = a.checkForUpdates();
72-
}
73-
7468
if (!this.testing) {
7569
process.chdir(environment.project.root);
7670
var skipInstallationCheck = commandArgs.indexOf('--skip-installation-check') !== -1;

packages/angular-cli/ember-cli/lib/models/addon.js

-6
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ var AddonsFactory = require('../models/addons-factory');
2222
var CoreObject = require('../ext/core-object');
2323
var Project = require('./project');
2424

25-
// var upstreamMergeTrees = require('broccoli-merge-trees');
26-
// var Funnel = require('broccoli-funnel');
2725
var walkSync = require('walk-sync');
2826

2927

@@ -111,7 +109,6 @@ Addon.prototype._requireBuildPackages = function() {
111109
}
112110

113111
this.transpileModules = deprecatedAddonFilters(this, 'this.transpileModules', 'broccoli-es6modules', function(tree, options) {
114-
return new (require('broccoli-es6modules'))(tree, options);
115112
});
116113

117114
this.pickFiles = deprecatedAddonFilters(this, 'this.pickFiles', 'broccoli-funnel', function(tree, options) {
@@ -123,7 +120,6 @@ Addon.prototype._requireBuildPackages = function() {
123120
return new Funnel(tree, options);
124121
});
125122

126-
// this.mergeTrees = deprecatedAddonFilters(this, 'this.mergeTrees', 'broccoli-merge-trees', mergeTrees);
127123
this.walkSync = deprecatedAddonFilters(this, 'this.walkSync', 'node-walk-sync', walkSync);
128124
};
129125

@@ -152,8 +148,6 @@ function deprecatedAddonFilters(addon, name, insteadUse, fn) {
152148
@return {tree} Modified tree
153149
*/
154150
Addon.prototype.concatFiles = function(tree, options) {
155-
options.sourceMapConfig = this.app.options.sourcemaps;
156-
return require('broccoli-concat')(tree, options);
157151
};
158152

159153
/**

packages/angular-cli/ember-cli/lib/models/update-checker.js

-104
This file was deleted.

packages/angular-cli/ember-cli/lib/models/watcher.js

+3-8
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@ var Watcher = Task.extend({
1414
var options = this.buildOptions();
1515

1616
debug('initialize %o', options);
17-
18-
this.watcher = this.watcher || new (require('broccoli-sane-watcher'))(this.builder, options);
19-
20-
this.watcher.on('error', this.didError.bind(this));
21-
this.watcher.on('change', this.didChange.bind(this));
2217
},
2318

2419
didError: function(error) {
@@ -30,7 +25,7 @@ var Watcher = Task.extend({
3025
},
3126

3227
then: function() {
33-
return this.watcher.then.apply(this.watcher, arguments);
28+
// return this.watcher.then.apply(this.watcher, arguments);
3429
},
3530

3631
didChange: function(results) {
@@ -54,11 +49,11 @@ var Watcher = Task.extend({
5449
},
5550

5651
on: function() {
57-
this.watcher.on.apply(this.watcher, arguments);
52+
// this.watcher.on.apply(this.watcher, arguments);
5853
},
5954

6055
off: function() {
61-
this.watcher.off.apply(this.watcher, arguments);
56+
// this.watcher.off.apply(this.watcher, arguments);
6257
},
6358
buildOptions: function() {
6459
var watcher = this.options && this.options.watcher;

packages/angular-cli/ember-cli/lib/tasks.js

-1
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,4 @@ module.exports = {
88
NpmInstall: require('./tasks/npm-install'),
99
NpmTask: require('./tasks/npm-task'),
1010
NpmUninstall: require('./tasks/npm-uninstall'),
11-
Update: require('./tasks/update')
1211
};

0 commit comments

Comments
 (0)