Comments (11)
yeah that works, I think this part will be pretty ad-hoc, what we do is loop through out component.json files, grab the filenames and set up matching routes with express and res.sendfile(), definitely more than one way to solve this portion
from component.
Can either of you give any guidance on a decent way to handle this? I'm doing stupid stuff like this in my makefile:
release: replace
@component build
replace:
@cat ./css/font-awesome.css | sed -e 's/\.\.\/font\//..\/components\/timoxley-font-awesome\/font\//g' > ./release/font-awesome.css
This, seems wrong.
from component.
I originally created rework for the css manip stuff, I'll try out a few things at least as reasonable defaults. This does get a bit more complicated depending on how you use components
from component.
@visionmedia I'll have a look into rework. If you couldn't tell, the use case here is an icon-font component. I was thinking about perhaps having the component inject the css into the dom so it could manipulate the paths dynamically⦠but then you lose cachability. Perhaps something along those lines might work.
from component.
even a simple regexp would do we dont really need rework for that part but i had other things in mind for the future. just need to figure out the least leaky abstraction possible for this
from component.
by default in --dev
this will prefix urls with ./
so that they work with file://
, and without --dev
they will not be prefix so you'll end up with urls like /my-component/images/maru.png
, and I added --prefix url
for cases like /public/my-component/images/maru.png
depending on your serving technique
from component.
π π
from component.
how can we disable URL rewriting for CSS? I prefer to handle all static assets myself since they're all going into a CDN.
from component.
well you wont want to PUT the data to a cdn each time you change something in dev, that would be a separate build when you're deploying. if you disable url rewriting with component they simply wont point to the correct files, but nothing else changes
from component.
Oh of course not. My question is just how to disable url rewriting so /images/image.png
doesn't become /mycomponent/images/image.png
when building. I don't see any options anywhere.
from component.
Finding that building a component referencing FontAwesome on windows is causing a problem which I think relates to this.
The result is:
@font-face {
font-family: "FontAwesome";
src: url("\timoxley-font-awesome\font\fontawesome-webfont.eot");
src: url("\timoxley-font-awesome\font\fontawesome-webfont.eot?#iefix") format('eot'), url("\timoxley-font-awesome\font\fontawesome-webfont.woff") format('woff'), url("\timoxley-font-awesome\font\fontawesome-webfont.ttf") format('truetype'), url("\timoxley-font-awesome\font\fontawesome-webfont.svg#FontAwesome") format('svg');
font-weight: normal;
font-style: normal;
}
Note that \t
is a tab character so the escaping isn't working right, however, even so, I'm not convinced a backslash for a css url is ever appropriate - even on windows?
Thanks
from component.
Related Issues (20)
- Can I use non-component based libraries? HOT 4
- component {fork,unfork} <component> HOT 2
- ComponentJS vs JSPM + SystemJS HOT 1
- Can't use Component modules with a RequireJS environment HOT 12
- Private Repo doesn't seem to be working HOT 17
- Getting Uncaught Error: failed to require template HOT 11
- need auth for travis to avoid github rate limit and failed build status
- On chrome debug points off by two lines for --dev builds HOT 2
- Getting Failed to Require message HOT 3
- component.github.io shows no results HOT 1
- fatal : no remote found for dependency '....' HOT 20
- fatal : Error downloading "github//component/[email protected]". Got status code "404" HOT 5
- getting component module to be called with --harmony HOT 4
- fatal : no remote found for dependency... HOT 2
- Follow the chain of paths for remote dependencies HOT 4
- announce "this project is not maintained anymore" HOT 8
- How to install dependencies to a particular folder? HOT 2
- How can a project depend on a github repository that doesn't have a componser.json HOT 2
- Clean up the maintainers list? HOT 2
- Cant require node_modules when componentjs is installed? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from component.