@progress/kendo-schematics
Advanced tools
Comparing version 0.2.4 to 0.2.5-dev.201809120656
@@ -6,3 +6,3 @@ { | ||
"license": "SEE LICENSE in LICENSE.md", | ||
"version": "0.2.4", | ||
"version": "0.2.5-dev.201809120656", | ||
"scripts": { | ||
@@ -9,0 +9,0 @@ "build-package": "npm run build", |
@@ -92,3 +92,4 @@ "use strict"; | ||
const project = utils_1.resolveProject(host, options.project); | ||
const mainPath = project.architect.build.options.main; | ||
const targets = project.architect || project.targets; | ||
const mainPath = targets.build.options.main; | ||
options.module = utils_1.getAppModulePath(host, mainPath); | ||
@@ -95,0 +96,0 @@ const toInstall = schematics_1.chain([ |
@@ -24,8 +24,9 @@ "use strict"; | ||
const project = utils_1.getProjectFromWorkspace(workspace, options.project); | ||
if (project.architect) { | ||
addStyleToTarget(project.architect['build'], host, themePath(name), workspace); | ||
addStyleToTarget(project.architect['test'], host, themePath(name), workspace); | ||
const targets = project.architect || project.targets; | ||
if (targets) { | ||
addStyleToTarget(targets['build'], host, themePath(name), workspace); | ||
addStyleToTarget(targets['test'], host, themePath(name), workspace); | ||
} | ||
else { | ||
throw new schematics_1.SchematicsException(`${project.name} does not have an architect configuration`); | ||
throw new schematics_1.SchematicsException(`${project.name} does not have an targets/architect configuration`); | ||
} | ||
@@ -32,0 +33,0 @@ return host; |
import { Tree } from "@angular-devkit/schematics"; | ||
export declare function createCliConfig(tree: Tree, path?: string): Tree; | ||
export declare function createCliConfig(tree: Tree, options?: any): Tree; |
@@ -142,6 +142,10 @@ "use strict"; | ||
}; | ||
function createCliConfig(tree, path) { | ||
tree.create(path || '/angular.json', __1.stringify(config)); | ||
function createCliConfig(tree, options = {}) { | ||
let content = __1.stringify(config); | ||
if (options.useTargets) { | ||
content = content.replace(/architect/g, 'targets'); | ||
} | ||
tree.create('/angular.json', content); | ||
return tree; | ||
} | ||
exports.createCliConfig = createCliConfig; |
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
56044
1451