Skip to content

Commit

Permalink
Fix remote,loca datasources filenames
Browse files Browse the repository at this point in the history
  • Loading branch information
elianortega committed Feb 2, 2021
1 parent 4b508b7 commit f644561
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/commands/new_package/new-package-file-creation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ export function createRemoteDataSourceTemplate(
targetDirectory: string
) {
const snakeCasePackageName = changeCase.snakeCase(packageName.toLowerCase());
const targetPath = `${targetDirectory}/remote_datasource.dart`;
const targetPath = `${targetDirectory}/remote_data_source.dart`;
if (existsSync(targetPath)) {
throw Error(
`${snakeCasePackageName}_datasource.dart inside ${snakeCasePackageName} already exists`
Expand All @@ -276,7 +276,7 @@ export function createLocalDataSourceTemplate(
targetDirectory: string
) {
const snakeCasePackageName = changeCase.snakeCase(packageName.toLowerCase());
const targetPath = `${targetDirectory}/local_datasource.dart`;
const targetPath = `${targetDirectory}/local_data_source.dart`;
if (existsSync(targetPath)) {
throw Error(
`${snakeCasePackageName}_datasource.dart inside ${snakeCasePackageName} already exists`
Expand Down

0 comments on commit f644561

Please sign in to comment.