middleman-jammit 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -7,11 +7,11 @@ Use Jammit in Middleman - merge multiple javascripts/stylesheets into one
7
7
  1. Install
8
8
 
9
9
  gem install middleman-jammit -v 0.0.2 # for middleman 1.2.7
10
- gem install middleman-jammit -v 0.1.0 # for middleman 2.x
10
+ gem install middleman-jammit -v 0.2.0 # for middleman 2.x
11
11
 
12
12
  2. Create your project
13
13
 
14
- mm-init your-middleman-project
14
+ middleman init your-middleman-project
15
15
 
16
16
  3. Create config/assets.yml and activate feature in config.rb
17
17
 
@@ -26,11 +26,11 @@ Use Jammit in Middleman - merge multiple javascripts/stylesheets into one
26
26
 
27
27
  5. Run server/builder
28
28
 
29
- mm-server
29
+ middleman server
30
30
 
31
31
  individual files are used (/javascripts/site.js, /stylesheets/site.css ...)
32
32
 
33
- mm-build
33
+ middleman build
34
34
 
35
35
  packages are used (/assets/all.js and /assets/all.css)
36
36
 
@@ -9,9 +9,9 @@ module Middleman::Jammit
9
9
 
10
10
  class_option :package_path, :default => "assets", :desc => 'The path to the asset files'
11
11
 
12
- class_option :build_dir, :default => Middleman::Server.build_dir, :desc => 'Your build dir'
13
- class_option :css_dir, :default => Middleman::Server.css_dir, :desc => 'The path to the css files'
14
- class_option :js_dir, :default => Middleman::Server.js_dir, :desc => 'The path to the javascript files'
12
+ class_option :build_dir, :default => Middleman.server.build_dir, :desc => 'Your build dir'
13
+ class_option :css_dir, :default => Middleman.server.css_dir, :desc => 'The path to the css files'
14
+ class_option :js_dir, :default => Middleman.server.js_dir, :desc => 'The path to the javascript files'
15
15
 
16
16
 
17
17
  def self.source_root
@@ -19,10 +19,10 @@ module Middleman::Jammit
19
19
  end
20
20
 
21
21
  def create_jammit_config
22
- config_dir = File.join(Middleman::Server.root, "config")
22
+ config_dir = File.join(Middleman.server.root, "config")
23
23
  empty_directory config_dir
24
24
  template "assets.yml.tt", File.join(config_dir, "assets.yml")
25
- prepend_file File.join(Middleman::Server.root, "config.rb") do
25
+ prepend_file File.join(Middleman.server.root, "config.rb") do
26
26
  ['require "middleman-jammit"', 'activate :jammit', "", ""].join("\n")
27
27
  end
28
28
  end
@@ -7,12 +7,12 @@ module Middleman
7
7
 
8
8
  class << self
9
9
  def registered(app)
10
- full_build_dir = File.join(Middleman::Server.root, Middleman::Server.build_dir)
10
+ full_build_dir = File.join(Middleman.server.root, Middleman.server.build_dir)
11
11
 
12
- FileUtils.mkdir_p File.join(full_build_dir, Middleman::Server.js_dir)
13
- FileUtils.mkdir_p File.join(full_build_dir, Middleman::Server.css_dir)
12
+ FileUtils.mkdir_p File.join(full_build_dir, Middleman.server.js_dir)
13
+ FileUtils.mkdir_p File.join(full_build_dir, Middleman.server.css_dir)
14
14
 
15
- jammit_config_file = File.join(Middleman::Server.root, 'config', 'assets.yml')
15
+ jammit_config_file = File.join(Middleman.server.root, 'config', 'assets.yml')
16
16
  raise ConfigurationNotFound, "could not find \"#{jammit_config_file}\" " unless File.exists?(jammit_config_file)
17
17
  jammit_conf = YAML.load(ERB.new(File.read(jammit_config_file)).result)
18
18
 
@@ -23,7 +23,7 @@ module Middleman
23
23
 
24
24
  Middleman::Builder.after_run "jammit" do
25
25
  full_package_path = File.join(full_build_dir, ::Jammit.package_path)
26
- ::Jammit.packager.precache_all(full_package_path, Middleman::Server.root)
26
+ ::Jammit.packager.precache_all(full_package_path, Middleman.server.root)
27
27
  say_status "Jammit", "build/assets"
28
28
  end
29
29
 
@@ -38,7 +38,7 @@ module Middleman
38
38
  asset_files.each do |name, files|
39
39
  files.each do |f|
40
40
  next if f["*"].present?
41
- FileUtils.touch File.join(Middleman::Server.root, f)
41
+ FileUtils.touch File.join(Middleman.server.root, f)
42
42
  end
43
43
  end
44
44
  end
@@ -1,5 +1,5 @@
1
1
  module Middleman
2
2
  module Jammit
3
- VERSION = "0.1.0"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,50 +1,47 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: middleman-jammit
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.0
4
5
  prerelease:
5
- version: 0.1.0
6
6
  platform: ruby
7
- authors:
8
- - "Matthias D\xC3\xB6ring"
7
+ authors:
8
+ - Matthias Döring
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2011-07-13 00:00:00 +02:00
14
- default_executable:
15
- dependencies:
16
- - !ruby/object:Gem::Dependency
12
+ date: 2012-06-06 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
17
15
  name: jammit
18
- prerelease: false
19
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: &70238914407440 !ruby/object:Gem::Requirement
20
17
  none: false
21
- requirements:
18
+ requirements:
22
19
  - - ~>
23
- - !ruby/object:Gem::Version
24
- version: "0.6"
20
+ - !ruby/object:Gem::Version
21
+ version: '0.6'
25
22
  type: :runtime
26
- version_requirements: *id001
27
- - !ruby/object:Gem::Dependency
28
- name: middleman
29
23
  prerelease: false
30
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: *70238914407440
25
+ - !ruby/object:Gem::Dependency
26
+ name: middleman
27
+ requirement: &70238914406940 !ruby/object:Gem::Requirement
31
28
  none: false
32
- requirements:
33
- - - ">"
34
- - !ruby/object:Gem::Version
29
+ requirements:
30
+ - - ! '>'
31
+ - !ruby/object:Gem::Version
35
32
  version: 1.2.7
36
33
  type: :runtime
37
- version_requirements: *id002
38
- description: Use Jammit in Middleman - merge multiple javascripts/stylesheets into one
39
- email:
34
+ prerelease: false
35
+ version_requirements: *70238914406940
36
+ description: Use Jammit in Middleman - merge multiple javascripts/stylesheets into
37
+ one
38
+ email:
40
39
  - matt@foryourcontent.de
41
- executables:
40
+ executables:
42
41
  - mm-jammit-install
43
42
  extensions: []
44
-
45
43
  extra_rdoc_files: []
46
-
47
- files:
44
+ files:
48
45
  - .gitignore
49
46
  - .rvmrc
50
47
  - Gemfile
@@ -55,33 +52,28 @@ files:
55
52
  - lib/middleman-jammit.rb
56
53
  - lib/middleman-jammit/version.rb
57
54
  - middleman-jammit.gemspec
58
- has_rdoc: true
59
55
  homepage: http://rubygems.org/gems/middleman-jammit
60
56
  licenses: []
61
-
62
57
  post_install_message:
63
58
  rdoc_options: []
64
-
65
- require_paths:
59
+ require_paths:
66
60
  - lib
67
- required_ruby_version: !ruby/object:Gem::Requirement
61
+ required_ruby_version: !ruby/object:Gem::Requirement
68
62
  none: false
69
- requirements:
70
- - - ">="
71
- - !ruby/object:Gem::Version
72
- version: "0"
73
- required_rubygems_version: !ruby/object:Gem::Requirement
63
+ requirements:
64
+ - - ! '>='
65
+ - !ruby/object:Gem::Version
66
+ version: '0'
67
+ required_rubygems_version: !ruby/object:Gem::Requirement
74
68
  none: false
75
- requirements:
76
- - - ">="
77
- - !ruby/object:Gem::Version
78
- version: "0"
69
+ requirements:
70
+ - - ! '>='
71
+ - !ruby/object:Gem::Version
72
+ version: '0'
79
73
  requirements: []
80
-
81
74
  rubyforge_project: middleman-jammit
82
- rubygems_version: 1.6.2
75
+ rubygems_version: 1.8.6
83
76
  signing_key:
84
77
  specification_version: 3
85
78
  summary: Use Jammit in Middleman
86
79
  test_files: []
87
-