page_assets 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.md +82 -0
- data/Rakefile +27 -0
- data/lib/page_assets.rb +5 -0
- data/lib/page_assets/railtie.rb +4 -0
- data/lib/page_assets/version.rb +3 -0
- data/lib/tasks/page_assets_tasks.rake +4 -0
- metadata +79 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 0a601c4412f98a2fb4cf99d6991b2dbd627799e0f93b6ea8b4cc0acb865cc94b
|
4
|
+
data.tar.gz: 7658358fb8002a0822795800c24c20fb6dfaf791782066de13d3c6bfff9084da
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: c10711ced51cd284f9e5c69feda8ce88a59c2f1ce419a0412f6b87f992b38bd8dafb1407ee35d35a5da92a0bd9939062e53f6619d7715ef1d7d3a09f68b3ebd9
|
7
|
+
data.tar.gz: 7e3dd7ba68461f5c67d53b57531dca6bc272a6e2669bbf97b28d6f9d180797f2a607aa1dd22fc0f608677b4d9bed5e6e32076024eed6c1deea01f22042b576db
|
data/MIT-LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright 2019 Myk Klemme
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,82 @@
|
|
1
|
+
# page_assets
|
2
|
+
|
3
|
+
---
|
4
|
+
|
5
|
+
[![Gem Version](https://badge.fury.io/rb/page_assets.svg)](https://badge.fury.io/rb/page_assets)
|
6
|
+
[![Build Status](https://travis-ci.com/invisiblehats/page_assets.svg?branch=master)](https://travis-ci.com/invisiblehats/page_assets)
|
7
|
+
[![Code Climate](https://codeclimate.com/github/invisiblehats/page_assets.svg)](https://codeclimate.com/github/invisiblehats/page_assets)
|
8
|
+
[![Inline docs](http://inch-ci.org/github/invisiblehats/page_assets.svg)](http://inch-ci.org/github/invisiblehats/page_assets)
|
9
|
+
[![Security](https://hakiri.io/github/invisiblehats/page_assets/master.svg)](https://hakiri.io/github/invisiblehats/page_assets/master)
|
10
|
+
|
11
|
+
---
|
12
|
+
|
13
|
+
A rails helper to handle page specific styles and scripts
|
14
|
+
|
15
|
+
## Installation
|
16
|
+
|
17
|
+
Add this line to your application's Gemfile:
|
18
|
+
|
19
|
+
```ruby
|
20
|
+
gem 'page_assets', github: 'invisiblehats/page_assets'
|
21
|
+
```
|
22
|
+
|
23
|
+
And then execute:
|
24
|
+
|
25
|
+
$ bundle
|
26
|
+
|
27
|
+
Or install it yourself as:
|
28
|
+
|
29
|
+
$ gem install page_assets
|
30
|
+
|
31
|
+
## Usage
|
32
|
+
|
33
|
+
Create your page files:
|
34
|
+
```scss
|
35
|
+
// stylesheets/pages/home.page.scss
|
36
|
+
|
37
|
+
body.home {
|
38
|
+
section.resources {
|
39
|
+
background-color: $black-7;
|
40
|
+
}
|
41
|
+
}
|
42
|
+
```
|
43
|
+
```javascript
|
44
|
+
// javascripts/pages/home.page.js
|
45
|
+
|
46
|
+
console.log('Hello world!');
|
47
|
+
```
|
48
|
+
|
49
|
+
And include them in your page with our helper:
|
50
|
+
```erb
|
51
|
+
<%= load_page_assets(
|
52
|
+
"home", # the name of the page (ex. "home".page.js)
|
53
|
+
script: true, # default: false
|
54
|
+
style: true # default: false
|
55
|
+
) %>
|
56
|
+
```
|
57
|
+
|
58
|
+
## Development
|
59
|
+
|
60
|
+
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.
|
61
|
+
|
62
|
+
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).
|
63
|
+
|
64
|
+
## Contributing
|
65
|
+
|
66
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/invisiblehats/page_assets. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
67
|
+
|
68
|
+
## License
|
69
|
+
|
70
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
71
|
+
|
72
|
+
## Code of Conduct
|
73
|
+
|
74
|
+
Everyone interacting in the ClassName project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/page_assets/blob/master/CODE_OF_CONDUCT.md).
|
75
|
+
|
76
|
+
## Development team
|
77
|
+
### People
|
78
|
+
- [Myk Klemme - @mklemme](https://github.com/mklemme) Lead developer and maintainer for this project.
|
79
|
+
### Partners
|
80
|
+
- [Invisible Hat Ventures - @invisiblehats](https://github.com/invisiblehats) A private startup development agency
|
81
|
+
- [Love.irish - @love-irish](https://github.com/love-irish) A lifestyle-as-a-service for the Irish language
|
82
|
+
- [League of Celts - @league-of-celts](https://github.com/league-of-celts) A non-profit focused on promoting Celtic languages
|
data/Rakefile
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
begin
|
2
|
+
require 'bundler/setup'
|
3
|
+
rescue LoadError
|
4
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
5
|
+
end
|
6
|
+
|
7
|
+
require 'rdoc/task'
|
8
|
+
|
9
|
+
RDoc::Task.new(:rdoc) do |rdoc|
|
10
|
+
rdoc.rdoc_dir = 'rdoc'
|
11
|
+
rdoc.title = 'PageAssets'
|
12
|
+
rdoc.options << '--line-numbers'
|
13
|
+
rdoc.rdoc_files.include('README.md')
|
14
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
15
|
+
end
|
16
|
+
|
17
|
+
require 'bundler/gem_tasks'
|
18
|
+
|
19
|
+
require 'rake/testtask'
|
20
|
+
|
21
|
+
Rake::TestTask.new(:test) do |t|
|
22
|
+
t.libs << 'spec'
|
23
|
+
t.pattern = 'spec/**/*_test.rb'
|
24
|
+
t.verbose = false
|
25
|
+
end
|
26
|
+
|
27
|
+
task default: :test
|
data/lib/page_assets.rb
ADDED
metadata
ADDED
@@ -0,0 +1,79 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: page_assets
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Myk Klemme
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2019-05-14 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rails
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 6.0.0.rc1
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 6.0.0.rc1
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: sqlite3
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
description: Easily handle page specific styles and scripts
|
42
|
+
email:
|
43
|
+
- mykklemme@gmail.com
|
44
|
+
executables: []
|
45
|
+
extensions: []
|
46
|
+
extra_rdoc_files: []
|
47
|
+
files:
|
48
|
+
- MIT-LICENSE
|
49
|
+
- README.md
|
50
|
+
- Rakefile
|
51
|
+
- lib/page_assets.rb
|
52
|
+
- lib/page_assets/railtie.rb
|
53
|
+
- lib/page_assets/version.rb
|
54
|
+
- lib/tasks/page_assets_tasks.rake
|
55
|
+
homepage: https://github.com/invisiblehats/page_assets
|
56
|
+
licenses:
|
57
|
+
- MIT
|
58
|
+
metadata:
|
59
|
+
allowed_push_host: https://rubygems.org/
|
60
|
+
post_install_message:
|
61
|
+
rdoc_options: []
|
62
|
+
require_paths:
|
63
|
+
- lib
|
64
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
70
|
+
requirements:
|
71
|
+
- - ">="
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: '0'
|
74
|
+
requirements: []
|
75
|
+
rubygems_version: 3.0.3
|
76
|
+
signing_key:
|
77
|
+
specification_version: 4
|
78
|
+
summary: Easily handle page specific styles and scripts
|
79
|
+
test_files: []
|