Closed sarath2 closed 11 years ago
You'll need to provide a link to your code @sarath2, this is impossible to debug from reading your description :)
I have added boostrap to the fork. https://github.com/sarath2/lineman-angular-template
So, you'll need to add jquery.js
in vendor/js
, and configure Lineman to load it first as bootstrap
depends on jQuery
In config/files.js
:
module.exports = require(process.env['LINEMAN_MAIN']).config.extend('files', {
ngtemplates: {
dest: "generated/angular/template-cache.js"
},
js: {
vendor: [
"vendor/js/jquery.js",
"vendor/js/angular.js",
"vendor/js/**/*.js"
],
app: [
"app/js/app.js",
"app/js/**/*.js"
]
},
less: {
compile: {
options: {
paths: ["vendor/css/normalize.css", "vendor/css/**/*.css", "app/css/**/*.less"]
}
}
}
});
Thanks Dave. Now it solved.
I have two boostrap thems(bootstrap-a.css and bootstrap-b.css). I need to dynamically change it when button click.
How can achieve this? Because all css files compile to the one css.
In previously I used following way.
<link id="bs-css" ng-href="themes/bootstrap-{{ui_theme}}.css" rel="stylesheet">
When button click I change $scope.ui_theme to "a" and "b" .
Supporting dynamic theme switching isn't a use-case we've had to use Lineman for yet, but luckily you can configure the inputs pretty easily in config/files.js
and the outputs in config/application.js
If you take a look at the lineman default tasks (which this template inherits from) it should give you a better idea of how you could override the configurations for less compilation to achieve multiple output .css files:
https://github.com/testdouble/lineman/blob/master/config/application.coffee#L26
https://github.com/testdouble/lineman/blob/master/config/files.coffee#L29
I'll follow-up it and try to config in my app. Thanks again for your support.
No problem, let me know if you can't figure it out; documenting how Lineman works in inheriting task configurations from the GLOBAL to LOCAL is the next issue on our plate, as it is often confusing :P
Is it possible to add folder like "themes" to app directory?. And it contain *.css files. After built each .css comes to separated minify files with themes folder in "generated" and "dist" directory.
That is something you can do yourself with ease. I mean, Limenan provides some defaults, and we the users need to extend it as needed. So create a themes folder, update or override the grunt configs as needed and put one tag per theme if you want.
:+1: @Foxandxss
@sarath2, Grunt is absolutely capable of supporting whatever workflow you want to craft; the goal of Lineman is purely to provide a set of defaults that you can override. These defaults are the result of our workflow building rich-client apps, but we've made them available and packaged them into Lineman in the hopes they are useful for someone else :)
I have added boostrap libs to the vendor/js and css. Then trying to apply boostrap dropdown. It not working. Other boostrap's buttons,labels,.. are working well. Also can't add angular-cookies lib.Got errors.