capistrano-bundle 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +59 -0
- data/capistrano-bundle.gemspec +1 -1
- data/lib/capistrano/tasks/bundle.rake +3 -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: 5bddda5b80e46757a769f7c71939b806eec7662f
|
4
|
+
data.tar.gz: 24fa8fe6660d129fb0904c6b000d534484346e63
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 47ab1a50c6ce568c957e1dcb8699751e382392a1a970f2b967bb840d9f0dcd2d74363600609685f2d160bc6ab176c5bc3627c2b177523047372f5b54d822f824
|
7
|
+
data.tar.gz: 66f33b25d6b764fe505744e0090c91e4dd5392a6bf9a147d75dc56b5a83e2a06d97e14ccfb5074cc4847a6035b0a2c331616b55d5d1c17ac00a5e906c97325eb
|
data/README.md
CHANGED
@@ -1,3 +1,62 @@
|
|
1
1
|
### Capistrano Bundle
|
2
2
|
|
3
3
|
A fast and simple asset bundling extension for Capistrano 3.x
|
4
|
+
|
5
|
+
|
6
|
+
#### Modular Asset Capability
|
7
|
+
|
8
|
+
A common requirement is to split your css / js into modules organised by folder, so for instance you may have a setup like this:
|
9
|
+
|
10
|
+
public/
|
11
|
+
stylesheets/
|
12
|
+
resets/
|
13
|
+
fonts.css
|
14
|
+
typography.css
|
15
|
+
main.css
|
16
|
+
core/
|
17
|
+
headers.css
|
18
|
+
colors.css
|
19
|
+
navigation.css
|
20
|
+
blog/
|
21
|
+
styles.css
|
22
|
+
news/
|
23
|
+
styles.css
|
24
|
+
|
25
|
+
This capistrano bundle deployer, splits your assets up into modules based on the top-level directory, giving you combined builds of each. The above setup would yield the following build files:
|
26
|
+
|
27
|
+
public/
|
28
|
+
stylesheets/
|
29
|
+
build/
|
30
|
+
resets_combined.css
|
31
|
+
core_combined.css
|
32
|
+
blog_combined.css
|
33
|
+
news_combined.css
|
34
|
+
|
35
|
+
A similar principle works for Javascript assest too.
|
36
|
+
|
37
|
+
#### Defaults and configuring
|
38
|
+
|
39
|
+
You'll need to add the gem to your Gemfile.
|
40
|
+
|
41
|
+
gem 'capistrano-bundle'
|
42
|
+
|
43
|
+
Then add this to your Capfle:
|
44
|
+
|
45
|
+
require 'capistrano/bundle'
|
46
|
+
|
47
|
+
|
48
|
+
The defaults are configure the above behaviour, but are completely customisable.
|
49
|
+
|
50
|
+
set :bundle_build_path, fetch(:deploy_to)
|
51
|
+
set :bundle_dirs, [
|
52
|
+
["public/stylesheets/*/", "**/*.css", "public/stylesheets/build/"],
|
53
|
+
["public/javascripts/*/", "**/*.js", "public/javascripts/build/"]
|
54
|
+
]
|
55
|
+
set :bundle_build_suffix, "_combined"
|
56
|
+
|
57
|
+
|
58
|
+
#### Contributing
|
59
|
+
|
60
|
+
This is a very early example of the functionality quite a few features and options are so-far unavailable. If there's something you'd lke to see open an issue.
|
61
|
+
|
62
|
+
|
data/capistrano-bundle.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = 'capistrano-bundle'
|
7
|
-
spec.version = '0.0.
|
7
|
+
spec.version = '0.0.4'
|
8
8
|
spec.authors = ["Ross Riley"]
|
9
9
|
spec.email = ["riley.ross@gmail.com"]
|
10
10
|
spec.description = %q{Very Basic Asset Bundler for Capistrano 3.x}
|
@@ -16,7 +16,9 @@ namespace :bundle do
|
|
16
16
|
build_destination = fetch(:bundle_build_path)+"/"+bundle[2]
|
17
17
|
build_target = build_destination+bundle_name+fetch(:bundle_build_suffix)+bundle_extension
|
18
18
|
on roles(:web) do
|
19
|
-
|
19
|
+
unless test "[ -d #{build_destination} ]"
|
20
|
+
execute :mkdir, '-p', build_destination
|
21
|
+
end
|
20
22
|
upload! StringIO.new(bundle_output), build_target
|
21
23
|
end
|
22
24
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-bundle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ross Riley
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-03-
|
11
|
+
date: 2014-03-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|