npm2gem 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 +14 -14
- data/lib/npm2gem/version.rb +1 -1
- data/npm2gem.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a5d5c82438787758c46990841f4954ad45a31f4a
|
4
|
+
data.tar.gz: d0686b4c187bdd033a3ab9575cfe3d6de3c1674b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3fd20a6a547069362274a8599178d5f9ad1c9a26922e9887d42c666c047f3565e0621f78036583611b94f7125320d28adcb239f3a91f3fa771b4c0fc2789d296
|
7
|
+
data.tar.gz: f8a6e2d922b3d68ffe6948d73f367a63af8b425c27362dff41c8ff3fe874744cacd3b3f614ab5e53aecc190ffc9fab8892ae1ae6046f8b4be08a8750d95ffc17
|
data/README.md
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# npm2gem
|
2
2
|
|
3
|
-
npm2gem is a tool to help you
|
3
|
+
npm2gem is a tool to help you maintain
|
4
4
|
['gemified assets'](http://www.prioritized.net/blog/gemify-assets-for-rails/)
|
5
|
-
for Rails,
|
5
|
+
for Ruby on Rails,
|
6
6
|
by automatically pulling assets from NPM.
|
7
7
|
|
8
8
|
## Installation
|
@@ -11,7 +11,7 @@ Add this line to your application's Gemfile:
|
|
11
11
|
|
12
12
|
```ruby
|
13
13
|
group :development do
|
14
|
-
gem
|
14
|
+
gem "npm2gem"
|
15
15
|
end
|
16
16
|
```
|
17
17
|
|
@@ -21,12 +21,12 @@ Then run:
|
|
21
21
|
|
22
22
|
## Usage
|
23
23
|
|
24
|
-
`npm2gem`
|
24
|
+
`npm2gem` uses a configuration file: `.npm2gem.yml`.
|
25
25
|
|
26
26
|
Once that file is set up,
|
27
27
|
you just run `npm2gem`
|
28
28
|
and it'll automatically download the correct package from `npm`,
|
29
|
-
and copy the files you want into your
|
29
|
+
and copy the files you want into your gem.
|
30
30
|
|
31
31
|
It assumes that all files will go into `vendor/assets`,
|
32
32
|
with javascript files going into `vendor/assets/javascripts`
|
@@ -37,13 +37,13 @@ and stylesheet files going into `vendor/assets/stylesheets`.
|
|
37
37
|
|
38
38
|
Here is the specification for the `.npm2gem.yml` file:
|
39
39
|
|
40
|
-
```
|
40
|
+
```yaml
|
41
41
|
bootstrap:
|
42
42
|
- dist/css/boostrap.css
|
43
43
|
- dist/css/bootstrap-theme.css
|
44
44
|
- dist/js/bootstrap.js
|
45
45
|
|
46
|
-
```
|
46
|
+
```
|
47
47
|
|
48
48
|
|
49
49
|
#### Subdirectories
|
@@ -55,28 +55,29 @@ Note: all `.css` files go into `vendor/assets/stylesheets`
|
|
55
55
|
and all `.js` files go into `vendor/assets/javascripts`,
|
56
56
|
this is currently a default that you cannot override.
|
57
57
|
|
58
|
-
|
59
|
-
is have subdirectories.
|
58
|
+
You can create subdirectories though.
|
60
59
|
|
61
60
|
Let's say you wanted to put the `bootstrap-theme.css` file into
|
62
61
|
`vendor/assets/stylesheets/themes` instead.
|
63
62
|
|
64
63
|
Here's the `.npm2gem.yml` you'd use:
|
65
64
|
|
66
|
-
```
|
65
|
+
```yaml
|
67
66
|
bootstrap:
|
68
67
|
- dist/css/boostrap.css
|
69
68
|
- dist/js/bootstrap.js
|
70
69
|
- themes:
|
71
70
|
- dist/css/bootstrap-theme.css
|
72
71
|
|
73
|
-
```
|
72
|
+
```
|
74
73
|
|
75
74
|
## TODO:
|
76
75
|
|
77
76
|
- [ ] Support SCSS, Coffee, etc.
|
78
77
|
- [ ] Add support for fonts?
|
79
|
-
- [ ] Add tests
|
78
|
+
- [ ] Add tests for:
|
79
|
+
- [ ] ensuring you can group JS and CSS files together in `.npm2gem.yml`
|
80
|
+
- [ ] ensuring subdirectories can be nested
|
80
81
|
|
81
82
|
## Future work
|
82
83
|
Eventually, I'd like there to be a service that uses this gem to
|
@@ -93,8 +94,7 @@ https://github.com/cllns/npm2gem.
|
|
93
94
|
This project is intended to be a safe,
|
94
95
|
welcoming space for collaboration,
|
95
96
|
and contributors are expected to adhere to the
|
96
|
-
[
|
97
|
-
code of conduct.
|
97
|
+
[code of conduct](code_of_conduct.md).
|
98
98
|
|
99
99
|
## License
|
100
100
|
|
data/lib/npm2gem/version.rb
CHANGED
data/npm2gem.gemspec
CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.authors = ["Sean Collins"]
|
10
10
|
spec.email = ["sean@cllns.com"]
|
11
11
|
|
12
|
-
spec.summary = "A tool to help
|
12
|
+
spec.summary = "A tool to help maintain Asset gems for Ruby on Rails"
|
13
13
|
spec.homepage = "https://github.com/cllns/npm2gem"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: npm2gem
|
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
|
- Sean Collins
|
@@ -267,7 +267,7 @@ rubyforge_project:
|
|
267
267
|
rubygems_version: 2.4.5
|
268
268
|
signing_key:
|
269
269
|
specification_version: 4
|
270
|
-
summary: A tool to help
|
270
|
+
summary: A tool to help maintain Asset gems for Ruby on Rails
|
271
271
|
test_files:
|
272
272
|
- spec/cli_spec.rb
|
273
273
|
- spec/config_spec.rb
|