fixing merge conflicts

This commit is contained in:
lucasmbrown-usds 2022-09-30 13:43:31 -04:00
commit 07c4c030d3
266 changed files with 1868 additions and 1811 deletions

View file

@ -2,12 +2,12 @@
Creating all the various parts of a React component each time a new component is needed is cumbersome and error-prone.
This folder follows this [link](https://levelup.gitconnected.com/how-to-generate-react-components-from-your-terminal-a27741a5b862) to allow the developer to create a new React component (along with sass, tests and barrell) with a single command. The command is
This folder follows this [link](https://levelup.gitconnected.com/how-to-generate-react-components-from-your-terminal-a27741a5b862) to allow the developer to create a new React component (along with sass, tests and barrell) with a single command. The command is
`npm run gc <NameOfComponent>`
`npm run gc <NameOfComponent>`
For example: to create a new React component called MapGeolocate:
`npm run gc MapGeolocate`
Note: gc stands for generate component
Note: gc stands for generate component

View file

@ -61,4 +61,4 @@ describe('rendering of ${name} Component', () => {
// index.ts
exports.barrel = name => `import ${name} from './${name}';
export default ${name};
`;
`;

View file

@ -8,7 +8,7 @@ if (!name) throw new Error('You must include a component name.');
const dir = `./src/components/${name}/`;
// throw an error if the file already exists
if (fs.existsSync(dir)) throw new Error('A component with that name already exists.');
if (fs.existsSync(dir)) throw new Error('A component with that name already exists.');
// create the folder
fs.mkdirSync(dir);
@ -52,4 +52,4 @@ fs.writeFile(`${dir}/index.ts`, barrel(name), writeFileErrorHandler);
const fileContent = `${importStatements}\n${exportStatements}`;
fs.writeFile(`./src/components/index.ts`, fileContent, writeFileErrorHandler);
}); */
}); */