Comments (11)
Just tested with the config you provided.
Except package specified destination doesn't work, the rest works as expected.
Using your config and run grunt bower
, I got the following structure:
.tmp
└── public
├── css
│ └── bootstrap
│ └── bootstrap.css
└── fonts
├── bootstrap.js
├── glyphicons-halflings-regular.eot
├── glyphicons-halflings-regular.svg
├── glyphicons-halflings-regular.ttf
└── glyphicons-halflings-regular.woff
from grunt-bower.
strange because it is copying the complete bower_components/dist tree aditionally e.g:
.tmp\public\js\components\bower_components\bootstrap\dist\js\bootstrap.js
.tmp\public\js\components\bootstrap.js
my complete task looks like:
grunt.config.set('bower', {
dev: {
dest: '.tmp/public',
js_dest: '.tmp/public/js/components',
css_dest: '.tmp/public/styles/components',
options: {
packageSpecific: {
bootstrap: {
files: [
"./dist/js/bootstrap.js",
"./dist/css/bootstrap.css",
"./dist/fonts/glyphicons-halflings-regular.eot",
"./dist/fonts/glyphicons-halflings-regular.svg",
"./dist/fonts/glyphicons-halflings-regular.ttf",
"./dist/fonts/glyphicons-halflings-regular.woff"
],
dest: '.tmp/public/fonts',
css_dest: '.tmp/public/css/bootstrap'
}
}
}
}
});
grunt.loadNpmTasks('grunt-bower');
from grunt-bower.
Duh.. still can't reproduce it.
Will look into this again later.
from grunt-bower.
Ok , no problem, i put bootstrap in manually for now. Tell me if you need anything else.
from grunt-bower.
Please use this gist https://gist.github.com/curist/10078523 and see if you still have this problem.
from grunt-bower.
I had this problem and figured it out.
grunt-bower/tasks/lib/helpers.js line 50 and its 'else' part doesn't path.join
with components_path
I patched as following:
if(typeof main_path === 'string') {
main_path = path.join(components_path, main_path);
...
} else {
// array, falling through
main_path = main_path.map(function(file) {
return path.join(components_path, file);
});
return main_path;
}
Also, make sure .bowerrc
's directory
ends with /
. Otherwise bower.commands.list
will generate quite weird relative paths (with duplicate of last part of path).
from grunt-bower.
Eh, that's weird.
The main_path
is passed from bower.command.list
, and it's the full path to the files.
What's the result of bower list --paths
?
And about the .bowerrc
's directory
issue, I tested both with or without /
, all runs fine for me.
Are you guys running a windows machine?
from grunt-bower.
I was wrong about a trailing slash issue. I found 'bower list --path' issue bower/bower#928
For me bower.commands.list 's result list contains inappropriate paths then causes copy failure.
from grunt-bower.
That seems to nailed it, will think about how to deal with it.
Thanks for reporting this!
from grunt-bower.
I work around that by passing options with 'relative : false'.
On Wed, Apr 9, 2014 at 12:05 PM, Curtis Chang [email protected]:
That seems to nailed it, will think about how to deal with it.
Thanks for reporting this!—
Reply to this email directly or view it on GitHubhttps://github.com//issues/20#issuecomment-39924507
.
Jooyung Han
from grunt-bower.
Yea, that works. Thanks!
from grunt-bower.
Related Issues (20)
- Unable to maintain folder structure from root of package directory HOT 11
- expand: false seems broken 0.14.2 upwards HOT 2
- Problems with relative paths for packages with single files HOT 2
- Version 0.15.1+ no longer works in SailsJS HOT 3
- bootstrap.less import problem
- Windows path not supported
- dest not working (windows) HOT 1
- Copying packages defined in `packageSpecific` fails silently
- ignorePackages should allow for typical regex
- Let also *.min.js and *.min.js.map files be copied by default (configurable by option) HOT 3
- images_dest HOT 3
- Ignore devDependencies HOT 1
- Specify bower location HOT 1
- Add option to *only* include certain packages HOT 1
- [filetype]_dest options ignored after upgrading to 0.21.1 HOT 1
- override the .local directory HOT 2
- Problem with graceful-fs HOT 3
- jquery-validation doesn't get copied HOT 4
- Add support for Files Array Format in packageSpecific.files to Allow for Additional Single Package Flexibility
- font-awesome font folder not copying over
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 grunt-bower.