Skip to content

Commit

Permalink
Merge pull request #337 from chromaui/fix-add-chromatic-script
Browse files Browse the repository at this point in the history
Fix `chromatic` script that can be added to package.json
  • Loading branch information
ghengeveld committed May 18, 2021
2 parents 496e954 + e8b8205 commit ea1920c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions bin/lib/checkPackageJson.js
Expand Up @@ -18,10 +18,7 @@ export default async function checkPackageJson({ log, options, packageJson, pack
if (!json.scripts) json.scripts = {};
if (findScript(json.scripts)) return;

const scriptCommand = `${`npx chromatic ${options.originalArgv.slice(2).join(' ')}`
.replace(/--project-token[= ]\S+/, '')
.replace(/--app-code[= ]\S+/, '')
.trim()} --project-token ${options.projectToken}`;
const scriptCommand = `npx chromatic ${options.originalArgv.join(' ')}`;

log.info('');
if (await confirm(scriptNotFound(scriptName))) {
Expand Down

0 comments on commit ea1920c

Please sign in to comment.