This repository was archived by the owner on Apr 13, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +22
-24
lines changed Expand file tree Collapse file tree 2 files changed +22
-24
lines changed Original file line number Diff line number Diff line change 1- /* eslint-disable @typescript-eslint/no-use-before-define */
21import commander from "commander" ;
32import * as bedrock from "../../lib/bedrockYaml" ;
43import { build as buildCmd , exit as exitCmd } from "../../lib/commandBuilder" ;
@@ -9,6 +8,17 @@ import { logger } from "../../logger";
98import { BedrockFileInfo } from "../../types" ;
109import decorator from "./delete.decorator.json" ;
1110
11+ /**
12+ * Check the bedrock.yaml and the target ring exists
13+ * @param projectPath
14+ */
15+ export const checkDependencies = ( projectPath : string ) : void => {
16+ const fileInfo : BedrockFileInfo = bedrock . fileInfo ( projectPath ) ;
17+ if ( fileInfo . exist === false ) {
18+ throw Error ( PROJECT_INIT_DEPENDENCY_ERROR_MESSAGE ) ;
19+ }
20+ } ;
21+
1222/**
1323 * Executes the command.
1424 *
@@ -63,14 +73,3 @@ export const commandDecorator = (command: commander.Command): void => {
6373 } ) ;
6474 } ) ;
6575} ;
66-
67- /**
68- * Check the bedrock.yaml and the target ring exists
69- * @param projectPath
70- */
71- export const checkDependencies = ( projectPath : string ) : void => {
72- const fileInfo : BedrockFileInfo = bedrock . fileInfo ( projectPath ) ;
73- if ( fileInfo . exist === false ) {
74- throw Error ( PROJECT_INIT_DEPENDENCY_ERROR_MESSAGE ) ;
75- }
76- } ;
Original file line number Diff line number Diff line change 1- /* eslint-disable @typescript-eslint/no-use-before-define */
21import commander from "commander" ;
32import {
43 fileInfo as bedrockFileInfo ,
@@ -12,6 +11,17 @@ import { logger } from "../../logger";
1211import { BedrockFileInfo } from "../../types" ;
1312import decorator from "./set-default.decorator.json" ;
1413
14+ /**
15+ * Check for bedrock.yaml
16+ * @param projectPath
17+ */
18+ export const checkDependencies = ( projectPath : string ) : void => {
19+ const fileInfo : BedrockFileInfo = bedrockFileInfo ( projectPath ) ;
20+ if ( fileInfo . exist === false ) {
21+ throw new Error ( PROJECT_INIT_DEPENDENCY_ERROR_MESSAGE ) ;
22+ }
23+ } ;
24+
1525/**
1626 * Executes the command.
1727 *
@@ -53,14 +63,3 @@ export const commandDecorator = (command: commander.Command): void => {
5363 } ) ;
5464 } ) ;
5565} ;
56-
57- /**
58- * Check for bedrock.yaml
59- * @param projectPath
60- */
61- export const checkDependencies = ( projectPath : string ) : void => {
62- const fileInfo : BedrockFileInfo = bedrockFileInfo ( projectPath ) ;
63- if ( fileInfo . exist === false ) {
64- throw new Error ( PROJECT_INIT_DEPENDENCY_ERROR_MESSAGE ) ;
65- }
66- } ;
You can’t perform that action at this time.
0 commit comments