embork 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/blueprint/Borkfile +1 -1
- data/blueprint/bower.json +2 -2
- data/lib/embork/borkfile.rb +4 -2
- data/lib/embork/builder.rb +5 -0
- data/lib/embork/cli.rb +17 -4
- data/lib/embork/environment.rb +4 -1
- data/lib/embork/sprockets/helpers.rb +8 -0
- data/lib/embork/version.rb +1 -1
- data/spec/embork/builder_spec.rb +2 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e44a58a0dae56d77aeaff94d30068f369d63ae08
|
4
|
+
data.tar.gz: 49c046ca98b51260bf8ff3e72569b812d1f6317e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ac5caa15250e134f94764117895bd9310e572c87d982695bfca27a690ee692f286c5390efbcc06db9f9906ccf4e1072e017cb7fa78d0585e51d8119d86e458ba
|
7
|
+
data.tar.gz: eedf1b170c8a9576adb6add52213e4bb3420cae001b9241ae4194a6a92d8e3be07974ec9c205a15313c59900634e847c29897f569444521d99f09aa3abc356b9
|
data/blueprint/Borkfile
CHANGED
data/blueprint/bower.json
CHANGED
@@ -5,12 +5,12 @@
|
|
5
5
|
"jquery": "^1.11.1",
|
6
6
|
"qunit": "~1.12.0",
|
7
7
|
"ember-qunit": "~0.1.5",
|
8
|
-
"ember": "1.
|
8
|
+
"ember": "1.6.1",
|
9
9
|
"ember-data": "1.0.0-beta.7",
|
10
10
|
"ic-ajax": "~1.x",
|
11
11
|
"loader": "stefanpenner/loader.js#1.0.0",
|
12
12
|
"ember-cli-shims": "stefanpenner/ember-cli-shims#0.0.1",
|
13
13
|
"ember-load-initializers": "stefanpenner/ember-load-initializers#0.0.1",
|
14
|
-
"ember-resolver": "stefanpenner/ember-jj-abrams-resolver#0.1.
|
14
|
+
"ember-resolver": "stefanpenner/ember-jj-abrams-resolver#0.1.6"
|
15
15
|
}
|
16
16
|
}
|
data/lib/embork/borkfile.rb
CHANGED
@@ -37,7 +37,7 @@ class Embork::Borkfile
|
|
37
37
|
include Attributes
|
38
38
|
|
39
39
|
SUPPORTED_FRAMEWORKS = %w(bootstrap compass)
|
40
|
-
SUPPORTED_COMPRESSORS = %w(closure_compiler
|
40
|
+
SUPPORTED_COMPRESSORS = %w(closure_compiler uglify)
|
41
41
|
|
42
42
|
def initialize(environment, logger)
|
43
43
|
Embork.env = @environment = environment.to_sym
|
@@ -123,7 +123,9 @@ class Embork::Borkfile
|
|
123
123
|
end
|
124
124
|
|
125
125
|
def compress_with(compressor)
|
126
|
-
if SUPPORTED_COMPRESSORS.include?
|
126
|
+
if compressor.class == Symbol && SUPPORTED_COMPRESSORS.include?(compressor.to_s)
|
127
|
+
@compressor = compressor
|
128
|
+
elsif compressor.class != String
|
127
129
|
@compressor = compressor
|
128
130
|
else
|
129
131
|
@logger.critical 'Compressor "%s" is not currently supported by embork.' % compressor.to_s
|
data/lib/embork/builder.rb
CHANGED
data/lib/embork/cli.rb
CHANGED
@@ -82,13 +82,26 @@ class Embork::CLI < Thor
|
|
82
82
|
end
|
83
83
|
|
84
84
|
desc "hint", %{run jshint on the app and tests}
|
85
|
-
option :only_app, :type => :boolean, :default => false
|
86
|
-
option :only_tests, :type => :boolean, :default => false
|
87
85
|
def hint
|
88
86
|
borkfile = Embork::Borkfile.new options[:borkfile]
|
89
87
|
Dir.chdir borkfile.project_root do
|
90
|
-
system('
|
91
|
-
|
88
|
+
system('node node_modules/jshint/bin/jshint app tests')
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
desc "deps", "Install bower and node dependencies"
|
93
|
+
def deps
|
94
|
+
if !system('which node 2>&1 > /dev/null')
|
95
|
+
puts "Please install node and npm before continuing."
|
96
|
+
exit 1
|
97
|
+
elsif !system('which npm 2>&1 > /dev/null')
|
98
|
+
puts "Please install npm before continuing."
|
99
|
+
exit 1
|
100
|
+
end
|
101
|
+
borkfile = Embork::Borkfile.new options[:borkfile]
|
102
|
+
Dir.chdir borkfile.project_root do
|
103
|
+
system('npm install')
|
104
|
+
system('node node_modules/bower/bin/bower install')
|
92
105
|
end
|
93
106
|
end
|
94
107
|
|
data/lib/embork/environment.rb
CHANGED
@@ -100,8 +100,11 @@ class Embork::Environment
|
|
100
100
|
if @borkfile.compressor == :closure_compiler
|
101
101
|
@sprockets_environment.register_bundle_processor 'application/javascript',
|
102
102
|
Embork::Sprockets::ClosureCompiler
|
103
|
-
elsif @borkfile.compressor == :
|
103
|
+
elsif @borkfile.compressor == :uglify
|
104
104
|
@sprockets_environment.js_compressor = :uglify
|
105
|
+
elsif @borkfile.compressor
|
106
|
+
@sprockets_environment.register_bundle_processor 'application/javascript',
|
107
|
+
@borkfile.compressor
|
105
108
|
end
|
106
109
|
end
|
107
110
|
end
|
@@ -28,6 +28,14 @@ module Embork::Sprockets::Helpers
|
|
28
28
|
def stylesheet_embed_tag
|
29
29
|
end
|
30
30
|
|
31
|
+
def build_version
|
32
|
+
if self.class.use_bundled_assets
|
33
|
+
self.class.bundled_version
|
34
|
+
else
|
35
|
+
nil
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
31
39
|
def namespace
|
32
40
|
Embork::Sprockets::ES6ModuleTranspiler.namespace
|
33
41
|
end
|
data/lib/embork/version.rb
CHANGED
data/spec/embork/builder_spec.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: embork
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mina Smart
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-08-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sprockets
|