Comments (19)
You will need to use the basePath
option to keep the directory structure, as such:
html: {
files: {
'app/public/': ['app/views/**/*.jade']
},
options: {
client: false,
basePath: 'app/views/'
}
}
from grunt-jade.
I just tried:
jade: {
html: {
files: {
'public/': ['views/**/*.jade']
},
options: {
client: false,
basePath: 'views/'
}
}
}
And got:
Running "jade:html" (jade) task
Warning: Unable to write "public/" file (Error code: EISDIR). Use --force to continue.
from grunt-jade.
I just verified that is is working correctly. Try removing your public/
directory.
from grunt-jade.
Nope, just tried creating a new directory called blah
and I get exactly the same error.
from grunt-jade.
Some kind of configuration on your system is incorrect because I ran you example on my development machine and it worked.
from grunt-jade.
Hmm... Is this a Windows / Mac / Linux machine you're testing on? (I'm running Windows)
from grunt-jade.
Mhh I trying a yeoman build using grunt and jade and I can verify I cant get this snippet to spit out any thing
jade: {
html: {
files: {
'<%= yeoman.app %>/.html': ['<%= yeoman.app %>/jade/.jade']
},
options: {
client: false,
basePath: '<%= yeoman.app %>'
}
}
},
the problem is that the wildcard is also carried through to the output file name so a file name *.html is generated
If I use
jade: {
html: {
files: {
'<%= yeoman.app %>/': ['<%= yeoman.app %>/jade/*.jade']
},
options: {
client: false,
basePath: '<%= yeoman.app %>'
}
}
},
it all generates an error of failing to be able to write to file
Running "jade:html" (jade) task
Warning: Unable to write "app/" file (Error code: EISDIR). Use --force to continue.
from grunt-jade.
@sononix - I believe your first part is a separate issue, as I don't support that (and don't believe I have it anywhere in docs or tests).
@Siyfion - I have tested on Linux and Mac but I am using internal grunt functions so it should be as cross-platform compatible as grunt itself.
from grunt-jade.
I finally found some doc's the solution i found that worked was
jade: {
dist: {
options: {
pretty: true
},
files: [{
expand: true,
cwd: '<%= yeoman.app %>/jade',
dest: '<%= yeoman.app %>',
src: '*.jade',
ext: '.html'
}]
}
},
from grunt-jade.
Interesting, I will explore why that is the case. (I am assuming you are on Windows also, @sononix?)
I just recently upgrade computers and haven't gotten a Windows VM running yet to test anything on. Any more information will help.
from grunt-jade.
Running mac and Im running yeoman v1 not sure what the other dependencies are
I found the snippet here
https://gist.github.com/kevva/5201657
here is my package.json file
{
"name": "testingapp",
"version": "0.0.0",
"dependencies": {},
"devDependencies": {
"grunt": "0.4.0rc7",
"grunt-contrib-copy": "0.4.0rc7",
"grunt-contrib-concat": "0.1.2rc6",
"grunt-contrib-coffee": "0.4.0rc7",
"grunt-contrib-uglify": "0.1.1rc6",
"grunt-contrib-compass": "0.1.1rc8",
"grunt-contrib-jshint": "0.1.1rc6",
"grunt-contrib-mincss": "0.4.0rc7",
"grunt-contrib-connect": "0.1.1rc6",
"grunt-contrib-clean": "0.4.0rc6",
"grunt-contrib-htmlmin": "0.1.1rc7",
"grunt-contrib-imagemin": "0.1.1rc8",
"grunt-contrib-livereload": "0.1.0rc8",
"grunt-bower-hooks": "~0.2.0",
"grunt-usemin": "~0.1.7",
"grunt-regarde": "~0.1.1",
"grunt-karma": "~0.3.0",
"grunt-open": "~0.1.0",
"matchdep": "~0.1.1",
"grunt-google-cdn": "~0.1.0",
"grunt-ngmin": "~0.0.1",
"grunt-contrib-jade": "~0.5.0"
},
"engines": {
"node": ">=0.8.0"
}
}
from grunt-jade.
@sononix some of the Grunt RCs broke APIs. I suggest updating anything that is an RC to a release version. I feel like Grunt 0.4.0rc7
was particularly bad.
from grunt-jade.
I just did an npm update
and I'm still getting the issue; is there something I can do to help diagnose my issue? Or something that'll narrow it down?
from grunt-jade.
npm update
won't solve the problem with @sononix package.json, as yeoman locked grunt in to 0.4.0rc7
which means he will have to go into the package.json and edit the specific task dependencies.
Is this your same use case @Siyfion? What does your package.json look like?
from grunt-jade.
{
"dependencies": {
"async": "*",
"express": "*",
"jade": "*",
"mongoose": "*",
"validator": "*",
"winston": "*",
"sugar": "*",
"password-hash": "*",
"pdfkit": "*"
},
"engines": {
"node": "0.8.x",
"npm": "1.1.x"
},
"devDependencies": {
"grunt": "~0.4.1",
"grunt-contrib-jade": "~0.5.0",
"grunt-contrib-jshint": "~0.3.0"
}
}
from grunt-jade.
@Siyfion your issues aren't related to grunt version. I am guessing your problems are related to Windows as none of my stuff gets tested on it until someone reports it broken
from grunt-jade.
@phated Is there anything that I can do to help from my end?
from grunt-jade.
@Siyfion I just realized that you are using grunt-contrib-jade, and not this library. I suggest you bring it up with the maintainers of grunt-contrib-jade or switch to using this plugin, which is just grunt-jade.
Note: I just tested my library on Windows and it works fine. 2 tests fail due to newlines in windows, but running just the jade task generates all the files specified.
from grunt-jade.
Apologies @phated, I didn't even notice the subtle difference in name. I've brought the same issue up with grunt-contrib crowd.
from grunt-jade.
Related Issues (13)
- window declaration on jade template? HOT 1
- Maintain template folder structure HOT 8
- FYI HOT 1
- grunt.template.process on options HOT 2
- Rewrite for 0.4.0rc7 HOT 2
- Catch compile errors a little more gracefully.... HOT 1
- Grunt 0.4 Release HOT 6
- dependencies parameter in node template HOT 6
- runtime.js HOT 1
- It does not fail on syntax error HOT 1
- How do I compile mutliple HTML Jade templates that use the same mixin HOT 1
- Says "unexpected identifier although it shouldn't HOT 2
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.