Git Product home page Git Product logo

Comments (5)

pgilad avatar pgilad commented on May 17, 2024

First of all, I see that you use src: ['<%= yeoman.views %>/layout.jade'] in your Gruntfile.js and your configuration object is: yeomanConfig.

Second, you can try running grunt jadeUsemin:dist --verbose --debug and see what files it detects as source files.
It seems to me it didn't find your src file.

Can you try that out and let me know what it outputs? @larryzh

I'm thinking maybe because your scripts dir doesn't exist it might not have created it... hmm. Will check Not the issue.

from grunt-jade-usemin.

larryisthere avatar larryisthere commented on May 17, 2024

Outputs:

Verifying property jadeUsemin.dist exists in config...OK
Files: app/index.jade -> src
Options: (none)
Target Options: (none)
Processing jade file app/index.jade
Reading app/index.jade...OK
Found build:<type> pattern in line: 10
>> Found script src that doesn't exist: bower_components/modernizr/modernizr.js
Found build:<type> pattern in line: 41
>> Found script src that doesn't exist: bower_components/jquery/jquery.js
>> Found script src that doesn't exist: scripts/main.js
>> Found script src that doesn't exist: scripts/hello.js
Found build:<type> pattern in line: 46
>> Found script src that doesn't exist: bower_components/bootstrap/js/affix.js
>> Found script src that doesn't exist: bower_components/bootstrap/js/alert.js
>> Found script src that doesn't exist: bower_components/bootstrap/js/dropdown.js
>> Found script src that doesn't exist: bower_components/bootstrap/js/tooltip.js
>> Found script src that doesn't exist: bower_components/bootstrap/js/modal.js
>> Found script src that doesn't exist: bower_components/bootstrap/js/transition.js
>> Found script src that doesn't exist: bower_components/bootstrap/js/button.js
>> Found script src that doesn't exist: bower_components/bootstrap/js/popover.js
>> Found script src that doesn't exist: bower_components/bootstrap/js/carousel.js
>> Found script src that doesn't exist: bower_components/bootstrap/js/scrollspy.js
>> Found script src that doesn't exist: bower_components/bootstrap/js/collapse.js
>> Found script src that doesn't exist: bower_components/bootstrap/js/tab.js
>> Target scripts/vendor/modernizr.js contains 0 files.
>> Target scripts/main.js contains 0 files.
>> Target scripts/vendor/bootstrap.js contains 0 files.

Running "jadeUseminComplete" task
[D] Task source: undefined
>> jadeUsemin finished after processing 0 files.

from grunt-jade-usemin.

pgilad avatar pgilad commented on May 17, 2024

jadeUsemin validates that the script src exists using fs.existsSync(src). It's not finding your script src, probably because it's looking for them relative to the Gruntfile.js, and not relative to .jade file.

I can add an option for that, but to overcome it temporary - you can reference your script files in your jade either with absolute path, i.e:

script(src='/scripts/bower_components/jquery.validation/localization/messages_zh.js')

or reference them relative to the Gruntfile.js

The main issue - is that people route their static assets with express differently, so I'll add an option to the task as to - what working directory is jadeUsemin to look for the files at.

from grunt-jade-usemin.

larryisthere avatar larryisthere commented on May 17, 2024

ok, sounds good. Thanks a lot.

from grunt-jade-usemin.

pgilad avatar pgilad commented on May 17, 2024

@larryzh updated this, now if src file isn't found, jadeUsemin will look for it also relative to the target location (i.e your jade file).

use npm install on the newest version to try it out. SHA: 16c999e8c71134401a78d4d46435517b2271d6ac

from grunt-jade-usemin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.