Skip to content

Commit

Permalink
chore(ng-add): add message for show the angular version support (#253)
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgeucano authored Jan 30, 2020
1 parent ce599ed commit d4c7f0c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Binary file added schematics/scully/scullyio-init-0.0.19.tgz
Binary file not shown.
9 changes: 9 additions & 0 deletions schematics/scully/src/ng-add/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@ export default (options: Schema): Rule => {
const addDependencies = () => (tree: Tree, context: SchematicContext) => {
addPackageToPackageJson(tree, '@scullyio/scully', `${scullyVersion}`);
const ngCoreVersionTag = getPackageVersionFromPackageJson(tree, '@angular/core');
if (+ngCoreVersionTag.search(/(\^7|~7|\^6|~6|\^5|~5|\^4|~4)/g) === 0) {
console.log('==============================================================');
console.log('==============================================================');
context.logger.error('Scully only work for version 8 or higher');
context.logger.info('Please visit https://scully.io/ for more information');
console.log('==============================================================');
console.log('==============================================================');
process.exit(0);
}
if (+ngCoreVersionTag.search(/(\^8|~8)/g) === 0) {
context.logger.info('Install ng-lib for Angular v8');
addPackageToPackageJson(tree, '@scullyio/ng-lib-v8', `${scullyComponentVersion}`);
Expand Down

0 comments on commit d4c7f0c

Please sign in to comment.