Answer the question
In order to leave comments, you need to log in
Wiredep includes js files but does not include css. What am I doing wrong?
html:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Document</title>
<!-- bower:css -->
<!-- endbower -->
</head>
<body>
<!-- bower:js -->
<!-- endbower -->
</body>
</html>
var gulp = require('gulp'),
wiredep = require('wiredep').stream;
gulp.task('wiredep', function () {
gulp.src('./index.html')
.pipe(wiredep({
directory : './bower_components'
}))
.pipe(gulp.dest('./'));
});
{
"name": "manifest",
"version": "0.1.0",
"devDependencies": {
"gulp": "^3.9.0",
"wiredep": "^2.2.2"
}
}
{
"name": "manifest",
"version": "0.1.0",
"description": "my first bower project",
"license": "MIT",
"dependencies": {
"bootstrap": "~3.3.5",
"jquery": "~2.1.4"
}
}
{
"directory" : "bower_components"
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<!-- bower:css -->
<!-- endbower -->
</head>
<body>
<!-- bower:js -->
<script src="bower_components/jquery/dist/jquery.js"></script>
<script src="bower_components/bootstrap/dist/js/bootstrap.js"></script>
<!-- endbower -->
</body>
</html>
Answer the question
In order to leave comments, you need to log in
In the case of Bootstrap:
In file:
Section:
"main": [
"less/bootstrap.less",
"dist/js/bootstrap.js"
],
"main": [
"dist/css/bootstrap.css",
"dist/js/bootstrap.js"
],
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question