lsd_rails 0.1 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -8,7 +8,7 @@ class WidgetGenerator < Rails::Generators::Base
8
8
 
9
9
  def create_widget_file
10
10
  widgets_path = "public/javascripts/Source/Widget"
11
- @widget_name = @widget_name.capitalize
11
+ @widget_name = @widget_name.classify
12
12
  @app_name = LSD.detect_project_name
13
13
 
14
14
  empty_directory(widgets_path)
@@ -1,30 +1,70 @@
1
1
  /*
2
2
  ---
3
-
4
- script: Application.js
5
-
6
- description: Main script of application
7
-
8
- license: Public domain (http://unlicense.org).
3
+ description: The file the requires dependencies. To be required, of course.
9
4
 
10
- authors: Pavel Evstigneev
5
+ license: MIT-style
6
+
7
+ authors:
11
8
 
12
9
  requires:
13
- - <%= @app_name %>
14
- - <%= @app_name %>.Widget
15
-
10
+ - LSD/LSD.Widget
11
+ - LSD/LSD.Document
12
+ - Native/LSD.Native.*
13
+ - Widgets/LSD.Widget.Body
14
+ - Widgets/LSD.Widget.Anchor
16
15
  - Widgets/LSD.Widget.Form
17
16
  - Widgets/LSD.Widget.Label
18
- - Widgets/LSD.Widget.Select
19
- - LSD/LSD.Mixin.Request
20
- - LSD/LSD.Mixin.Target
21
- - LSD/LSD.Action.*
22
- - LSD/LSD.Document
23
-
17
+ - LSD/LSD.Action.Append
18
+ - LSD/LSD.Action.Update
19
+ - LSD/LSD.Action.Check
20
+ - LSD/LSD.Action.Clone
21
+ - LSD/LSD.Action.Delete
22
+ - LSD/LSD.Action.Display
23
+ - LSD/LSD.Action.Focus
24
+ - LSD/LSD.Action.Replace
25
+ - LSD/LSD.Action.Set
26
+ - LSD/LSD.Action.State
27
+ - LSD/LSD.Action.Submit
28
+
29
+ provides: [Application]
30
+
31
+ What is that above?
32
+ It's a list of Application dependencies. It loads:
33
+ * LSD.Widget - The smallest entity of a framework, DOM Element's
34
+ younger (and prettier) brother. A boy that will do
35
+ things for you.
36
+
37
+ * LSD.Document - A thing that wraps the whole document, makes
38
+ <body> a widget and traverses layout to convert
39
+ elements into widgets.
40
+
41
+ * LSD.Native.* - Includes a HTML4 set of widgets that handle form
42
+ fields. It's a wise thing to be closer to DOM and use
43
+ plain input elements.
44
+
45
+ * LSD.Widget...- A basic set of essensial widgets, that augment their
46
+ elements to do something functional and beautiful.
47
+
48
+ * LSD.Action...- A set of actions that widget can execute on self,
49
+ other widgets, or plain DOM elements. There're a little
50
+ more of them (e.g. Edit), but you may not need them now.
51
+
52
+ A prefix before slash in expression means (like Native in Native/LSD.Widget.Input)
53
+ is a package name (set in package.yml as "name"). So to require a file
54
+ from a specific package, you have to specify package name as well.
55
+
56
+ Some useful things to require:
57
+
58
+ Mobile/*
59
+ Includes all mobile widgets and mobile adjustements if a browser
60
+ is detected as mobile.
24
61
 
25
- provides:
26
- - <%= @app_name %>.Application
27
-
62
+ LSD/LSD.Mixin.Validity
63
+ Enable HTML5 form validation on all fields.
64
+
65
+ LSD/LSD.Action.Edit
66
+ Adds edit action that turns a microdata-formatted element into an
67
+ edit in-place form with submit and cancel buttons.
28
68
  ...
29
69
  */
30
70
 
@@ -1,13 +1,10 @@
1
1
  /*
2
2
  ---
3
-
4
- script: Widget.js
5
-
6
3
  description: Basic widget
7
4
 
8
5
  license: Public domain (http://unlicense.org).
9
6
 
10
- authors: Andrey Koppel
7
+ authors:
11
8
 
12
9
  requires:
13
10
  - <%= @app_name %>
@@ -1,13 +1,10 @@
1
1
  /*
2
2
  ---
3
-
4
- script: <%= @app_name %>.js
5
-
6
3
  description: Basic script
7
4
 
8
5
  license: Public domain (http://unlicense.org).
9
6
 
10
- authors: Pavel Evstigneev
7
+ authors:
11
8
 
12
9
  provides:
13
10
  - <%= @app_name %>
@@ -1,13 +1,10 @@
1
1
  /*
2
2
  ---
3
-
4
- script: <%= @widget_name %>.js
5
-
6
3
  description: Basic script
7
4
 
8
5
  license: Public domain (http://unlicense.org).
9
6
 
10
- authors: Pavel Evstigneev
7
+ authors:
11
8
 
12
9
  requires:
13
10
  - <%= @app_name %>.Widget
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: lsd_rails
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: "0.1"
5
+ version: 0.1.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Pavel Evstigneev