Skip to content

Commit 4ca0473

Browse files
authored
Merge pull request #40 from kapowaz/npm-package
Configure package for release on npmjs.com
2 parents 448dd7f + fb6bbf0 commit 4ca0473

File tree

871 files changed

+1025
-3619
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

871 files changed

+1025
-3619
lines changed

README.md

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,11 @@ package is in the works.
6666

6767
### NPM
6868

69-
If you want to install this package as a dependency, you can install it from
70-
this GitHub repository:
69+
If you want to install this package as a dependency, you can add it to your
70+
project with:
7171

7272
```sh
73-
npm install --save https://github.com/kapowaz/square-flags
73+
npm install --save @kapowaz/square-flags
7474
```
7575

7676
### The color palette
@@ -128,7 +128,9 @@ shown here):
128128

129129
Note that this only works when the flags are injected as SVG elements directly
130130
into the same page as your custom CSS properties; if you are including flags as
131-
images using an `<img>` tag they will retain the default palette.
131+
images using an `<img>` tag they will retain the default palette. If for any
132+
reason you need a version of these SVG files _without_ the CSS custom
133+
properties, you can find the equivalent flags under `flags-original/`.
132134

133135
## Contributing
134136

@@ -138,20 +140,16 @@ contribution, create a copy of that library and add your changes as a component,
138140
then create a pull request including the exported SVG file and a link to your
139141
copy of the Figma file, so that the original can be updated.
140142

141-
You will also need to ensure you have have the latest version of [svgo][svgo]
142-
installed; when exporting SVG files, run `svgo` on the `flags/` directory:
143+
You should export two copies of your new/updated flag design: one to `flags/`,
144+
and one to `flags-original/`, then run the scripts to optimise the SVG assets,
145+
and update any explicit hexadecimal colour codes to their named CSS Custom
146+
Property values (you should run `yarn svgo` last, to ensure the optimal SVG
147+
output):
143148

144149
```sh
145-
svgo ./flags --recursive --config=svgo.config.js
146-
$ svgo ./flags --recursive --config=svgo.config.js
147-
```
148-
149-
Once you have optimised the SVG files, you should also ensure that you run the
150-
`css-vars` script within the package. This will update any explicit hexadecimal
151-
colour codes to their named CSS Custom Property values.
152-
153-
```sh
154-
$ yarn && yarn css-vars
150+
$ yarn
151+
$ yarn css-vars
152+
$ yarn svgo
155153
```
156154

157155
Then commit the changes, and submit them as a pull request.

flags-original/ad.svg

Lines changed: 1 addition & 0 deletions
Loading

flags-original/ae.svg

Lines changed: 1 addition & 0 deletions
Loading

flags-original/af-emirate.svg

Lines changed: 1 addition & 0 deletions
Loading

flags-original/af.svg

Lines changed: 1 addition & 0 deletions
Loading

flags-original/ag.svg

Lines changed: 1 addition & 0 deletions
Loading

flags-original/ai.svg

Lines changed: 1 addition & 0 deletions
Loading

flags-original/al.svg

Lines changed: 1 addition & 0 deletions
Loading

flags-original/am.svg

Lines changed: 1 addition & 0 deletions
Loading

flags-original/an.svg

Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)