Comments (5)
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.
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.
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.
ok, sounds good. Thanks a lot.
from grunt-jade-usemin.
@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)
- Feature request: Incorporate file revision hash HOT 5
- filerev usage HOT 7
- Create examples.md which shows various usages examples
- Plugin fails when minblock has no tags
- Add option to specify destination directory for taks HOT 12
- It's not clear how to add config for tasks HOT 3
- filerev task doesn't work when using the same output file per two pages HOT 3
- filerev task doesn't work when using the same output file per two pages with targetPrefix HOT 1
- Unable to use absolute path to compiled source HOT 12
- Included assets don't bundled? HOT 7
- How to override source js/css files with revved ones? HOT 6
- Source Maps HOT 2
- Warning: Task "concat:jadeUsemin-css" not found. HOT 15
- Should we fail when script src does not exist? HOT 2
- Pug files are not processed HOT 2
- possibly wrong warning on css&js build types HOT 3
- Task "concat:jadeUsemin" not found HOT 2
- Feature request - write target jade files after replacing build blocks
- Image path in css is not being replaced with relative or absolute path HOT 9
- location is not defined HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grunt-jade-usemin.