catmando on noreset
initial commit refactoring now (compare)
barriehadfield on edge
Hyperloop point to master for JS (compare)
barriehadfield on edge
Hyperloop 0.99.1 (compare)
catmando on edge
got tests passing again Gemfiles point to released gems (compare)
catmando on edge
closes #19 closes #20 Merge branch 'edge' of github.c… resolved gemspec merge conflict (compare)
barriehadfield on edge
Update README.md (compare)
barriehadfield on edge
Update README.md (compare)
johansmitsnl on edge
Move the libv8 to running depen… Remove webdriver Remove empty helper (compare)
johansmitsnl on edge
johansmitsnl on edge
Download and install the chrome… (compare)
johansmitsnl on edge
Remove the find for the webdriv… (compare)
johansmitsnl on edge
Include the database schema (compare)
johansmitsnl on edge
Use find to locate the webdriver Don't set the path directly (compare)
johansmitsnl on edge
Update the gemfile.lock (compare)
Hi there!
I have a question. Why do you use this ugly syntax:
class HelloWorld < HyperComponent
render(DIV) do
# try changing 'world' to your own name
H1 { 'Hello world' }
P(class: 'green-text') { "Let's gets started!" }
end
end
instead of:
class HelloWorld < HyperComponent
render(div) do
# try changing 'world' to your own name
h1 { 'Hello world' }
p(class: 'green-text') { "Let's gets started!" }
end
end
CONSTANTS
and it feels strange, very strange because CONSTANTS
they are made to be always the same. But in Hyperstack it has a method. If the only things that maters here is the color to see quickly what is what, you can install a plugin in your editor to recognize the framework/language you use and change the color in that context.
MyComponent(...)
is shorthand for MyComponent.insert(...)
And the second question I have is why you are passing a DIV
to render
?
class HelloWorld < HyperComponent
render(DIV) do
# try changing 'world' to your own name
H1 { 'Hello world' }
P(class: 'green-text') { "Let's gets started!" }
end
end
maybe it would be better:
class HelloWorld < HyperComponent
render do
div do
# try changing 'world' to your own name
h1 { 'Hello world' }
p(class: 'green-text') { "Let's gets started!" }
end
end
end
class HelloWorld < HyperComponent
render(DIV) do
# try changing 'world' to your own name
H1 { 'Hello world' }
P(class: 'green-text') { "Let's gets started!" }
end
end
instead of
class HelloWorld < HyperComponent
DIV do
# try changing 'world' to your own name
H1 { 'Hello world' }
P(class: 'green-text') { "Let's gets started!" }
end
end
well if you want to try it, this patch seems to work... no specs yet, but:
# add to your HyperComponent base class
class << self
alias :my_original_meth_missing method_missing
def method_missing(name, *args, &block)
if const_defined?(name) &&
(klass = const_get(name)) &&
((klass.is_a?(Class) && klass.method_defined?(:render)) ||
Hyperstack::Internal::Component::Tags::HTML_TAGS.include?(klass))
render(klass, *args, &block)
else
my_original_meth_missing(name, *args, &block)
end
end
end
class HelloWorld < HyperComponent
H1 { 'Hello world' }
P(class: 'green-text') { "Let's gets started!" }
end