jekyll-browserify 1.0.0 → 1.1.0

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,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 90badef3c624cf26da7b1b9581538657ebf60564
4
- data.tar.gz: bb525bdd295d1f500b17ef7a97e47c63f5c2410d
3
+ metadata.gz: bbaf0e2bcac07a0ce7e68b8b38199b2e09eaddb7
4
+ data.tar.gz: 4fe20d7fff09bad7b68899022e115b9dce9c27f1
5
5
  SHA512:
6
- metadata.gz: f0219b23ed2d72631d5aa84b0512c2b528c25eaae9276dfa3785d6b9f530172b770a23621b1bdb0b02843aa13fc371165f5f66defe51d54c5a6685eeedcee084
7
- data.tar.gz: dc925995978b5b3f9a0bd2bc0cdcf5e48a522cc812db56df953ce77d907a5afc7d92be538f4243c1f12081fea20f7574db9848a95286995ec319645c53a86771
6
+ metadata.gz: a0725d228eddf0671cbc4a11d9d6f9398b7526e88801771f9e7fb9404be796393fff218e57d8ef509d92f7917011eeab5fe4fcb67b2169edb6d720f603b04feb
7
+ data.tar.gz: 53581f41203ccc1a20a841bf305996445c3d0c661f7cfd92596aaa5133216280dfc1fd9900a9ceac328144882c84b5641e16dcd2f50cb0bd9c1a0e51d888e5f6
data/README.md CHANGED
@@ -48,7 +48,15 @@ browserify:
48
48
  ~~~~~~~~~~~~~~~~~~~~~~~~~yaml
49
49
  # _config.yaml
50
50
  browserify:
51
- exts: [".js"] # target exts to convert
51
+
52
+ # target exts to convert
53
+ exts: [".js"]
54
+
55
+ # use installed 'browserify'
56
+ command: "browserify -"
57
+
58
+ # execute `npm install` on initialize if true
59
+ npm_install: false
52
60
 
53
61
  # set nvm properties if you want to use with nvm installed automatically
54
62
  nvm:
@@ -61,9 +69,6 @@ browserify:
61
69
 
62
70
  # node version if you specify, or use '.nvmrc' if 'null'
63
71
  node_version: null
64
-
65
- # use installed 'browserify'
66
- command: "browserify -"
67
72
  ~~~~~~~~~~~~~~~~~~~~~~~~~
68
73
 
69
74
  [babel]: https://github.com/babel/babelify
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  module Browserify
3
- VERSION = "1.0.0"
3
+ VERSION = "1.1.0"
4
4
  end
5
5
  end
@@ -7,7 +7,8 @@ module Jekyll
7
7
  def initialize config
8
8
  super
9
9
  @browserify = nil
10
- system "npm install"
10
+
11
+ system "npm install" if npm_install?
11
12
  end
12
13
 
13
14
  def matches ext
@@ -43,6 +44,11 @@ module Jekyll
43
44
  (config("browserify", "exts") || [".js"]).map(&:downcase)
44
45
  end
45
46
 
47
+ def npm_install?
48
+ b = config("browserify", "npm_install")
49
+ (b == true) or (b.downcase == "true")
50
+ end
51
+
46
52
  def command
47
53
  config("browserify", "command") || "browserify -"
48
54
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-browserify
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Keiichiro Ui