Skip to content

Commit d4c7f0c

Browse files
authored
chore(ng-add): add message for show the angular version support (#253)
1 parent ce599ed commit d4c7f0c

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

564 KB
Binary file not shown.

schematics/scully/src/ng-add/index.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,15 @@ export default (options: Schema): Rule => {
2424
const addDependencies = () => (tree: Tree, context: SchematicContext) => {
2525
addPackageToPackageJson(tree, '@scullyio/scully', `${scullyVersion}`);
2626
const ngCoreVersionTag = getPackageVersionFromPackageJson(tree, '@angular/core');
27+
if (+ngCoreVersionTag.search(/(\^7|~7|\^6|~6|\^5|~5|\^4|~4)/g) === 0) {
28+
console.log('==============================================================');
29+
console.log('==============================================================');
30+
context.logger.error('Scully only work for version 8 or higher');
31+
context.logger.info('Please visit https://scully.io/ for more information');
32+
console.log('==============================================================');
33+
console.log('==============================================================');
34+
process.exit(0);
35+
}
2736
if (+ngCoreVersionTag.search(/(\^8|~8)/g) === 0) {
2837
context.logger.info('Install ng-lib for Angular v8');
2938
addPackageToPackageJson(tree, '@scullyio/ng-lib-v8', `${scullyComponentVersion}`);

0 commit comments

Comments
 (0)