php - Grunt-wiredep done without errors but doesn't inject dependencies -
i'm trying connect wiredep project, no success. have bower_components , bower.json inside assets/, , gruntfile.js in root directory. here's relevant gruntfile:
wiredep: { target: { src: [ 'grunt-test.html', 'application/views/inc/inc_scripts.php', 'application/views/inc/inc_head.php' ], directory: 'assets/bower_components', bowerjson: 'assets/bower.json', filetypes: { php: { block: /(([\s\t]*)<!--\s*bower:*(\s*)\s*-->)(\n|\r|.)*?(<!--\s*endbower\s*-->)/gi, detect: { js: /<script.*src=['"](.+)['"]>/gi, css: /<link.*href=['"](.+)['"]/gi }, replace: { js: '<script src="{{filepath}}"></script>', // <-- change line css: '<link rel="stylesheet" href="{{filepath}}" />' } }, html: { block: /(([\s\t]*)<!--\s*bower:*(\s*)\s*-->)(\n|\r|.)*?(<!--\s*endbower\s*-->)/gi, detect: { js: /<script.*src=['"](.+)['"]>/gi, css: /<link.*href=['"](.+)['"]/gi }, replace: { js: '<script src="{{filepath}}"></script>', // <-- change line css: '<link rel="stylesheet" href="{{filepath}}" />' } } } } }
then run grunt wiredep --verbose
, following output:
running "wiredep" task running "wiredep:target" (wiredep) task verifying property wiredep.target exists in config...ok files: grunt-test.html, application/views/inc/inc_scripts.php, application/views /inc/inc_head.php verifying property wiredep.target.src exists in config...ok options: src=["grunt-test.html","application/views/inc/inc_scripts.php","application/views/inc/inc_head.php"], directory="assets/bower_components", bowerjson="a ssets/bower.json",filetypes={"php":{"block":{},"detect":{"js":{},"css":{}},"replace":{"js":"<script src=\"{{filepath}}\"></script>","css":"<link rel=\"stylesheet\" href=\"{{filepath}}\" />"}},"html":{"block":{},"detect":{"js":{},"css":{}},"replace":{"js":"<script src=\"{{filepath}}\"></script>","css":"<link rel=\"stylesheet\" href=\"{{filepath}}\" />"}}} done, without errors.
but nothing happens. i've made sure i'm using right tags , tried adding html file (grunt-test.html) make sure it's not filetype thing, i'm @ loss right now.
what guys see?
thanks in advance.
Comments
Post a Comment