Skip to content

Commit

Permalink
fix(theme): validate paths are not used in theme name
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastiandg7 committed Apr 30, 2021
1 parent d0bedba commit 146bf9b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/nx-shopify/src/generators/theme/theme.generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
import { runTasksInSerial } from '@nrwl/workspace/src/utilities/run-tasks-in-serial';
import { join } from 'path';
import { BuildExecutorSchema } from '../../executors/build/schema';
import { assertValidGeneratorNameOption } from '../../utils/generator-utils';
import nxShopifyInitGenerator from '../init/init.generator';
import { addJest } from './lib/add-jest';
import { NormalizedSchema, ThemeGeneratorSchema } from './schema';
Expand All @@ -29,6 +30,8 @@ function normalizeOptions(
): NormalizedSchema {
const { name, directory, tags } = options;

assertValidGeneratorNameOption(name, directory, 'theme');

const { fileName } = names(name);
const projectDirectory = directory
? `${names(directory).fileName}/${fileName}`
Expand Down

0 comments on commit 146bf9b

Please sign in to comment.