stefankroes / scribble Goto Github PK
View Code? Open in Web Editor NEWScribble is a customer facing template language similar to Liquid build in Ruby
License: MIT License
Scribble is a customer facing template language similar to Liquid build in Ruby
License: MIT License
SchoolKeep is looking to release their gem soon, but we have a version dependency on the next release of scribble. Is there anything we can do to help get the next release of scribble out the door? I have been working on getting Arrays as a basic type and might need some guidance on how to finish it up.
Not sure how to fix this :/ The class is technically different...
I'll try to get a working example of this soon.
Hello, I've just finished to read the README, and really liked it. I'm wondering: is it possible to use a block inside another block?
If this is possible, template inheritance through layout
block should be easily achieved and would be a big plus for this, already promising, template manager :)
I've seen your form example and wondering how do you implemented it, more specifically, you have to hard code the various formatting for creating a field text?
Stupid implementation to tell you what I mean:
def string(field, label)
%Q(<label for="#{field}">#{label}</label><input type="text" name="#{field}">)
end
Or we can do something more extensible like:
def string(field, label)
render('input_text', field: field, label: label)
end
Last, but not least: is the resulting code compiled or it's interpreted at each request?
Thank you, and good job!
as I am developing templates and doing integration I am getting a lot of parse errors the issue is however I have no idea where they are because each template lacks a name. It would make debugging a lot simpler if the errors had access to the template name.
scribble parses
!student.enrolled?
=> student.not.enrolled?
instead of
!student.enrolled?
=> student.enrolled?.not
Work around
!(student.enrolled?)
Adding support for arrays and block notation would be a massive step in making scribble an alternative for liquid.
Example concept.
{{ items.each do |item| }}
{{ item }}
{{ end }}
Working out how to implement this so if you have any pointers where to begin let me know.
Do you know how well this gem plays with latest Rails (5.1.x)?
Has anyone create a TemplateHandler for Rails?
I'm interested in Scribble as an alternative to Liquid, but find it's lacking in getting started info, especially for Rails.
/Users/be/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/scribble-1.0.1/lib/scribble/objects/fixnum.rb:2: warning: constant ::Fixnum is deprecated
/Users/be/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/scribble-1.0.1/lib/scribble/objects/fixnum.rb:13: warning: constant ::Fixnum is deprecated
/Users/be/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/scribble-1.0.1/lib/scribble/objects/fixnum.rb:14: warning: constant ::Fixnum is deprecated
/Users/be/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/scribble-1.0.1/lib/scribble/objects/fixnum.rb:19: warning: constant ::Fixnum is deprecated
/Users/be/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/scribble-1.0.1/lib/scribble/objects/fixnum.rb:20: warning: constant ::Fixnum is deprecated
/Users/be/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/scribble-1.0.1/lib/scribble/objects/fixnum.rb:21: warning: constant ::Fixnum is deprecated
/Users/be/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/scribble-1.0.1/lib/scribble/objects/fixnum.rb:22: warning: constant ::Fixnum is deprecated
/Users/be/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/scribble-1.0.1/lib/scribble/objects/fixnum.rb:25: warning: constant ::Fixnum is deprecated
/Users/be/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/scribble-1.0.1/lib/scribble/objects/fixnum.rb:26: warning: constant ::Fixnum is deprecated
/Users/be/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/scribble-1.0.1/lib/scribble/objects/fixnum.rb:27: warning: constant ::Fixnum is deprecated
/Users/be/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/scribble-1.0.1/lib/scribble/objects/fixnum.rb:28: warning: constant ::Fixnum is deprecated
/Users/be/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/scribble-1.0.1/lib/scribble/objects/fixnum.rb:30: warning: constant ::Fixnum is deprecated
/Users/be/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/scribble-1.0.1/lib/scribble/objects/string.rb:25: warning: constant ::Fixnum is deprecated
/Users/be/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/scribble-1.0.1/lib/scribble/objects/string.rb:31: warning: constant ::Fixnum is deprecated
/Users/be/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/scribble-1.0.1/lib/scribble/objects/string.rb:32: warning: constant ::Fixnum is deprecated
/Users/be/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/scribble-1.0.1/lib/scribble/objects/string.rb:35: warning: constant ::Fixnum is deprecated
/Users/be/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/scribble-1.0.1/lib/scribble/objects/string.rb:36: warning: constant ::Fixnum is deprecated
/Users/be/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/scribble-1.0.1/lib/scribble/objects/string.rb:37: warning: constant ::Fixnum is deprecated
/Users/be/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/scribble-1.0.1/lib/scribble/objects/string.rb:38: warning: constant ::Fixnum is deprecated
/Users/be/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/scribble-1.0.1/lib/scribble/methods/times.rb:4: warning: constant ::Fixnum is deprecated
Please fix!
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.