warningIfImportNotExists method

void warningIfImportNotExists(
  1. dynamic jsonModel,
  2. dynamic jsonFile
)

Implementation

void warningIfImportNotExists(jsonModel, jsonFile) {
  jsonModel.imports_raw.forEach((importPath) {
    var parentPath =
        jsonFile.path.substring(0, jsonFile.path.lastIndexOf(path.separator));
    if (!File(path.join(parentPath, '$importPath.json')).existsSync()) {
      print(
          "[Warning] File '$importPath.json' not exist, import attempt on '${jsonFile.path}'");
    }
  });
}