aurelia 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bec5e457b37f0f5164769f8116555b984546ba17
4
- data.tar.gz: bdca890df202163d21dbf013903bf08bca072d67
3
+ metadata.gz: da295f64be3528778b2b1c830149c95e4b4d1751
4
+ data.tar.gz: dfc41c30270da7437f84911bbf81a838429b3b98
5
5
  SHA512:
6
- metadata.gz: 52f76a19bcc68bb2f99a3f86dfd2d57ce5706ee95fde2e4214d883c20b283936d0c6401b3047edab978a8c64d962d776c3d409ad416c223f8d6d75393557b624
7
- data.tar.gz: 549cf759235f72ea70129fa9878494fa36f8a45ec85c9e9a802f04815d817bf6c0951b771d1da94a6128358dad0c05b631c912ae6a825ad97a6c38a78704b103
6
+ metadata.gz: c0830632cb31b5cc28e941ab92c9bb3785dd813e3a9f0713de448b2c50936e44b7c078b8406bac90b706c3e0b193244a2722e3a78306c0546a06c722f7f801e0
7
+ data.tar.gz: 56a5c422c5a8f687dd0dfd50c9dd427cc9559faece08680151c59dab09c418f6bc4219371b818a999fffa06ad104b14455850799b1df2e21a16f0825ef6d3c11
data/README.md CHANGED
@@ -1,34 +1,37 @@
1
- # AureliaWrapper
1
+ # About Aurelia
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/aurelia`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
3
+ Hi! [Aurelia](http://www.aurelia.io) is a next gen Javascript framework for mobile, desktop and web that leverages simple conventions to empower your creativity.
6
4
 
7
5
  ## Installation
8
6
 
9
- Add this line to your application's Gemfile:
7
+ Include it in your Gemfile
10
8
 
11
9
  ```ruby
12
10
  gem 'aurelia'
13
11
  ```
14
12
 
15
- And then execute:
16
-
17
- $ bundle
18
-
19
- Or install it yourself as:
13
+ And then execute Bundler:
20
14
 
21
- $ gem install aurelia
15
+ $ bundle install
22
16
 
23
17
  ## Usage
24
18
 
19
+ ## Initializing Aurelia
20
+ Install all Aurelia dependencies with this command:
21
+
25
22
  $ rails g aurelia:install
26
23
 
27
- ## Development
24
+ If you want to specify a Application Layout name and a Aurelia App Name, you could specify:
25
+
26
+ $ rails g aurelia:install Layout_Name Module_Name
27
+
28
+ It will generate a Layout for your Rails app, also de Main .js that Aurelia uses.
29
+
30
+ ## Generate a Module
31
+ Aurelia uses a ES6/ES7 class for our view model, also a Html file, this both files conforms a module, to create one type the following:
28
32
 
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
33
+ $ rails g aurelia:module Module_Name
30
34
 
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
35
 
33
36
  ## Contributing
34
37
 
@@ -1,3 +1,3 @@
1
1
  module Aurelia
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -2,21 +2,38 @@ require 'rails/generators/base'
2
2
 
3
3
  module Aurelia
4
4
  class InstallGenerator < Rails::Generators::Base
5
+ desc "Install all dependencies for Aurelia, create Aurelia Layout, and integrates into Rails Papeline"
5
6
  source_root File.expand_path("../../", __FILE__)
6
-
7
- desc "Install all dependencies for Aurelia, and integrates into Rails App"
8
- def copy_package_json
9
- copy_file "js/package.json", "package.json"
10
- end
7
+ argument :layout_name, :type => :string, :default => "application"
8
+ argument :module_name, :type => :string, :default => "main"
11
9
 
12
10
  def copy_sample_app
13
- directory "js/", "assets/"
14
- remove_file("assets/package.json")
11
+ # Copy Sample App Files
12
+ directory "sample/", "assets/"
13
+
14
+ # Create Application Name and Layout Name
15
+ template "templates/application.html.erb", "app/views/layouts/#{file_name}.html.erb"
16
+ copy_file "templates/main.js", "assets/#{mod_name}.js"
17
+ copy_file "templates/appaurelia.js", "app/assets/javascripts/#{file_name}.js"
18
+
19
+ # Copy the Config.js and Packages.js to destination directory.
20
+ copy_file "templates/package.json", "package.json"
21
+ copy_file "templates/config.js", "assets/config.js"
22
+
15
23
  end
16
24
 
17
25
  def restore_packages
18
26
  exec "jspm install && jspm dl-loader"
19
27
  end
20
28
 
29
+ private
30
+ def file_name
31
+ layout_name.downcase.underscore
32
+ end
33
+
34
+ def mod_name
35
+ module_name.downcase.underscore
36
+ end
37
+
21
38
  end
22
39
  end
@@ -0,0 +1,19 @@
1
+ require 'rails/generators/base'
2
+
3
+ module Aurelia
4
+ class ModuleGenerator < Rails::Generators::Base
5
+ desc "Generate Aurelia Module(html and js files)"
6
+ source_root File.expand_path("../../templates/", __FILE__)
7
+ argument :module_name, :type => :string, :default => "module"
8
+
9
+ def create_module
10
+ template "module.js", "assets/#{module_name.downcase}.js"
11
+ copy_file "module.html", "assets/#{module_name.downcase}.html"
12
+ end
13
+
14
+ private
15
+ def class_name
16
+ module_name.capitalize
17
+ end
18
+ end
19
+ end
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1 @@
1
+ //= require jspm
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title><%= layout_name.capitalize %></title>
5
+ <%%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
6
+
7
+ <%%= csrf_meta_tags %>
8
+ </head>
9
+ <body aurelia-app="<%= mod_name %>">
10
+
11
+ <%%= yield %>
12
+ <%%= javascript_include_tag '<%= file_name %>', 'data-turbolinks-track' => true %>
13
+ </body>
14
+ </html>
File without changes
@@ -0,0 +1,5 @@
1
+ <template>
2
+ <section class="au-animate">
3
+ <h2>${heading}</h2>
4
+ </section>
5
+ </template>
@@ -0,0 +1,5 @@
1
+ export class <%= class_name %> {
2
+ constructor() {
3
+ this.heading = 'Hello World';
4
+ }
5
+ }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aurelia
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gustavo Barrientos
@@ -80,8 +80,6 @@ files:
80
80
  - LICENSE.txt
81
81
  - README.md
82
82
  - Rakefile
83
- - app/assets/javascripts/appaurelia.js
84
- - app/assets/javascripts/systema.js
85
83
  - app/controllers/aurelia/aurelia_controller.rb
86
84
  - app/views/layouts/appaurelia.html.erb
87
85
  - app/views/welcome/index.html.erb
@@ -94,16 +92,21 @@ files:
94
92
  - lib/aurelia/engine.rb
95
93
  - lib/aurelia/version.rb
96
94
  - lib/generators/aurelia/install_generator.rb
97
- - lib/generators/js/app.html
98
- - lib/generators/js/app.js
99
- - lib/generators/js/config.js
100
- - lib/generators/js/jspm.js
101
- - lib/generators/js/main.js
102
- - lib/generators/js/nav-bar.html
103
- - lib/generators/js/nav-bar.js
104
- - lib/generators/js/package.json
105
- - lib/generators/js/welcome.html
106
- - lib/generators/js/welcome.js
95
+ - lib/generators/aurelia/module_generator.rb
96
+ - lib/generators/sample/app.html
97
+ - lib/generators/sample/app.js
98
+ - lib/generators/sample/jspm.js
99
+ - lib/generators/sample/nav-bar.html
100
+ - lib/generators/sample/nav-bar.js
101
+ - lib/generators/sample/welcome.html
102
+ - lib/generators/sample/welcome.js
103
+ - lib/generators/templates/appaurelia.js
104
+ - lib/generators/templates/application.html.erb
105
+ - lib/generators/templates/config.js
106
+ - lib/generators/templates/main.js
107
+ - lib/generators/templates/module.html
108
+ - lib/generators/templates/module.js
109
+ - lib/generators/templates/package.json
107
110
  homepage: http://www.github.com/acidstudios/aurelia
108
111
  licenses:
109
112
  - MIT
@@ -1,13 +0,0 @@
1
- // This is a manifest file that'll be compiled into application.js, which will include all the files
2
- // listed below.
3
- //
4
- // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
- // or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
6
- //
7
- // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
- // compiled file.
9
- //
10
- // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
11
- // about supported directives.
12
- //
13
- //= require jspm
@@ -1,2 +0,0 @@
1
- //= require jspm_packages/system.src.js
2
- //= require config.js