Skip to content

minimatch (via ./lib/utils/findFileInfo.js) not working properly #20

@joaocc

Description

@joaocc

I have been trying to get this to work with our project, but with no luck.

.tmp/serve/index.html

     <script src="../bower_components/angular/angular.js"></script>

cdnizer options

var cndizerOpts =
  {
    allowRev: false,
    allowMin: false,
    files: [
      'google:angular'
    ]
  };

folder structure

(root)
    packages.json
    bower.json
    .bowerrc
    gulpfile.js
    gulp
        cdnizer.js
    node_modules/
    bower_components/
    src/
        index.html    (not-injected)        
    .tmp/
        serve/
            index.html    (injected)

bower.json

{
  "dependencies": {
    "angular": "~1.4.5",

I added some console.log entries to try and troubleshoot the problem (./utils/findFileInfo()).
It seems that the parsing is done correctly but minimatch says they are not matching:

in lib/util.js:findFileInfo, minimatch is called with what seem to be the right parameters, but returns null/false.

    url ===>>  "../bower_components/angular/angular.js"
    fileInfo.file ===>> "**/angular.js"

I also tried adding {dot: true} to the call to minimatch, but it still fails.

Any hints?
Thx

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions