yeoman grunt-wiredep not injecting dependencies
Asked Answered
R

1

8

Running "wiredep:target" (wiredep) task

Done, without errors

but not injecting dependencies of bower.json. Cant debug this problem. Any help is appreciated.

Gruntfile.js:

wiredep: {

        target: {

            // Point to the files that should be updated when
            // you run `grunt wiredep`
            src: [
                '<%= yeoman.app %>/index.html'
            ],
            // Optional:
            // ---------
            options: {
                cwd: '',
                dependencies: true,
                devDependencies: false,
                exclude: [],
                fileTypes: {},
                ignorePath: '',
                overrides: {}
            }
        }
    },
Rollmop answered 17/9, 2014 at 18:46 Comment(0)
H
10

Please verify a type of dependencies in bower.json file. You probably have them installed as devDependencies using --save-dev. Regarding to the optional section for wiredep (that You attached) "devDependencies" option is switched off, so this kind of dependencies are ommited. In order to check this case quickly turn on option as below and run wiredep task:

        // Optional:
        // ---------
        options: {
            // ...
            devDependencies: true
            // ...
        }

If my assumptions will confirm You should have dependencies injected in Your target html between tags:

  <!-- bower:js -->
  <!-- place for dependencies -->
  <!-- endbower -->
Humectant answered 6/1, 2015 at 1:33 Comment(1)
was saving as devDependencies and wasted couple of hourse finding it :(. Thanks @dinel28Landowner

© 2022 - 2024 — McMap. All rights reserved.