jekyll-stitch-plus 1.0.2 → 1.0.3

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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZTlmODRlYWZlMTk2YTY1MWI5Y2ExNDk1ZjI0NTM0ZWUwMjI4MDQwMw==
4
+ MTIzMmFiZTEwZGY3ZDQ5ZDM4ZTcyNjYwZGJkNDhjYzZiMjZkOGEwMg==
5
5
  data.tar.gz: !binary |-
6
- ZjliNDAyZTE4YzhlMWNmYzRmM2VmNDE1M2Y1NTk1NmMyNWUwYWNiNg==
6
+ ZTMyZWE3ZDRlMzUyYjZlZDYwMWIyNGJmZDU2NzI1OTRkMGE4MjhhMQ==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- ZWU1Y2RhNzM5YjFmODU0MGNhY2JlMDcxNDU3NjMwNTJiNGQyNGE0YTRkNTg2
10
- YzYyMjYzOTE1NDMzOGRmZjQzNGY4YTE4MzMxOGRkM2EzM2QyYWVjODliNTU3
11
- NTUxMzRjMmNjOTVkNTUzZjg2Nzk2Y2MxZDMxNGE5YmI1NDdhYzU=
9
+ MmNhNmMxNWFkNWNjMTgwNDc4MzQyOGY2NjYxOTUzZWEwOWEwNDM1ZjQ3YThk
10
+ ZTUwOTg2ZTAxYWFkODVkNzM5Y2Y4YzllNTBlZDk1YWE0YTJmNTEwMWFlNTc2
11
+ OTI2ZmU4OGY0OWI4YjE0YTBkMzBmOWYxYmE0MjE4NjY3NmUyM2E=
12
12
  data.tar.gz: !binary |-
13
- ZjdkNWE4ZGNiNzEwMzk1MmNiNTgzZTA1ZWFmOTU1NDBmMjM1NTZkY2FkNWQ5
14
- MDRmNzczNjRmNjRiZGMyZDMwM2E3NzVmMDljZWRmYTZkODdjNTkwYzcyYmRi
15
- ZTVlMTUwMGZiZWVjOGJiZTMzZjY0YmE3Y2UxNzI0YTM3ZTZiNzI=
13
+ MTM5Y2NlOTI3MGQ0ZTdmZGRiNGU2NGM4ZTI1ZjJiNGIwMGE4MGMyMjdlZmJh
14
+ ZGQ0MWZhZDg2NjA3MDQ5MTk1ZWRhMmUyMGEwNzJiNmRkMjU0MzRjMmUyOTc0
15
+ ZTczOWVkOGM2Y2IzYjViYWEzOGUzZGQ0ZTVhMTQ3YjM5MDI1Y2E=
@@ -1,12 +1,15 @@
1
1
  # Changelog
2
2
 
3
- ## 1.0.0
4
- - Initial release
3
+ ## 1.0.3
4
+ - Fix: no longer creates nested source directory when specfied in output path
5
+
6
+ ## 1.0.2
7
+ - Works better with Guard Stitch Plus
8
+ - Better handles non standard paths for source and javascripts
5
9
 
6
10
  ## 1.0.1
7
11
  - Fix: Uglifier works now.
8
12
 
9
- ## 1.0.1
10
- - Works better with Guard Stitch Plus
11
- - Better handles non standard paths for source and javascripts
13
+ ## 1.0.0
14
+ - Initial release
12
15
 
data/README.md CHANGED
@@ -1,7 +1,13 @@
1
1
  # Jekyll Stitch Plus
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/jekyll-stitch-plus.png)](http://badge.fury.io/rb/jekyll-stitch-plus)
4
+
3
5
  Easily package javascripts into a single file, with support for fingerprinting, uglification and CommonJS wrapping for easy modularization. This plugin is powered by
4
- [Stitch Plus](https://github.com/imathis/stitch-plus) which is a fancy interface on top of [Stitch-rb](https://github.com/maccman/stitch-rb).
6
+ [stitch-plus](https://github.com/imathis/stitch-plus) which is a fancy interface on top of [Stitch-rb](https://github.com/maccman/stitch-rb).
7
+
8
+ If you want to fully understand what this is doing, you should probably read the [stitch-plus docs](https://github.com/imathis/stitch-plus), these docs are mostly focused on how to get stitch-plus to work with Jekyll.
9
+
10
+ Also if you want to automatically build on changes you should look at [Guard Stitch Plus](https://github.com/imathis/guard-stitch-plus) and [Guard Jekyll Plus](https://github.com/imathis/guard-jekyll-plus) which work beautifully with this plugin.
5
11
 
6
12
  ### Install the Gem
7
13
  Add this line to your application's Gemfile:
@@ -16,6 +22,8 @@ Or install it yourself as:
16
22
 
17
23
  $ gem install jekyll-stitch-plus
18
24
 
25
+ If you want to use Coffeescript, be sure you install the `coffee-script` gem, and if you want to uglify your javascripts, you'll need the `uglifier` gem.
26
+
19
27
  ### Install the plugin
20
28
 
21
29
  Add a ruby file (perhaps named `jekyll-stitch-plus.rb`) to your Jekyll plugins directory add add `require 'jekyll-stitch-plus'` to the top.
@@ -9,7 +9,8 @@ module Jekyll
9
9
 
10
10
  stitch = ::StitchPlus.new(config['stitch'])
11
11
  options = stitch.options
12
- dir = File.dirname(options[:output])
12
+ output_file = output_path(site.source, options[:output])
13
+ dir = File.dirname(output_file)
13
14
 
14
15
  # If Guard Stitch Plus is running, let it handle the writes
15
16
  if ENV['GUARD_STITCH_PLUS']
@@ -28,7 +29,7 @@ module Jekyll
28
29
  rescue LoadError
29
30
  end
30
31
 
31
- path = File.join site.source, options[:output]
32
+ path = File.join site.source, output_file
32
33
  stitch.set_options({output: path, uglify: config['stitch']['uglify']})
33
34
 
34
35
  puts '' # Because Jekyll doesn't give a newline for other output
@@ -64,6 +65,11 @@ module Jekyll
64
65
  end
65
66
  end
66
67
 
68
+ def output_path(dir, file)
69
+ source_dir = dir.split('/').last
70
+ file = file.sub /^#{source_dir}\//,''
71
+ end
72
+
67
73
 
68
74
  end
69
75
  class StitchPlusTag < Liquid::Tag
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  module StitchPlusVersion
3
- VERSION = "1.0.2"
3
+ VERSION = "1.0.3"
4
4
  end
5
5
  end
@@ -1,17 +1,16 @@
1
1
  name: Your New Jekyll Site
2
2
  markdown: redcarpet
3
3
  pygments: true
4
- source: source
5
4
  plugins: plugins
6
5
 
7
6
  env: 'production'
8
7
 
9
8
  stitch:
10
9
  dependencies:
11
- - 'source/js/lib/jquery.js'
12
- - 'source/js/lib/underscore.js'
13
- - 'source/js/lib' # globs the js/lib dir
14
- paths: 'source/js/modules' # globs the js/modules dir
10
+ - 'assets/js/lib/jquery.js'
11
+ - 'assets/js/lib/underscore.js'
12
+ - 'assets/js/lib' # globs the js/lib dir
13
+ paths: 'assets/js/modules' # globs the js/modules dir
15
14
  output: 'js/site.js'
16
15
  fingerprint: true
17
16
 
File without changes
File without changes
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-stitch-plus
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Mathis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-22 00:00:00.000000000 Z
11
+ date: 2013-10-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: stitch-plus
@@ -71,13 +71,13 @@ files:
71
71
  - test/.gitignore
72
72
  - test/Gemfile
73
73
  - test/_config.yml
74
+ - test/_layouts/default.html
75
+ - test/_layouts/post.html
76
+ - test/assets/js/lib/foo.coffee
77
+ - test/assets/js/lib/test.js
78
+ - test/assets/js/modules/test-module.js
79
+ - test/index.html
74
80
  - test/plugins/jekyll-stitch-plus.rb
75
- - test/source/_layouts/default.html
76
- - test/source/_layouts/post.html
77
- - test/source/index.html
78
- - test/source/js/lib/foo.coffee
79
- - test/source/js/lib/test.js
80
- - test/source/js/modules/test-module.js
81
81
  homepage: https://github.com/octopress/jekyll-stitch-plus
82
82
  licenses:
83
83
  - MIT