Skip to content

Commit 601f9b3

Browse files
authored
feat(@angular/cli): move angular-cli to @angular/cli (#4328)
This release is otherwise identical to beta.28.
1 parent 9b56edc commit 601f9b3

File tree

201 files changed

+191
-352
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

201 files changed

+191
-352
lines changed

.eslintignore

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ tmp/
44
typings/
55

66
# Ignore all blueprint files. We e2e tests those later on.
7-
packages/angular-cli/blueprints/*/files/
7+
packages/@angular/cli/blueprints/*/files/
88

99
# Ignore ember cli.
10-
packages/angular-cli/ember-cli/
10+
packages/@angular/cli/ember-cli/

CHANGELOG.md

+2-2

bin/ng

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
'use strict';
33

44
// Provide a title to the process in `ps`
5-
process.title = 'angular-cli';
5+
process.title = '@angular/cli';
66

77
require('../lib/bootstrap-local');
8-
require('../packages/angular-cli/bin/ng');
8+
require('../packages/@angular/cli/bin/ng');

lib/bootstrap-local.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ const oldRequireTs = require.extensions['.ts'];
1515
require.extensions['.ts'] = function(m, filename) {
1616
// If we're in node module, either call the old hook or simply compile the
1717
// file without transpilation. We do not touch node_modules/**.
18-
// We do touch `angular-cli` files anywhere though.
19-
if (!filename.match(/angular-cli/) && filename.match(/node_modules/)) {
18+
// We do touch `Angular CLI` files anywhere though.
19+
if (!filename.match(/@angular\/cli/) && filename.match(/node_modules/)) {
2020
if (oldRequireTs) {
2121
return oldRequireTs(m, filename);
2222
}
@@ -54,9 +54,9 @@ if (!__dirname.match(new RegExp(`\\${path.sep}node_modules\\${path.sep}`))) {
5454
Module._load = function (request, parent) {
5555
if (request in packages) {
5656
return oldLoad.call(this, packages[request].main, parent);
57-
} else if (request.startsWith('angular-cli/')) {
57+
} else if (request.startsWith('@angular/cli/')) {
5858
// We allow deep imports (for now).
59-
// TODO: move tests to inside angular-cli package so they don't have to deep import.
59+
// TODO: move tests to inside @angular/cli package so they don't have to deep import.
6060
const dir = path.dirname(parent.filename);
6161
const newRequest = path.relative(dir, path.join(__dirname, '../packages', request));
6262
return oldLoad.call(this, newRequest, parent);

package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"name": "angular-cli",
3-
"version": "1.0.0-beta.28.3",
2+
"name": "@angular/cli",
3+
"version": "1.0.0-beta.29",
44
"description": "CLI tool for Angular",
5-
"main": "packages/angular-cli/lib/cli/index.js",
5+
"main": "packages/@angular/cli/lib/cli/index.js",
66
"trackingCode": "UA-8594346-19",
77
"bin": {
88
"ng": "./bin/ng"
@@ -112,7 +112,7 @@
112112
},
113113
"ember-addon": {
114114
"paths": [
115-
"./packages/angular-cli/lib/addon"
115+
"./packages/@angular/cli/lib/addon"
116116
]
117117
},
118118
"devDependencies": {

packages/@angular-cli/ast-tools/src/change.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {InsertChange, NodeHost, RemoveChange, ReplaceChange} from './change';
88
import fs = require('fs');
99

1010
let path = require('path');
11-
let Promise = require('angular-cli/ember-cli/lib/ext/promise');
11+
let Promise = require('@angular/cli/ember-cli/lib/ext/promise');
1212

1313
const readFile = Promise.denodeify(fs.readFile);
1414

File renamed without changes.

packages/angular-cli/bin/ng packages/@angular/cli/bin/ng

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
'use strict';
33

44
// Provide a title to the process in `ps`
5-
process.title = 'angular-cli';
5+
process.title = '@angular/cli';
66

77
const CliConfig = require('../models/config').CliConfig;
88
const Version = require('../upgrade/version').Version;
@@ -20,7 +20,7 @@ function _fromPackageJson(cwd) {
2020
cwd = cwd || process.cwd();
2121

2222
do {
23-
const packageJsonPath = path.join(cwd, 'node_modules/angular-cli/package.json');
23+
const packageJsonPath = path.join(cwd, 'node_modules/@angular/cli/package.json');
2424
if (fs.existsSync(packageJsonPath)) {
2525
const content = fs.readFileSync(packageJsonPath, 'utf-8');
2626
if (content) {
@@ -87,7 +87,7 @@ if (require('../package.json')['name'] == 'angular-cli'
8787
}
8888

8989

90-
resolve('angular-cli', { basedir: process.cwd() },
90+
resolve('@angular/cli', { basedir: process.cwd() },
9191
function (error, projectLocalCli) {
9292
var cli;
9393
if (error) {

packages/angular-cli/blueprints/ng2/files/karma.conf.js packages/@angular/cli/blueprints/ng2/files/karma.conf.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@
44
module.exports = function (config) {
55
config.set({
66
basePath: '',
7-
frameworks: ['jasmine', 'angular-cli'],
7+
frameworks: ['jasmine', '@angular/cli'],
88
plugins: [
99
require('karma-jasmine'),
1010
require('karma-chrome-launcher'),
1111
require('karma-remap-istanbul'),
12-
require('angular-cli/plugins/karma')
12+
require('@angular/cli/plugins/karma')
1313
],
1414
files: [
1515
{ pattern: './<%= sourceDir %>/test.ts', watched: false }
1616
],
1717
preprocessors: {
18-
'./<%= sourceDir %>/test.ts': ['angular-cli']
18+
'./<%= sourceDir %>/test.ts': ['@angular/cli']
1919
},
2020
mime: {
2121
'text/x-typescript': ['ts','tsx']

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@
2626
"zone.js": "^0.7.2"
2727
},
2828
"devDependencies": {
29+
"@angular/cli": "<%= version %>",
2930
"@angular/compiler-cli": "^2.3.1",
3031
"@types/jasmine": "2.5.38",
3132
"@types/node": "^6.0.42",
32-
"angular-cli": "<%= version %>",
3333
"codelyzer": "~2.0.0-beta.1",
3434
"jasmine-core": "2.5.2",
3535
"jasmine-spec-reporter": "2.5.0",

packages/angular-cli/commands/build.ts packages/@angular/cli/commands/build.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export const BaseBuildCommandOptions: any = [
1212
},
1313
{ name: 'environment', type: String, aliases: ['e'] },
1414
{ name: 'output-path', type: 'Path', aliases: ['op'] },
15-
{ name: 'aot', type: Boolean, default: false },
15+
{ name: 'aot', type: Boolean },
1616
{ name: 'sourcemap', type: Boolean, aliases: ['sm'] },
1717
{ name: 'vendor-chunk', type: Boolean, default: true, aliases: ['vc'] },
1818
{ name: 'base-href', type: String, default: '/', aliases: ['bh'] },
File renamed without changes.
File renamed without changes.

packages/angular-cli/commands/generate.ts packages/@angular/cli/commands/generate.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ const GenerateCommand = EmberGenerateCommand.extend({
2121

2222
if (rawArgs[0] !== '--help' &&
2323
!fs.existsSync(path.join(__dirname, '..', 'blueprints', rawArgs[0]))) {
24-
SilentError.debugOrThrow('angular-cli/commands/generate', `Invalid blueprint: ${rawArgs[0]}`);
24+
SilentError.debugOrThrow('@angular/cli/commands/generate', `Invalid blueprint: ${rawArgs[0]}`);
2525
}
2626

2727
if (!rawArgs[1]) {
28-
SilentError.debugOrThrow('angular-cli/commands/generate',
28+
SilentError.debugOrThrow('@angular/cli/commands/generate',
2929
`The \`ng generate ${rawArgs[0]}\` command requires a name to be specified.`);
3030
}
3131

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

packages/angular-cli/commands/version.ts packages/@angular/cli/commands/version.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ const VersionCommand = Command.extend({
5454
\\__,_||_| |_| \\__, | \\__,_||_| \\__,_||_| \\___||_||_|
5555
|___/`;
5656
this.ui.writeLine(chalk.red(asciiArt));
57-
this.printVersion('angular-cli', ngCliVersion);
57+
this.printVersion('@angular/cli', ngCliVersion);
5858

5959
for (const module of Object.keys(versions)) {
6060
const isRoot = roots.some(root => module.startsWith(root));

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ Addon.prototype.initializeAddons = function() {
5858
}
5959
this._addonsInitialized = true;
6060
this.addonPackages = {
61-
'angular-cli': {
62-
name: 'angular-cli',
61+
'@angular/cli': {
62+
name: '@angular/cli',
6363
path: path.join(__dirname, '../../../'),
6464
pkg: cliPkg,
6565
}

packages/angular-cli/ember-cli/lib/models/command.js packages/@angular/cli/ember-cli/lib/models/command.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ Command.prototype.parseAlias = function(option, alias) {
275275
try {
276276
aliasValue = JSON.parse(alias);
277277
} catch (e) {
278-
var debug = require('debug')('angular-cli/ember-cli/models/command');
278+
var debug = require('debug')('@angular/cli/ember-cli/models/command');
279279
debug(e);
280280
}
281281
}

packages/angular-cli/ember-cli/lib/models/project.js packages/@angular/cli/ember-cli/lib/models/project.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ Project.prototype.initializeAddons = function() {
293293
const cliPkg = require(path.resolve(__dirname, '../../../package.json'));
294294
const Addon = require('../models/addon');
295295
const Constructor = Addon.lookup({
296-
name: 'angular-cli',
296+
name: '@angular/cli',
297297
path: path.join(__dirname, '../../../'),
298298
pkg: cliPkg,
299299
});

packages/angular-cli/lib/cli/index.js packages/@angular/cli/lib/cli/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ module.exports = function(options) {
2828
options.cli = {
2929
name: 'ng',
3030
root: path.join(__dirname, '..', '..'),
31-
npmPackage: 'angular-cli'
31+
npmPackage: '@angular/cli'
3232
};
3333

3434
// ensure the environemnt variable for dynamic paths
File renamed without changes.
File renamed without changes.

packages/angular-cli/package.json packages/@angular/cli/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "angular-cli",
3-
"version": "1.0.0-beta.28.3",
2+
"name": "@angular/cli",
3+
"version": "1.0.0-beta.29",
44
"description": "CLI tool for Angular",
55
"main": "lib/cli/index.js",
66
"trackingCode": "UA-8594346-19",
@@ -16,7 +16,7 @@
1616
"url": "https://github.com/angular/angular-cli.git"
1717
},
1818
"engines": {
19-
"node": ">= 4.1.0",
19+
"node": ">= 6.9.0",
2020
"npm": ">= 3.0.0"
2121
},
2222
"author": "Angular Authors",

packages/angular-cli/plugins/karma.js packages/@angular/cli/plugins/karma.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ const init = (config) => {
6363

6464
// replace the angular-cli preprocessor with webpack+sourcemap
6565
Object.keys(config.preprocessors)
66-
.filter((file) => config.preprocessors[file].indexOf('angular-cli') !== -1)
66+
.filter((file) => config.preprocessors[file].indexOf('@angular/cli') !== -1)
6767
.map((file) => config.preprocessors[file])
68-
.map((arr) => arr.splice(arr.indexOf('angular-cli'), 1, 'webpack', 'sourcemap'));
68+
.map((arr) => arr.splice(arr.indexOf('@angular/cli'), 1, 'webpack', 'sourcemap'));
6969

7070
// Add polyfills file
7171
if (appConfig.polyfills) {
@@ -108,6 +108,6 @@ preprocessor.$inject = [];
108108

109109
// also export karma-webpack and karma-sourcemap-loader
110110
module.exports = Object.assign({
111-
'framework:angular-cli': ['factory', init],
112-
'preprocessor:angular-cli': ['factory', preprocessor]
111+
'framework:@angular/cli': ['factory', init],
112+
'preprocessor:@angular/cli': ['factory', preprocessor]
113113
}, require('karma-webpack'), require('karma-sourcemap-loader'));
File renamed without changes.
File renamed without changes.
File renamed without changes.

packages/angular-cli/tasks/git-init.js packages/@angular/cli/tasks/git-init.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ var template = require('lodash/template');
99
var Task = require('../ember-cli/lib/models/task');
1010

1111
var gitEnvironmentVariables = {
12-
GIT_AUTHOR_NAME: 'angular-cli',
12+
GIT_AUTHOR_NAME: 'Angular CLI',
1313
GIT_AUTHOR_EMAIL: '[email protected]',
1414
get GIT_COMMITTER_NAME() {
1515
return this.GIT_AUTHOR_NAME;

packages/angular-cli/tasks/link-cli.ts packages/@angular/cli/tasks/link-cli.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ export default Task.extend({
77
const ui = this.ui;
88

99
return new Promise(function(resolve, reject) {
10-
exec('npm link angular-cli', (err) => {
10+
exec('npm link @angular/cli', (err) => {
1111
if (err) {
12-
ui.writeLine(chalk.red('Couldn\'t do \'npm link angular-cli\'.'));
12+
ui.writeLine(chalk.red('Couldn\'t do \'npm link @angular/cli\'.'));
1313
reject();
1414
} else {
15-
ui.writeLine(chalk.green('Successfully linked to angular-cli.'));
15+
ui.writeLine(chalk.green('Successfully linked to @angular/cli.'));
1616
resolve();
1717
}
1818
});
File renamed without changes.

packages/angular-cli/tasks/serve.ts packages/@angular/cli/tasks/serve.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export default Task.extend({
4747
`);
4848
ui.writeLine(' The project will still live reload when HMR is enabled,');
4949
ui.writeLine(' but to take advantage of HMR additional application code is required');
50-
ui.writeLine(' (not included in an angular-cli project by default).');
50+
ui.writeLine(' (not included in an Angular CLI project by default).');
5151
ui.writeLine(` See ${chalk.blue(webpackHmrLink)}`);
5252
ui.writeLine(' for information on working with HMR for Webpack.');
5353
entryPoints.push('webpack/hot/dev-server');
File renamed without changes.

packages/angular-cli/tsconfig.json packages/@angular/cli/tsconfig.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,23 @@
88
"moduleResolution": "node",
99
"noEmitOnError": true,
1010
"noImplicitAny": true,
11-
"outDir": "../../dist/angular-cli",
11+
"outDir": "../../../dist/@angular/cli",
1212
"rootDir": ".",
1313
"sourceMap": true,
1414
"sourceRoot": "/",
1515
"target": "es5",
1616
"lib": ["es6"],
1717
"skipLibCheck": true,
1818
"typeRoots": [
19-
"../../node_modules/@types"
19+
"../../../node_modules/@types"
2020
],
2121
"baseUrl": "",
2222
"paths": {
23-
"@angular-cli/ast-tools": [ "../../dist/@angular-cli/ast-tools/src" ],
24-
"@angular-cli/base-href-webpack": [ "../../dist/@angular-cli/base-href-webpack/src" ],
25-
"@angular-cli/version": [ "../../dist/@angular-cli/version/src" ],
26-
"@ngtools/json-schema": [ "../../dist/@ngtools/json-schema/src" ],
27-
"@ngtools/webpack": [ "../../dist/@ngtools/webpack/src" ]
23+
"@angular-cli/ast-tools": [ "../../../dist/@angular-cli/ast-tools/src" ],
24+
"@angular-cli/base-href-webpack": [ "../../../dist/@angular-cli/base-href-webpack/src" ],
25+
"@angular-cli/version": [ "../../../dist/@angular-cli/version/src" ],
26+
"@ngtools/json-schema": [ "../../../dist/@ngtools/json-schema/src" ],
27+
"@ngtools/webpack": [ "../../../dist/@ngtools/webpack/src" ]
2828
}
2929
},
3030
"include": [

packages/angular-cli/upgrade/version.ts packages/@angular/cli/upgrade/version.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export class Version {
6262
let packageJson: any = null;
6363

6464
try {
65-
const angularCliPath = resolve.sync('angular-cli', {
65+
const angularCliPath = resolve.sync('@angular/cli', {
6666
basedir: process.cwd(),
6767
packageFilter: (pkg: any, pkgFile: string) => {
6868
packageJson = pkg;

packages/angular-cli/utilities/INITIAL_COMMIT_MESSAGE.txt packages/@angular/cli/utilities/INITIAL_COMMIT_MESSAGE.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
chore: initial commit from angular-cli
1+
chore: initial commit from @angular/cli
22
_ _ _
33
__ _ _ __ __ _ _ _| | __ _ _ __ ___| (_)
44
/ _ | _ \ / _ | | | | |/ _ | __|____ / __| | |

plugins/karma.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// This file is necessary when using a linked angular-cli to this repo, meaning that
22
// require('angular-cli/plugins/karma') will load this file, and we just forward to
33
// the actual published file.
4-
module.exports = require('../packages/angular-cli/plugins/karma');
4+
module.exports = require('../packages/@angular/cli/plugins/karma');

0 commit comments

Comments
 (0)