simison / bootstrap3-less

(deprecated) Bootstrap 3 for Meteor, with Less.
60 stars 19 forks source link

Support meteor 0.9 #29

Open chherbst opened 10 years ago

chherbst commented 10 years ago

Please support meteor 0.9

simison commented 10 years ago

Yup, will release today.

Nemo64 commented 10 years ago

that's kind of hard. I already tried to make a version of this for meteor 0.9. The problem comes that the new package api only transfers compiled files to meteors repository. This means that you'd have to add_files() bootstrap which would effectively remove the customizing bonus and the point of this package.

I have already an idea how to fix that, but it would be a breaking change. My idea is to add bootstrap's less files as private server side assets. Then I'd create a resource handler which would add the files to a .bootstrap.less file in the project. This idea isn't ripe though and untested.

subhog commented 10 years ago

There will be a lot of breaking changes around the 0.9 update, so I wouldn't worry about backward compatibility at this point.

Nemo64 commented 10 years ago

I'll work this weekend on a approach similar to this one I already did.

My (incompatible) idea is to register a resource-handler to files ending with .bootstrap.less and then prepending variables.less and mixins.less and then appending all other bootstrap files configured in .bootstrap.json. That bundle can then be manually compiled using the npm package of less. That way I avoid the problem that it is now also impossible to @import anything from a package (because there are no less files in them anymore). As I said I'd have to include all bootstrap files as private assets and I don't know if I have access to private assets in a resource-handler.

I have to try, I'll keep you updated.

Urigo commented 10 years ago

I also have a problem: Uncaught SyntaxError: Unexpected identifier simison:bootstrap3-less.js:2225
less-error

Got it only after the move...

vincilbishop commented 10 years ago

I have the same problem too and I was able to make it work by renaming files and import statements from the Bootstrap 3.2.0 source.

You can find it here: https://github.com/premosystems/bootstrap-3-drop-in-for-meteor

juliancwirko commented 10 years ago

There is some ugly solution I did for my Foundation + Scss package.. I have added all Scss files as an assets through '{isAsset: true}' flag and I can now import from:

.meteor/local/build/programs/web.browser/packages/juliancwirko:zf5/(...)

It seems to work like before Meteor 0.9. Also after deploy. But there must be some other way.

Nemo64 commented 10 years ago

Nice hint. Assets.getText does not (always, but sometimes) work inside the build plugin but using fs.readFileSync on .meteor/local/build/programs/server/assets/packages/author:package-name/asset-path seems to work (that's the path for private assets).

I now have a working version here so if someone want's to try ;)

@simison Sorry that it is a different repository now. I wanted to try my json approach from #19 there which is a complete rewrite of the package. I'm now not sure if I should merge into this here for 0.9 support or if there is another way to keep maintaining this repository.

wursttheke commented 10 years ago

@Nemo64 Your json version works well. I like the configuration approach a lot.

dennismonsewicz commented 10 years ago

Still can't get this to work with Meteor 0.9.x... followed the instructions from the README, but with no luck.

Here is what my client/stylesheets/main.less file looks like:

@import "/packages/bootstrap3-less/bootstrap.import.less";

And here is the error from the console:

While building the application:
client/stylesheets/main.less:1:1: Less compiler error: '/packages/bootstrap3-less/bootstrap.import.less' wasn't found```
tanis2000 commented 10 years ago

@dennismonsewicz this won't work as the new Meteor package system isn't installing packages in the /packages folder of your project anymore, thus it can't find the symlink to the less file.

@simison have you tried @Nemo64 version? If it works, could you please merge it in your repo and release an updated package? Thanks! :)

pbeets commented 10 years ago

I just tried the version from @Nemo64 and it works great. Now if there were only a package for font-awesome as well.

wursttheke commented 10 years ago

@pbeets I'm using this one and it also works great: https://github.com/chrismbeckett/meteor-fontawesome4/

meteor add chrismbeckett:fontawesome4

dennismonsewicz commented 10 years ago

Awesome, I was able to get @Nemo64's package working this afternoon!

dennismonsewicz commented 10 years ago

If you need to add your own CSS, where do you place these files?

pbeets commented 10 years ago

I've opened an issue on Nemo's repo, I'm currently having the same issue.

simison commented 10 years ago

Hey all! The solution is to use completely different approach than what this package did due changes in Meteor 0.9.x. This one is good for Meteor 0.6.x-0.8.x.

nemo64:bootstrap less is the package you'll want to have in future: https://github.com/Nemo64/meteor-bootstrap — it goes around the limitations and is configurable in totally new level compared this package. :+1: for @Nemo64 !