Skip to content

Commit 4d2fa86

Browse files
committed
chore(publisher): use wiredep to resolve paths of bower packages
1 parent b42bc85 commit 4d2fa86

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

publish.js

+9-4
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,16 @@ var fs = require('fs');
66
var path = require('path');
77

88
module.exports = function() {
9+
var wiredep = require('wiredep');
910

10-
var js_dependencies =[
11-
'bower_components/jquery/dist/jquery.js',
12-
'bower_components/jquery-ui/jquery-ui.js'
13-
];
11+
var bower_dependencies = wiredep({ cwd: __dirname });
12+
13+
var js_dependencies = []
14+
.concat(bower_dependencies.packages['jquery'].main)
15+
.concat(bower_dependencies.packages['jquery-ui'].main)
16+
.map(function(p) {
17+
return p.replace(path.join(__dirname, '/'), '');
18+
});
1419

1520
var css_dependencies = [
1621
'bower_components/jquery-ui/themes/smoothness/jquery-ui.css'

0 commit comments

Comments
 (0)