Skip to content

feat(@angular/cli): move angular-cli to @angular/cli #4328

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 2, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ tmp/
typings/

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

# Ignore ember cli.
packages/angular-cli/ember-cli/
packages/@angular/cli/ember-cli/
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<a name="1.0.0-beta.27"></a>
# [1.0.0-beta.27](https://github.com/angular/angular-cli/compare/v1.0.0-beta.26...v1.0.0-beta.27) (2017-02-01)
<a name="1.0.0-beta.28"></a>
# [1.0.0-beta.28](https://github.com/angular/angular-cli/compare/v1.0.0-beta.26...v1.0.0-beta.28) (2017-02-01)


### Bug Fixes
Expand Down
4 changes: 2 additions & 2 deletions bin/ng
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
'use strict';

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

require('../lib/bootstrap-local');
require('../packages/angular-cli/bin/ng');
require('../packages/@angular/cli/bin/ng');
8 changes: 4 additions & 4 deletions lib/bootstrap-local.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ const oldRequireTs = require.extensions['.ts'];
require.extensions['.ts'] = function(m, filename) {
// If we're in node module, either call the old hook or simply compile the
// file without transpilation. We do not touch node_modules/**.
// We do touch `angular-cli` files anywhere though.
if (!filename.match(/angular-cli/) && filename.match(/node_modules/)) {
// We do touch `Angular CLI` files anywhere though.
if (!filename.match(/@angular\/cli/) && filename.match(/node_modules/)) {
if (oldRequireTs) {
return oldRequireTs(m, filename);
}
Expand Down Expand Up @@ -54,9 +54,9 @@ if (!__dirname.match(new RegExp(`\\${path.sep}node_modules\\${path.sep}`))) {
Module._load = function (request, parent) {
if (request in packages) {
return oldLoad.call(this, packages[request].main, parent);
} else if (request.startsWith('angular-cli/')) {
} else if (request.startsWith('@angular/cli/')) {
// We allow deep imports (for now).
// TODO: move tests to inside angular-cli package so they don't have to deep import.
// TODO: move tests to inside @angular/cli package so they don't have to deep import.
const dir = path.dirname(parent.filename);
const newRequest = path.relative(dir, path.join(__dirname, '../packages', request));
return oldLoad.call(this, newRequest, parent);
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "angular-cli",
"version": "1.0.0-beta.28.3",
"name": "@angular/cli",
"version": "1.0.0-beta.29",
"description": "CLI tool for Angular",
"main": "packages/angular-cli/lib/cli/index.js",
"main": "packages/@angular/cli/lib/cli/index.js",
"trackingCode": "UA-8594346-19",
"bin": {
"ng": "./bin/ng"
Expand Down Expand Up @@ -112,7 +112,7 @@
},
"ember-addon": {
"paths": [
"./packages/angular-cli/lib/addon"
"./packages/@angular/cli/lib/addon"
]
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/@angular-cli/ast-tools/src/change.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {InsertChange, NodeHost, RemoveChange, ReplaceChange} from './change';
import fs = require('fs');

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

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

Expand Down
6 changes: 3 additions & 3 deletions packages/angular-cli/bin/ng → packages/@angular/cli/bin/ng
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
'use strict';

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

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

do {
const packageJsonPath = path.join(cwd, 'node_modules/angular-cli/package.json');
const packageJsonPath = path.join(cwd, 'node_modules/@angular/cli/package.json');
if (fs.existsSync(packageJsonPath)) {
const content = fs.readFileSync(packageJsonPath, 'utf-8');
if (content) {
Expand Down Expand Up @@ -87,7 +87,7 @@ if (require('../package.json')['name'] == 'angular-cli'
}


resolve('angular-cli', { basedir: process.cwd() },
resolve('@angular/cli', { basedir: process.cwd() },
function (error, projectLocalCli) {
var cli;
if (error) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', 'angular-cli'],
frameworks: ['jasmine', '@angular/cli'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-remap-istanbul'),
require('angular-cli/plugins/karma')
require('@angular/cli/plugins/karma')
],
files: [
{ pattern: './<%= sourceDir %>/test.ts', watched: false }
],
preprocessors: {
'./<%= sourceDir %>/test.ts': ['angular-cli']
'./<%= sourceDir %>/test.ts': ['@angular/cli']
},
mime: {
'text/x-typescript': ['ts','tsx']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
"zone.js": "^0.7.2"
},
"devDependencies": {
"@angular/cli": "<%= version %>",
"@angular/compiler-cli": "^2.3.1",
"@types/jasmine": "2.5.38",
"@types/node": "^6.0.42",
"angular-cli": "<%= version %>",
"codelyzer": "~2.0.0-beta.1",
"jasmine-core": "2.5.2",
"jasmine-spec-reporter": "2.5.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const BaseBuildCommandOptions: any = [
},
{ name: 'environment', type: String, aliases: ['e'] },
{ name: 'output-path', type: 'Path', aliases: ['op'] },
{ name: 'aot', type: Boolean, default: false },
{ name: 'aot', type: Boolean },
{ name: 'sourcemap', type: Boolean, aliases: ['sm'] },
{ name: 'vendor-chunk', type: Boolean, default: true, aliases: ['vc'] },
{ name: 'base-href', type: String, default: '/', aliases: ['bh'] },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ const GenerateCommand = EmberGenerateCommand.extend({

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

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const VersionCommand = Command.extend({
\\__,_||_| |_| \\__, | \\__,_||_| \\__,_||_| \\___||_||_|
|___/`;
this.ui.writeLine(chalk.red(asciiArt));
this.printVersion('angular-cli', ngCliVersion);
this.printVersion('@angular/cli', ngCliVersion);

for (const module of Object.keys(versions)) {
const isRoot = roots.some(root => module.startsWith(root));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ Addon.prototype.initializeAddons = function() {
}
this._addonsInitialized = true;
this.addonPackages = {
'angular-cli': {
name: 'angular-cli',
'@angular/cli': {
name: '@angular/cli',
path: path.join(__dirname, '../../../'),
pkg: cliPkg,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ Command.prototype.parseAlias = function(option, alias) {
try {
aliasValue = JSON.parse(alias);
} catch (e) {
var debug = require('debug')('angular-cli/ember-cli/models/command');
var debug = require('debug')('@angular/cli/ember-cli/models/command');
debug(e);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ Project.prototype.initializeAddons = function() {
const cliPkg = require(path.resolve(__dirname, '../../../package.json'));
const Addon = require('../models/addon');
const Constructor = Addon.lookup({
name: 'angular-cli',
name: '@angular/cli',
path: path.join(__dirname, '../../../'),
pkg: cliPkg,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ module.exports = function(options) {
options.cli = {
name: 'ng',
root: path.join(__dirname, '..', '..'),
npmPackage: 'angular-cli'
npmPackage: '@angular/cli'
};

// ensure the environemnt variable for dynamic paths
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-cli",
"version": "1.0.0-beta.28.3",
"name": "@angular/cli",
"version": "1.0.0-beta.29",
"description": "CLI tool for Angular",
"main": "lib/cli/index.js",
"trackingCode": "UA-8594346-19",
Expand All @@ -16,7 +16,7 @@
"url": "https://github.com/angular/angular-cli.git"
},
"engines": {
"node": ">= 4.1.0",
"node": ">= 6.9.0",
"npm": ">= 3.0.0"
},
"author": "Angular Authors",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ const init = (config) => {

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

// Add polyfills file
if (appConfig.polyfills) {
Expand Down Expand Up @@ -108,6 +108,6 @@ preprocessor.$inject = [];

// also export karma-webpack and karma-sourcemap-loader
module.exports = Object.assign({
'framework:angular-cli': ['factory', init],
'preprocessor:angular-cli': ['factory', preprocessor]
'framework:@angular/cli': ['factory', init],
'preprocessor:@angular/cli': ['factory', preprocessor]
}, require('karma-webpack'), require('karma-sourcemap-loader'));
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ var template = require('lodash/template');
var Task = require('../ember-cli/lib/models/task');

var gitEnvironmentVariables = {
GIT_AUTHOR_NAME: 'angular-cli',
GIT_AUTHOR_NAME: 'Angular CLI',
GIT_AUTHOR_EMAIL: '[email protected]',
get GIT_COMMITTER_NAME() {
return this.GIT_AUTHOR_NAME;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ export default Task.extend({
const ui = this.ui;

return new Promise(function(resolve, reject) {
exec('npm link angular-cli', (err) => {
exec('npm link @angular/cli', (err) => {
if (err) {
ui.writeLine(chalk.red('Couldn\'t do \'npm link angular-cli\'.'));
ui.writeLine(chalk.red('Couldn\'t do \'npm link @angular/cli\'.'));
reject();
} else {
ui.writeLine(chalk.green('Successfully linked to angular-cli.'));
ui.writeLine(chalk.green('Successfully linked to @angular/cli.'));
resolve();
}
});
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export default Task.extend({
`);
ui.writeLine(' The project will still live reload when HMR is enabled,');
ui.writeLine(' but to take advantage of HMR additional application code is required');
ui.writeLine(' (not included in an angular-cli project by default).');
ui.writeLine(' (not included in an Angular CLI project by default).');
ui.writeLine(` See ${chalk.blue(webpackHmrLink)}`);
ui.writeLine(' for information on working with HMR for Webpack.');
entryPoints.push('webpack/hot/dev-server');
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,23 @@
"moduleResolution": "node",
"noEmitOnError": true,
"noImplicitAny": true,
"outDir": "../../dist/angular-cli",
"outDir": "../../../dist/@angular/cli",
"rootDir": ".",
"sourceMap": true,
"sourceRoot": "/",
"target": "es5",
"lib": ["es6"],
"skipLibCheck": true,
"typeRoots": [
"../../node_modules/@types"
"../../../node_modules/@types"
],
"baseUrl": "",
"paths": {
"@angular-cli/ast-tools": [ "../../dist/@angular-cli/ast-tools/src" ],
"@angular-cli/base-href-webpack": [ "../../dist/@angular-cli/base-href-webpack/src" ],
"@angular-cli/version": [ "../../dist/@angular-cli/version/src" ],
"@ngtools/json-schema": [ "../../dist/@ngtools/json-schema/src" ],
"@ngtools/webpack": [ "../../dist/@ngtools/webpack/src" ]
"@angular-cli/ast-tools": [ "../../../dist/@angular-cli/ast-tools/src" ],
"@angular-cli/base-href-webpack": [ "../../../dist/@angular-cli/base-href-webpack/src" ],
"@angular-cli/version": [ "../../../dist/@angular-cli/version/src" ],
"@ngtools/json-schema": [ "../../../dist/@ngtools/json-schema/src" ],
"@ngtools/webpack": [ "../../../dist/@ngtools/webpack/src" ]
}
},
"include": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export class Version {
let packageJson: any = null;

try {
const angularCliPath = resolve.sync('angular-cli', {
const angularCliPath = resolve.sync('@angular/cli', {
basedir: process.cwd(),
packageFilter: (pkg: any, pkgFile: string) => {
packageJson = pkg;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
chore: initial commit from angular-cli
chore: initial commit from @angular/cli
_ _ _
__ _ _ __ __ _ _ _| | __ _ _ __ ___| (_)
/ _ | _ \ / _ | | | | |/ _ | __|____ / __| | |
Expand Down
2 changes: 1 addition & 1 deletion plugins/karma.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This file is necessary when using a linked angular-cli to this repo, meaning that
// require('angular-cli/plugins/karma') will load this file, and we just forward to
// the actual published file.
module.exports = require('../packages/angular-cli/plugins/karma');
module.exports = require('../packages/@angular/cli/plugins/karma');
Loading