copyDir 1.0.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.
Files changed (3) hide show
  1. data/README.md +56 -0
  2. data/lib/copyDir.rb +17 -0
  3. metadata +99 -0
data/README.md ADDED
@@ -0,0 +1,56 @@
1
+ # Welcome to copyDir
2
+
3
+ copyDir is a simple ruby script for compass to copy one or more folders to one or more different locations.
4
+
5
+ # How to install?
6
+
7
+ 1. Install [Compass](http://compass-style.org/)<br />
8
+ `$ gem update --system`<br />
9
+ `$ gem install compass`
10
+ 2. Install copyDir<br />
11
+ `$ gem install copyDir`
12
+ 3. Require it in your config.rb<br />
13
+ `require 'copyDir'`<br />
14
+ 4. That's it!
15
+
16
+ # How to use it?
17
+
18
+ Open up your __config.rb__, call copyDir and start watching your project with Compass!
19
+
20
+ ```ruby
21
+ CopyDir.new([images_dir, javascripts_dir], ["path/to/folder1", "path/to/folder2"])
22
+ ```
23
+
24
+ __An example config.rb file would look like the following:__
25
+
26
+ ```ruby
27
+ # Require any additional compass plugins here.
28
+
29
+ # Set this to the root of your project when deployed:
30
+ http_path = "/"
31
+ css_dir = "stylesheets"
32
+ sass_dir = "sass"
33
+ images_dir = "images"
34
+ javascripts_dir = "javascripts"
35
+
36
+ # You can select your preferred output style here (can be overridden via the command line):
37
+ # output_style = :expanded or :nested or :compact or :compressed
38
+
39
+ # To enable relative paths to assets via compass helper functions. Uncomment:
40
+ # relative_assets = true
41
+
42
+ # To disable debugging comments that display the original location of your selectors. Uncomment:
43
+ # line_comments = false
44
+
45
+
46
+ # If you prefer the indented syntax, you might want to regenerate this
47
+ # project again passing --syntax sass, or you can uncomment this:
48
+ # preferred_syntax = :sass
49
+ # and then run:
50
+ # sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass
51
+
52
+ # copyDir
53
+ require 'copyDir'
54
+
55
+ CopyDir.new([images_dir, javascripts_dir], ["path/to/folder1", "path/to/folder2"])
56
+ ```
data/lib/copyDir.rb ADDED
@@ -0,0 +1,17 @@
1
+ require 'fileutils'
2
+ require 'colorize'
3
+
4
+ class CopyDir
5
+ def initialize(srcFolders, destFolders)
6
+ puts "copyDir is now running...".green
7
+
8
+ Compass.configuration.on_stylesheet_saved do
9
+ srcFolders.each do |srcFolder|
10
+ destFolders.each do |destFolder|
11
+ FileUtils.cp_r(srcFolder, destFolder)
12
+ puts "copy ".blue + srcFolder + "/ to " + destFolder + "/" + File.basename(srcFolder) + "/"
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
metadata ADDED
@@ -0,0 +1,99 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: copyDir
3
+ version: !ruby/object:Gem::Version
4
+ hash: 21
5
+ prerelease: false
6
+ segments:
7
+ - 1
8
+ - 0
9
+ - 1
10
+ version: 1.0.1
11
+ platform: ruby
12
+ authors:
13
+ - Michael 'Miw0' Worm
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2013-05-16 00:00:00 +02:00
19
+ default_executable:
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ name: compass
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ hash: 43
30
+ segments:
31
+ - 0
32
+ - 12
33
+ - 2
34
+ version: 0.12.2
35
+ type: :runtime
36
+ version_requirements: *id001
37
+ - !ruby/object:Gem::Dependency
38
+ name: colorize
39
+ prerelease: false
40
+ requirement: &id002 !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ hash: 27
46
+ segments:
47
+ - 0
48
+ - 5
49
+ - 8
50
+ version: 0.5.8
51
+ type: :runtime
52
+ version_requirements: *id002
53
+ description: A Compass Extension to copy one or more folders to one or more different locations.
54
+ email: work@michael-worm.de
55
+ executables: []
56
+
57
+ extensions: []
58
+
59
+ extra_rdoc_files: []
60
+
61
+ files:
62
+ - README.md
63
+ - lib/copyDir.rb
64
+ has_rdoc: true
65
+ homepage: https://github.com/Miw0/copyDir
66
+ licenses: []
67
+
68
+ post_install_message:
69
+ rdoc_options: []
70
+
71
+ require_paths:
72
+ - lib
73
+ required_ruby_version: !ruby/object:Gem::Requirement
74
+ none: false
75
+ requirements:
76
+ - - ">="
77
+ - !ruby/object:Gem::Version
78
+ hash: 3
79
+ segments:
80
+ - 0
81
+ version: "0"
82
+ required_rubygems_version: !ruby/object:Gem::Requirement
83
+ none: false
84
+ requirements:
85
+ - - ">="
86
+ - !ruby/object:Gem::Version
87
+ hash: 3
88
+ segments:
89
+ - 0
90
+ version: "0"
91
+ requirements: []
92
+
93
+ rubyforge_project:
94
+ rubygems_version: 1.3.7
95
+ signing_key:
96
+ specification_version: 3
97
+ summary: A Compass Extension to copy one or more folders to one or more different locations.
98
+ test_files: []
99
+