aurelia 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +17 -14
- data/lib/aurelia/version.rb +1 -1
- data/lib/generators/aurelia/install_generator.rb +24 -7
- data/lib/generators/aurelia/module_generator.rb +19 -0
- data/lib/generators/{js → sample}/app.html +0 -0
- data/lib/generators/{js → sample}/app.js +0 -0
- data/lib/generators/{js → sample}/jspm.js +0 -0
- data/lib/generators/{js → sample}/nav-bar.html +0 -0
- data/lib/generators/{js → sample}/nav-bar.js +0 -0
- data/lib/generators/{js → sample}/welcome.html +0 -0
- data/lib/generators/{js → sample}/welcome.js +0 -0
- data/lib/generators/templates/appaurelia.js +1 -0
- data/lib/generators/templates/application.html.erb +14 -0
- data/lib/generators/{js → templates}/config.js +0 -0
- data/lib/generators/{js → templates}/main.js +0 -0
- data/lib/generators/templates/module.html +5 -0
- data/lib/generators/templates/module.js +5 -0
- data/lib/generators/{js → templates}/package.json +0 -0
- metadata +16 -13
- data/app/assets/javascripts/appaurelia.js +0 -13
- data/app/assets/javascripts/systema.js +0 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: da295f64be3528778b2b1c830149c95e4b4d1751
|
4
|
+
data.tar.gz: dfc41c30270da7437f84911bbf81a838429b3b98
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c0830632cb31b5cc28e941ab92c9bb3785dd813e3a9f0713de448b2c50936e44b7c078b8406bac90b706c3e0b193244a2722e3a78306c0546a06c722f7f801e0
|
7
|
+
data.tar.gz: 56a5c422c5a8f687dd0dfd50c9dd427cc9559faece08680151c59dab09c418f6bc4219371b818a999fffa06ad104b14455850799b1df2e21a16f0825ef6d3c11
|
data/README.md
CHANGED
@@ -1,34 +1,37 @@
|
|
1
|
-
#
|
1
|
+
# About Aurelia
|
2
2
|
|
3
|
-
|
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
|
-
|
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
|
-
$
|
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
|
-
|
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
|
-
|
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
|
|
data/lib/aurelia/version.rb
CHANGED
@@ -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
|
-
|
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
|
-
|
14
|
-
|
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
|
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
|
File without changes
|
File without changes
|
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.
|
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/
|
98
|
-
- lib/generators/
|
99
|
-
- lib/generators/
|
100
|
-
- lib/generators/
|
101
|
-
- lib/generators/
|
102
|
-
- lib/generators/
|
103
|
-
- lib/generators/
|
104
|
-
- lib/generators/
|
105
|
-
- lib/generators/
|
106
|
-
- lib/generators/
|
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
|