jspp 1.1.0 → 1.2.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.
- data/README.md +8 -7
- data/bin/jspp +4 -5
- data/example/css/{style-child.css → child.css} +0 -0
- data/example/css/style.css +1 -1
- data/spec/helper.rb +2 -2
- metadata +17 -6
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
JavaScript preprocessor
|
1
|
+
[JavaScript preprocessor](http://js-preprocessor.com)
|
2
2
|
===============
|
3
3
|
Minimal preprocessing with `/*>*/`
|
4
4
|
|
@@ -16,10 +16,10 @@ Example
|
|
16
16
|
var style = "/*> css/style.css */";</pre></td>
|
17
17
|
<td>css/style.css
|
18
18
|
<pre>html, body {margin:0; padding:0}
|
19
|
-
/*> http://
|
19
|
+
/*> http://js-preprocessor.com/example/css/child.css */
|
20
20
|
.my-style {background: #fffacc}
|
21
21
|
</pre></td>
|
22
|
-
<td><br/>css/
|
22
|
+
<td><br/>css/child.css
|
23
23
|
<pre>.i-am-child {}
|
24
24
|
</pre></td>
|
25
25
|
</tr><tr>
|
@@ -35,7 +35,9 @@ var style = "/*> css/style.css */";</pre></td>
|
|
35
35
|
.my-style {background: #fffacc}"
|
36
36
|
|
37
37
|
JavaScript preprocessor in a wild:
|
38
|
-
[GitHub Live Preview](http://github.com/NV/github-live-preview)
|
38
|
+
[GitHub Live Preview](http://github.com/NV/github-live-preview),
|
39
|
+
[Faviconize Google](http://github.com/NV/faviconize-google.js),
|
40
|
+
[Nice Alert](http://github.com/NV/nice-alert.js).
|
39
41
|
|
40
42
|
Installation
|
41
43
|
----
|
@@ -48,6 +50,5 @@ Why reinvent the wheel?
|
|
48
50
|
[Sprockets](http://github.com/sstephenson/sprockets) can't include non-JS files.
|
49
51
|
JS preprocessor can.
|
50
52
|
|
51
|
-
[Juicer](http://github.com/cjohansen/juicer)
|
52
|
-
|
53
|
-
JS preprocessor can do it via `"/*> some_file */"`.
|
53
|
+
[Juicer](http://github.com/cjohansen/juicer) don't have any analogies to `"/*> some_file */"`.
|
54
|
+
I.e., it can't include files as multiline string.
|
data/bin/jspp
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
# var style = "/*> style.css */";
|
9
9
|
#
|
10
10
|
# style.css: html, body {margin:0; padding:0}
|
11
|
-
# /*> http://
|
11
|
+
# /*> http://js-preprocessor.com/example/css/child.css */
|
12
12
|
# .my-style {background: #fffacc}
|
13
13
|
#
|
14
14
|
# style-child.css: .i-am-child {}
|
@@ -17,8 +17,8 @@
|
|
17
17
|
#
|
18
18
|
# jspp example/main.js: var my_script;
|
19
19
|
#
|
20
|
-
# var style = "html, body {margin:0; padding:0}
|
21
|
-
# .i-am-child {}
|
20
|
+
# var style = "html, body {margin:0; padding:0}\
|
21
|
+
# .i-am-child {}\
|
22
22
|
# .my-style {background: #fffacc}"
|
23
23
|
|
24
24
|
require 'jspp'
|
@@ -29,6 +29,5 @@ if $stdin.tty? and ARGV.empty? or ARGV.delete'-h' or ARGV.delete'--help'
|
|
29
29
|
}.join
|
30
30
|
exit 1
|
31
31
|
else
|
32
|
-
|
33
|
-
print JSPP(ARGF.read, dir)
|
32
|
+
print JSPP ARGV.first
|
34
33
|
end
|
File without changes
|
data/example/css/style.css
CHANGED
data/spec/helper.rb
CHANGED
@@ -7,5 +7,5 @@ PETS = "Cat, dog, turtle, hamster, parrot\n"
|
|
7
7
|
PETS_URL = 'http://elv1s.ru/x/pets.txt'
|
8
8
|
FakeWeb.register_uri :get, PETS_URL, :body => PETS
|
9
9
|
EXAMPLE = DIR + '/../example'
|
10
|
-
CHILD_CSS = File.read(EXAMPLE + '/css/
|
11
|
-
FakeWeb.register_uri :get, 'http://
|
10
|
+
CHILD_CSS = File.read(EXAMPLE + '/css/child.css')
|
11
|
+
FakeWeb.register_uri :get, 'http://js-preprocessor.com/example/css/child.css', :body => CHILD_CSS
|
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jspp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
+
hash: 31
|
4
5
|
prerelease: false
|
5
6
|
segments:
|
6
7
|
- 1
|
7
|
-
-
|
8
|
+
- 2
|
8
9
|
- 0
|
9
|
-
version: 1.
|
10
|
+
version: 1.2.0
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- Nikita Vasilyev
|
@@ -14,7 +15,7 @@ autorequire:
|
|
14
15
|
bindir: bin
|
15
16
|
cert_chain: []
|
16
17
|
|
17
|
-
date:
|
18
|
+
date: 2012-01-29 00:00:00 +03:00
|
18
19
|
default_executable:
|
19
20
|
dependencies: []
|
20
21
|
|
@@ -30,6 +31,12 @@ files:
|
|
30
31
|
- lib/jspp.rb
|
31
32
|
- bin/jspp
|
32
33
|
- README.md
|
34
|
+
- spec/helper.rb
|
35
|
+
- spec/jspp_spec.rb
|
36
|
+
- example/css/child.css
|
37
|
+
- example/css/style.css
|
38
|
+
- example/main.js
|
39
|
+
- example/script.js
|
33
40
|
has_rdoc: true
|
34
41
|
homepage: http://github.com/NV/js-preprocessor
|
35
42
|
licenses: []
|
@@ -40,30 +47,34 @@ rdoc_options: []
|
|
40
47
|
require_paths:
|
41
48
|
- lib
|
42
49
|
required_ruby_version: !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
43
51
|
requirements:
|
44
52
|
- - ">="
|
45
53
|
- !ruby/object:Gem::Version
|
54
|
+
hash: 3
|
46
55
|
segments:
|
47
56
|
- 0
|
48
57
|
version: "0"
|
49
58
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
59
|
+
none: false
|
50
60
|
requirements:
|
51
61
|
- - ">="
|
52
62
|
- !ruby/object:Gem::Version
|
63
|
+
hash: 3
|
53
64
|
segments:
|
54
65
|
- 0
|
55
66
|
version: "0"
|
56
67
|
requirements: []
|
57
68
|
|
58
|
-
rubyforge_project:
|
59
|
-
rubygems_version: 1.3.
|
69
|
+
rubyforge_project: jspp
|
70
|
+
rubygems_version: 1.3.7
|
60
71
|
signing_key:
|
61
72
|
specification_version: 3
|
62
73
|
summary: JavaScript preprocessor
|
63
74
|
test_files:
|
64
75
|
- spec/helper.rb
|
65
76
|
- spec/jspp_spec.rb
|
66
|
-
- example/css/
|
77
|
+
- example/css/child.css
|
67
78
|
- example/css/style.css
|
68
79
|
- example/main.js
|
69
80
|
- example/script.js
|