@angular/cli
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -10,8 +10,6 @@ import { <%= jsComponentName %>Page } from './app.po'; | ||
it('should display welcome message', done => { | ||
it('should display welcome message', () => { | ||
page.navigateTo(); | ||
page.getParagraphText() | ||
.then(msg => expect(msg).toEqual('Welcome to <%= prefix %>!!')) | ||
.then(done, done.fail); | ||
expect(page.getParagraphText()).toEqual('Welcome to <%= prefix %>!!'); | ||
}); | ||
}); |
@@ -6,4 +6,2 @@ 'use strict'; | ||
var Project = require('../models/project'); | ||
var commands = require('../commands'); | ||
var tasks = require('../tasks'); | ||
var CLI = require('./cli'); | ||
@@ -44,5 +42,5 @@ var debug = require('debug')('ember-cli:cli/index'); | ||
var environment = { | ||
tasks: tasks, | ||
tasks: options.tasks || {}, | ||
cliArgs: options.cliArgs, | ||
commands: commands, | ||
commands: options.commands || {}, | ||
project: project, | ||
@@ -49,0 +47,0 @@ settings: defaultUpdateCheckerOptions |
@@ -263,13 +263,2 @@ 'use strict'; | ||
debug('initializeAddons for: %s', this.name()); | ||
const cliPkg = require(path.resolve(__dirname, '../../../package.json')); | ||
const Addon = require('../models/addon'); | ||
const Constructor = Addon.lookup({ | ||
name: '@angular/cli', | ||
path: path.join(__dirname, '../../../'), | ||
pkg: cliPkg, | ||
}); | ||
const addon = new Constructor(this.addonParent, this); | ||
this.addons = [addon]; | ||
}; | ||
@@ -338,3 +327,3 @@ | ||
Project.prototype.localBlueprintLookupPath = function() { | ||
return path.join(this.root, 'blueprints'); | ||
return path.join(this.cli.root, 'blueprints'); | ||
}; | ||
@@ -350,3 +339,3 @@ | ||
Project.prototype.blueprintLookupPaths = function() { | ||
return this.addonBlueprintLookupPaths(); | ||
return [this.localBlueprintLookupPath()]; | ||
}; | ||
@@ -353,0 +342,0 @@ |
@@ -13,3 +13,28 @@ /*eslint-disable no-console */ | ||
function loadCommands() { | ||
return { | ||
'build': require('../../commands/build').default, | ||
'serve': require('../../commands/serve').default, | ||
'eject': require('../../commands/eject').default, | ||
'new': require('../../commands/new').default, | ||
'generate': require('../../commands/generate').default, | ||
'destroy': require('../../commands/destroy').default, | ||
'test': require('../../commands/test').default, | ||
'e2e': require('../../commands/e2e').default, | ||
'help': require('../../commands/help').default, | ||
'lint': require('../../commands/lint').default, | ||
'version': require('../../commands/version').default, | ||
'completion': require('../../commands/completion').default, | ||
'doc': require('../../commands/doc').default, | ||
'xi18n': require('../../commands/xi18n').default, | ||
// Easter eggs. | ||
'make-this-awesome': require('../../commands/easter-egg').default, | ||
// Configuration. | ||
'set': require('../../commands/set').default, | ||
'get': require('../../commands/get').default | ||
}; | ||
} | ||
module.exports = function(options) { | ||
@@ -26,2 +51,4 @@ | ||
options.commands = loadCommands(); | ||
// ensure the environemnt variable for dynamic paths | ||
@@ -28,0 +55,0 @@ process.env.PWD = path.normalize(process.env.PWD || process.cwd()); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const fs = require("fs"); | ||
const webpack = require("webpack"); | ||
@@ -21,2 +22,4 @@ const path = require("path"); | ||
const nodeModules = path.resolve(projectRoot, 'node_modules'); | ||
// Resolves all symlink to get the actual node modules folder. | ||
const realNodeModules = fs.realpathSync(nodeModules); | ||
// --aot puts the generated *.ngfactory.ts in src/$$_gendir/node_modules. | ||
@@ -27,4 +30,8 @@ const genDirNodeModules = path.resolve(appRoot, '$$_gendir', 'node_modules'); | ||
chunks: ['main'], | ||
minChunks: (module) => module.resource && | ||
(module.resource.startsWith(nodeModules) || module.resource.startsWith(genDirNodeModules)) | ||
minChunks: (module) => { | ||
return module.resource | ||
&& (module.resource.startsWith(nodeModules) | ||
|| module.resource.startsWith(genDirNodeModules) | ||
|| module.resource.startsWith(realNodeModules)); | ||
} | ||
})); | ||
@@ -31,0 +38,0 @@ } |
@@ -60,5 +60,5 @@ "use strict"; | ||
resolveLoader: { | ||
modules: [nodeModules] | ||
modules: [nodeModules, 'node_modules'] | ||
}, | ||
context: projectRoot, | ||
context: __dirname, | ||
entry: entryPoints, | ||
@@ -65,0 +65,0 @@ output: { |
@@ -52,3 +52,3 @@ "use strict"; | ||
hostReplacementPaths = { | ||
[path.join(appRoot, sourcePath)]: path.join(appRoot, envFile) | ||
[path.resolve(appRoot, sourcePath)]: path.resolve(appRoot, envFile) | ||
}; | ||
@@ -55,0 +55,0 @@ } |
{ | ||
"name": "@angular/cli", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "CLI tool for Angular", | ||
@@ -31,3 +31,3 @@ "main": "lib/cli/index.js", | ||
"@ngtools/json-schema": "1.1.0", | ||
"@ngtools/webpack": "1.4.0", | ||
"@ngtools/webpack": "1.4.1", | ||
"autoprefixer": "^6.5.3", | ||
@@ -91,9 +91,3 @@ "chalk": "^1.1.3", | ||
"node-sass": "^4.3.0" | ||
}, | ||
"ember-addon": { | ||
"paths": [ | ||
"./" | ||
], | ||
"main": "./addon/index.js" | ||
} | ||
} |
@@ -18,3 +18,3 @@ "use strict"; | ||
const outputPath = runTaskOptions.outputPath || app.outDir; | ||
if (this.project.root === outputPath) { | ||
if (this.project.root === path.resolve(outputPath)) { | ||
throw new SilentError('Output path MUST not be project root directory!'); | ||
@@ -21,0 +21,0 @@ } |
@@ -32,6 +32,8 @@ "use strict"; | ||
this.variableImports = { | ||
'path': 'path' | ||
'fs': 'fs', | ||
'path': 'path', | ||
}; | ||
this.variables = { | ||
'nodeModules': `path.join(process.cwd(), 'node_modules')`, | ||
'realNodeModules': `fs.realpathSync(nodeModules)`, | ||
'genDirNodeModules': `path.join(process.cwd(), '${this._appRoot}', '$$_gendir', 'node_modules')`, | ||
@@ -351,3 +353,3 @@ }; | ||
const force = runTaskOptions.force; | ||
if (project.root === outputPath) { | ||
if (project.root === path.resolve(outputPath)) { | ||
throw new SilentError('Output path MUST not be project root directory!'); | ||
@@ -354,0 +356,0 @@ } |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const common_tags_1 = require("common-tags"); | ||
const Promise = require('../ember-cli/lib/ext/promise'); | ||
const exec = Promise.denodeify(require('child_process').exec); | ||
const denodeify = require("denodeify"); | ||
const exec = denodeify(require('child_process').exec); | ||
const path = require('path'); | ||
@@ -7,0 +7,0 @@ const pkg = require('../package.json'); |
@@ -10,6 +10,6 @@ "use strict"; | ||
const Task = require('../ember-cli/lib/models/task'); | ||
const Promise = require('../ember-cli/lib/ext/promise'); | ||
const SilentError = require('silent-error'); | ||
const normalizeBlueprint = require('../ember-cli/lib/utilities/normalize-blueprint-option'); | ||
const GitInit = require('../tasks/git-init'); | ||
const InstallBlueprint = require('../ember-cli/lib/tasks/install-blueprint'); | ||
exports.default = Task.extend({ | ||
@@ -20,3 +20,3 @@ run: function (commandOptions, rawArgs) { | ||
} | ||
const installBlueprint = new this.tasks.InstallBlueprint({ | ||
const installBlueprint = new InstallBlueprint({ | ||
ui: this.ui, | ||
@@ -93,4 +93,8 @@ project: this.project | ||
}) | ||
.then(check_package_manager_1.checkYarnOrCNPM) | ||
.then(() => { | ||
if (!commandOptions.skipInstall || commandOptions.linkCli) { | ||
return check_package_manager_1.checkYarnOrCNPM(); | ||
} | ||
}) | ||
.then(() => { | ||
this.ui.writeLine(chalk.green(`Project '${packageName}' successfully created.`)); | ||
@@ -97,0 +101,0 @@ }); |
@@ -25,3 +25,3 @@ "use strict"; | ||
const outputPath = serveTaskOptions.outputPath || appConfig.outDir; | ||
if (this.project.root === outputPath) { | ||
if (this.project.root === path.resolve(outputPath)) { | ||
throw new SilentError('Output path MUST not be project root directory!'); | ||
@@ -55,8 +55,9 @@ } | ||
if (serveTaskOptions.publicHost) { | ||
const clientUrl = url.parse(serveTaskOptions.publicHost); | ||
// very basic sanity check | ||
if (!clientUrl.host) { | ||
return Promise.reject(new SilentError(`'live-reload-client' must be a full URL.`)); | ||
let publicHost = serveTaskOptions.publicHost; | ||
if (!/^\w+:\/\//.test(publicHost)) { | ||
publicHost = `${serveTaskOptions.ssl ? 'https' : 'http'}://${publicHost}`; | ||
} | ||
clientAddress = clientUrl.href; | ||
const clientUrl = url.parse(publicHost); | ||
serveTaskOptions.publicHost = clientUrl.host; | ||
clientAddress = url.format(clientUrl); | ||
} | ||
@@ -63,0 +64,0 @@ if (serveTaskOptions.liveReload) { |
@@ -1,1 +0,1 @@ | ||
export declare function checkYarnOrCNPM(): any; | ||
export declare function checkYarnOrCNPM(): Promise<void>; |
@@ -6,4 +6,4 @@ "use strict"; | ||
const config_1 = require("../models/config"); | ||
const Promise = require('../ember-cli/lib/ext/promise'); | ||
const execPromise = Promise.denodeify(child_process_1.exec); | ||
const denodeify = require("denodeify"); | ||
const execPromise = denodeify(child_process_1.exec); | ||
const packageManager = config_1.CliConfig.fromGlobal().get('packageManager'); | ||
@@ -10,0 +10,0 @@ function checkYarnOrCNPM() { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
64
841758
368
13975
+ Added@ngtools/webpack@1.4.1(transitive)
- Removed@ngtools/webpack@1.4.0(transitive)
Updated@ngtools/webpack@1.4.1