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

Loading SVG page #19

Closed
hnqlv opened this issue Apr 14, 2015 · 21 comments
Closed

Loading SVG page #19

hnqlv opened this issue Apr 14, 2015 · 21 comments

Comments

@hnqlv
Copy link

hnqlv commented Apr 14, 2015

Hey @christianalfoni great work with this cookbook, it has been very useful. One thing we could add underneath "Loading LESS or SASS" is the "Loading SVG" page.

I know we have a few ways to achieve this using with svg-loader but the simple way to do that is through file-loader.

module: {
  loaders: [
  ...
  { 
    test: /\.svg$/, 
    loader: "file-loader" 
  },
  ...
  ]
}

Then in your CSS:

.MyIcon {
  ...
  background-image: url(../assets/my-icon.svg);
}

I know I lost a few minutes yesterday looking, it might be useful for someone else as well.

Thoughts?

Cheers

@christianalfoni
Copy link
Contributor

Hi there!

Yeah, this sounds like a great idea. I have set up a an article:

https://github.com/christianalfoni/react-webpack-cookbook/wiki/Loading-SVG

It would be great if you had time to put in what you have now. Something is better than nothing :-) Then we can keep work on it if necessary? That would be awesome :-)

@hnqlv
Copy link
Author

hnqlv commented Apr 15, 2015

@christianalfoni thanks man! Sounds like a good plan, start with something then improve. Sure I can do that. I'll put something together tonight (:

@hnqlv
Copy link
Author

hnqlv commented Apr 15, 2015

@christianalfoni silly question: how do I do to edit the wiki page and/or send a PR?

@christianalfoni
Copy link
Contributor

HI @henriquea,

It should be open to everyone? You just edit the page and save :-) ... or did we lock it?... yes we did. I have opened it now :-)

@hnqlv
Copy link
Author

hnqlv commented Apr 17, 2015

@christianalfoni done! https://github.com/christianalfoni/react-webpack-cookbook/wiki/Loading-SVG

By the way, the big downside of the Wiki is not be able to send PR's. Are you planning in change this structure?

Feel free to close this issue.

Cheers 🍺

@bebraw
Copy link
Member

bebraw commented Apr 17, 2015

@henriquea Yeah, lack of PRs is a bit unfortunate. We could work around this by moving the content the main repo, closing the wiki to modifications and setting up some process to update wiki content (it's a git repo after all...) and push new builds to gh-pages.

If that sounds fine, I could probably set up that on a Raspberry Pi I have around (just cron to trigger the process a couple of times per day or so). I have a setup like this for another project.

@christianalfoni
Copy link
Contributor

That sounds awesome @bebraw. The wiki gives such a nice structure, but hard to keep it consistent if everybody can just change it. So yeah, some pull system for it would be great!

@hnqlv
Copy link
Author

hnqlv commented Apr 17, 2015

@bebraw @christianalfoni agree with the lack of PR, move the wiki to the main repo makes a lot of sense for me.

@bebraw
Copy link
Member

bebraw commented Apr 21, 2015

I set up build/deployment scripts and made my raspi to perform updates once per hour (xx:30).

@christianalfoni Can you make the wiki closed to public again? All changes should go through the main project.

Let me know if you notice any issues (missing updates etc.).

@bebraw bebraw closed this as completed Apr 21, 2015
@bebraw
Copy link
Member

bebraw commented Apr 21, 2015

@christianalfoni You should modify project homepage to point at https://christianalfoni.github.io/react-webpack-cookbook/ so it's easier to find if you stumble on page.

@christianalfoni
Copy link
Contributor

You mean in README of repo? pointing to wiki? Updated that now :-)

@bebraw
Copy link
Member

bebraw commented Apr 23, 2015

@christianalfoni I mean repo. That blank spot at next to A cookbook for using webpack with React JS at https://github.com/christianalfoni/react-webpack-cookbook index.

@christianalfoni
Copy link
Contributor

Updated now, you mean like that? :-)

@hnqlv
Copy link
Author

hnqlv commented Apr 23, 2015

@bebraw @christianalfoni should we close the wiki and maybe delete its content?

@bebraw
Copy link
Member

bebraw commented Apr 23, 2015

@christianalfoni Here:

screenshot 2015-04-23 12 18 19

@henriquea It's enough to close it to modifications. I set it up so that the wiki content gets generated based on the repo.

@christianalfoni
Copy link
Contributor

Haha, I was not aware of that feature! Will fix it now :)

@bebraw
Copy link
Member

bebraw commented Apr 24, 2015

@christianalfoni Can you close the wiki for modifications? Just saw an edit there which I had to move manually to main repo since it would get overwritten.

@christianalfoni
Copy link
Contributor

Closed :-)

Do we have some documentation on how to contribute?

@bebraw
Copy link
Member

bebraw commented Apr 24, 2015

Do we have some documentation on how to contribute?

Not really. I suppose we should add something to both project root readme and content/readme. The workflow should go through PRs.

@christianalfoni
Copy link
Contributor

Yeah, I think that would be great. Just put it right there at the top. How does it work really? You fork and change the files in content/?

@bebraw
Copy link
Member

bebraw commented Apr 24, 2015

Yeah, I think that would be great. Just put it right there at the top. How does it work really? You fork and change the files in content/?

Exactly. I'll add a snippet about this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants