Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

766 Icons 0.0.1 #767

Merged
merged 2 commits into from
Mar 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions components/icons/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Icons changelog

## 0.0.1

- Initial commit
4 changes: 3 additions & 1 deletion components/icons/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@

## Development

- `npm run dev:sprite-some`: A utility command for developers to create sprite with a subset of icons.
- `npm run dev:sprite-some`: A utility command for developers to create sprite with a subset of icons. Use `--ids=` to pass icon ids.

- `npm run dev:clear-cache`: Regenerates all the assets needed related to icons and cleares the website design cache.

- `npm run dev:library`: Regenerates the icon library.

- `npm run dev:icons`: Regenerates the icon set from the hosted CA.gov font. You should only have to run this when new versions of the font are released.

- `npm run dev:font-sass`: Pipe sass file to design system website.

## About fonts

- Currently the fonts in the fonts folder and icon-font.scss and are hard coded. Ideally we'd create a script so they can be downloaded from source if need be.
Expand Down
8 changes: 1 addition & 7 deletions components/icons/scripts/generateSprite.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
import yargs from 'yargs';
import { hideBin } from 'yargs/helpers';
import { exec } from 'child_process';
import path from 'path';
import vars from './vars.js';

const generateSprite = () => {
const __dirname = path.dirname('svg-sprite-generate');

// Default command.
let cmd = `${path.resolve(
__dirname,
'node_modules/.bin/svg-sprite-generate',
)} -d ${vars.componentSubdir} -o ${vars.componentFileAll}`;
let cmd = `svg-sprite-generate -d ${vars.componentSubdir} -o ${vars.componentFileAll}`;

// Set up arguments for the command line.
const { argv } = yargs(hideBin(process.argv))
Expand Down
Loading