Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't inject dependencies into Jade. Everything up to date #143

Closed
lukewatts opened this issue Dec 6, 2015 · 5 comments
Closed

Doesn't inject dependencies into Jade. Everything up to date #143

lukewatts opened this issue Dec 6, 2015 · 5 comments

Comments

@lukewatts
Copy link

Hi, I've installed node, bower, and grunt all within the last two days so everything is up to date and working.

However, when I run wiredep it runs with no errors but does not make any changes to my jade file.

NOTE: Wiredep also works fine with HTML I write myself, but not HTML which is output from Jade because the comments don't have the space before --> e.g. <!-- bower:css-->

index.jade:

doctype
html(lang="en")
    head(charset="utf-8")
        title Home

        // bower:css
        // endbower
    body
        header
            h1 Affinity4 Labs
            h2 Experiment 002

        main

        footer

        // bower:js
        // endbower

Gruntfile.js wiredep task only

// BOWER WIREDEP
// ====================
wiredep: {
    task: {
        src: ["index.jade"]
    },
    options: {
        // https://github.com/taptapship/wiredep#configuration
    }
}

bower.json

{
  "name": "experiment-002",
  "description": "Affinity4 Labs Experient 002",
  "main": "Gruntfile.js",
  "authors": [
    "Luke Watts"
  ],
  "license": "ISC",
  "moduleType": [],
  "homepage": "",
  "private": true,
  "ignore": [
    "**/.*",
    "node_modules",
    "bower_components",
    "test",
    "tests"
  ],
  "devDependencies": {
    "foundation": "~5.5.3"
  }
}

Thank you.

@stephenplusplus
Copy link
Owner

Try devDependencies: true in the wiredep options.

@stephenplusplus
Copy link
Owner

Sorry I think I misread the issue. Let me read this over again real quick!

@stephenplusplus
Copy link
Owner

wiredep [...] does not make any changes to my jade file

Maybe my tip about devDependencies: true actually is relevant here? If the bower.json doesn't have any dependencies, wiredep doesn't think it has anything to inject.

Wiredep [doesn't work with] HTML which is output from Jade because the comments don't have the space before --> e.g. <!-- bower:css-->

It looks like you're trying to inject the dependencies into the jade file. I'm not sure I understand which part of the process is failing.

@lukewatts
Copy link
Author

devDependencies worked. I had no idea I had to specify that. Perhaps you could add the most frequently used options on the readme.md? I know there's a link to the original wiredep but their docs aren't really intuitive either.

One last question...why does Bootstrap and Foundation not add the css? Thank you

@stephenplusplus
Copy link
Owner

To say it's a long story would be an understatement: bower/spec#47

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants