Closed levimcg closed 5 years ago
This is a great first step. Thoughts:
npm pack
to test what will be bundled to npm; I just recently discovered this, making me more confident with publishing.Great, thanks for the feedback. All good points here. I only just learned about npm pack
from @illusivesunrae, soooo handy! Good call on the docs, I hadn't started on that at all.
The demo doesn't work locally...
Hmmm, that's weird? It was working locally for me, I'll look into what's going on there.
The demo doesn't work locally...
Never mind. I was just manually opening index.html
, because I didn't realize about npm run start
. After starting the server (not just using npm run build
), then I was able to open localhost
and the icons worked.
Aaah, cool. Good to know, thanks. I'll try to make some time to update the docs to be a little clearer on running the local dev server. 👍
Just a heads-up on this. We've be trying to migrate all of our Rivet-related repos over to using the a separate gh-pages
branch for demos instead of committing the docs
folder to source. We kept running into confusing situations where folks folks either were editing the built files, or it was a pain to always have to remember to re-build and re-commit files in certain situations.
From now on, once feature branches get merged into master
someone with push access will need to run the deploy
script in package.json
to push a fresh copy of the demo page to a gh-pages
branch. In the future we'll work toward getting a CI process in place that can push back to the gh-pages
branch when feature branches are merged into master
.
See #2 for more background on this.
I've added a basic build set up for creating a SVG sprite sheet. This build step creates a
rvt-icons.svg
file from all of the source .svgs in the./src/svg/
directory. The bundled file can then be used referencing the<symbol>
elements inside like so:This is a bit of a rough start, but I'd like to get some feedback on how we might distribute this as some sort of package. Right now the build process will create a
dist/
folder with the bundledrvt-icons.svg
file inside, but I've added that folder to the.gitignore
for now.@basham I'd like to get some feedback when you get a chance since you created to original issue. I with a bit of optimization and clean up we could publish something like this as an npm package, but I wonder how useful that would be? I think that would make a lot of sense for folks using Webpack where you could just
import 'rivet-icons.svg';
or whatever. Any thoughts?