creeation / laravel-elixir-jade Goto Github PK
View Code? Open in Web Editor NEWSimple Laravel Elixir wrapper to compile Jade Templates to Blade/PHP.
License: MIT License
Simple Laravel Elixir wrapper to compile Jade Templates to Blade/PHP.
License: MIT License
Version 3.0 introduced a new extensions system, which is why this extension sadly is no longer working with the newest elixir one.
gulp watch
always compiles all .jade files if one has been modified,
You should use gulp-jade-find-affected in the pipe I tried it, but did not get it to work yet.
Hi,
I have a problem. I try to include a file with mixins using an absolute path, but I am getting following error:
"the "basedir" option is required to use "include" with "absolute" paths"
However, .jade method in my gulpfile.js contains a defined basedir (it should be the default value anyway):
mix.jade({
baseDir: './resources',
pretty: true
})
Mixins work as expected when I use relative path.
Thx for inspecting this issue.
really nice plugin
I was wondering if it is possible to add an option to write an include statement in all the jade file as the compile for mixins?
example:
mix.jade({
mixins: ['mixins/*.jade']
});
for all jades found it will take all jade files it compiles and add a:
include /path/to/mixins/test.jade
include /path/to/mixins/test2.jade
to the top of the jade file, before they compile.
i hope I made myself understandable.
I get this error when trying to implement laravel-elixir-jade into laravel with elixir 3.0.0
it works fine when using elixir 2.0.0
/Applications/MAMP/htdocs/github/laravel-test/node_modules/laravel-elixir-jade/index.js:59
this.registerWatcher('jade', [
^
TypeError: undefined is not a function
at Function.<anonymous> (/Applications/MAMP/htdocs/github/laravel-test/node_modules/laravel-elixir-jade/index.js:59:10)
at Function.<anonymous> (/Applications/MAMP/htdocs/github/laravel-test/node_modules/laravel-elixir/index.js:46:18)
at /Applications/MAMP/htdocs/github/laravel-test/gulpfile.js:6:9
at Elixir (/Applications/MAMP/htdocs/github/laravel-test/node_modules/laravel-elixir/index.js:20:5)
at Object.<anonymous> (/Applications/MAMP/htdocs/github/laravel-test/gulpfile.js:5:1)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
I think we should use gulp-jade-php. It supports if
, foreach
etc. for PHP...
I'll work on it soon.
Hi,
FYI the gulp-jade dependency is missing in the package.json, throwing an error if you are not setting the jadephp option to true.
https://github.com/CREEATION/laravel-elixir-jade/blob/master/index.js#L37
Error: Cannot find module 'gulp-jade'
at Function.Module._resolveFilename (module.js:326:15)
at Function.Module._load (module.js:277:25)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at Function.<anonymous> (/home/vagrant/node_modules/laravel-elixir-jade/index.js:37:57)
at Function.<anonymous> (/home/vagrant/node_modules/laravel-elixir/index.js:40:18)
at /home/vagrant/gulpfile.js:156:10
at Elixir (/home/vagrant/node_modules/laravel-elixir/index.js:16:5)
at Object.<anonymous> (/home/vagrant/gulpfile.js:76:1)
at Module._compile (module.js:398:26)
and referring to this:
https://github.com/mrkmg/laravel-elixir-pug
(https://www.npmjs.com/package/laravel-elixir-pug)
or better use:
https://github.com/BKWLD/laravel-pug (I did not have time to try it yet, but looks great)
@foreach ($users as $user)
<p>This is user {{ $user->id }}</p>
@endforeach
Hello, thanks for your great plugin!
It would be great if we could exclude a jade file from the pipe, I mean for example the mixins files which didn't have to be compiled into a blade file.
Whenever I compile a jade template that has an error in it, gulp watch exits out completely and needs to be restarted. Other plugins (like the LESS-Compiler) do not do this. Is there a way to catch the error and let the watch script run? Thanks in advance!
Hi
It would be awesome, if the produced extension could be configured.
Right now it's locked to php
or blade.php
.
If we could specify an extension instead of having a blade:true
, maybe defaulting to blade.php
it could be used to compile both backend and front-end templates, like AngularJS, etc.
Cheers, Sebi
I recently noticed that I have to restart my gulp script whenever I add a new file to my jade files. Is that a general problem with gulp or can this be fixed in this elixir-addon?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.