cyborg 0.0.8 → 0.0.9
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 302f49cf71fff393e1136f674d695ea619973c22
|
4
|
+
data.tar.gz: 2c17bc91cc6437c4aab49c5b9c1899d157dd9427
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f32042ee1e43a00c116a1e8a7448c8004cf075b775f02ad11bd34fa872ae0e2ed33122cbcfabeb9d5fd870b0a9f60c31c6255930925c5cfb5205006fcb7f0316
|
7
|
+
data.tar.gz: f6b32fcc8a5840a700f012757d6a86e5437d173d01da295bf9b939ac5b263769ca366b572f4121f49b74cbf57d966e90c8e1af2c1578a6ee6cca3d6736e57a52
|
data/lib/cyborg/command/npm.rb
CHANGED
@@ -10,7 +10,7 @@ module Cyborg
|
|
10
10
|
@module_name = name.split('_').collect(&:capitalize).join
|
11
11
|
|
12
12
|
puts "Creating new plugin #{name}".bold
|
13
|
-
|
13
|
+
engine_site_scaffold
|
14
14
|
|
15
15
|
@gemspec_path = create_gem
|
16
16
|
@path = File.expand_path(File.dirname(@gemspec_path))
|
@@ -149,7 +149,7 @@ _svg.js
|
|
149
149
|
action_log "update", "#{name}/.gitignore"
|
150
150
|
end
|
151
151
|
|
152
|
-
def
|
152
|
+
def engine_site_scaffold
|
153
153
|
FileUtils.mkdir_p(".#{name}-tmp")
|
154
154
|
Dir.chdir ".#{name}-tmp" do
|
155
155
|
response = Open3.capture3("rails plugin new #{name} --mountable --dummy-path=site --skip-test-unit")
|
@@ -207,11 +207,15 @@ require "rails"
|
|
207
207
|
# Pick the frameworks you want:
|
208
208
|
require "action_controller/railtie"
|
209
209
|
require "action_view/railtie"
|
210
|
+
require 'bundler'
|
210
211
|
|
211
212
|
# Require the gems listed in Gemfile, including any gems
|
212
213
|
# you've limited to :test, :development, or :production.
|
213
214
|
Bundler.require(*Rails.groups)
|
214
215
|
|
216
|
+
require '#{name}'
|
217
|
+
require 'sprockets/railtie'
|
218
|
+
|
215
219
|
module Site
|
216
220
|
class Application < Cyborg::Application
|
217
221
|
end
|
@@ -10,14 +10,14 @@ module Cyborg
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def build
|
13
|
-
if
|
13
|
+
if Open3.capture3("npm ls browserify-incremental")[1].empty?
|
14
14
|
find_files.each do |file|
|
15
15
|
dest = destination(file).sub(/\.js$/,'')
|
16
|
-
|
16
|
+
system "browserifyinc --cachefile #{Cyborg.rails_path("tmp/cache/assets/.browserify-cache.json")} #{file} -t babelify --standalone #{plugin.module_name} -o #{dest}.js -d -p [ minifyify --map #{url(file).sub(/\.js$/,'')}.map.json --output #{dest}.map.json ]"
|
17
17
|
puts build_msg(file)
|
18
18
|
end
|
19
19
|
else
|
20
|
-
abort "JS BUILD FAILED:
|
20
|
+
abort "JS BUILD FAILED: browserifyinc NPM module not found.\n" << "Please add browserifyinc to your package.json and run `npm install`"
|
21
21
|
end
|
22
22
|
end
|
23
23
|
end
|
data/lib/cyborg/version.rb
CHANGED