js-preflight 0.0.5 → 0.0.6

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.
data/README.md CHANGED
@@ -4,6 +4,10 @@ Run jslint and jsmin on all .js files sourced in html files provided as argument
4
4
  for details:
5
5
  preflight --help
6
6
 
7
+ Prerequisites
8
+ -------------
9
+ Spidermonkey - `brew install spidermonkey`
10
+
7
11
  Bugs
8
12
  ----
9
13
  Output isn't perfect yet; you'll need to move the packed .js file yourself for now
@@ -193,8 +193,11 @@ if ARGV.length > 0
193
193
  # css, stylesheets, images, img
194
194
  if options[:build_path]
195
195
  js_output.rewind
196
- STDERR.puts "Copying assets.js"
197
- File.open(File.join(options[:build_path], "js", "assets.js"), "w") do |assets|
196
+ STDERR.puts "Saving assets.js"
197
+ js_path = File.join(options[:build_path], "js")
198
+ css_path = File.join(options[:build_path], "css")
199
+ FileUtils.mkdir_p(js_path)
200
+ File.open(File.join(js_path, "assets.js"), "w") do |assets|
198
201
  assets.write js_output.read
199
202
  end
200
203
  asset_paths = %w{css stylesheets images img}
@@ -25,7 +25,11 @@ module Js
25
25
  private
26
26
 
27
27
  def lint
28
- `js -f #{executable_path}/jslint < #{filename}`
28
+ unless `which js`.empty?
29
+ `js -f #{executable_path}/jslint < #{filename}`
30
+ else
31
+ "No js interpreter found; consider installing Spidermonkey"
32
+ end
29
33
  end
30
34
  end
31
35
  end
@@ -1,5 +1,5 @@
1
1
  module Js
2
2
  module Preflight
3
- VERSION = "0.0.5"
3
+ VERSION = "0.0.6"
4
4
  end
5
5
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 5
9
- version: 0.0.5
8
+ - 6
9
+ version: 0.0.6
10
10
  platform: ruby
11
11
  authors:
12
12
  - Scott Burton
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-04-27 00:00:00 -07:00
19
+ date: 2011-05-03 00:00:00 -07:00
20
20
  default_executable:
21
21
  dependencies: []
22
22