stylio 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0d805b18c5b21f6a6ea8a44f875e57ac6618a914
4
- data.tar.gz: 7cdf42da621a213e63cb6b3b63c4f65a77b21b73
3
+ metadata.gz: 64704ec7b217f7f598e51752e3c1869fb8a233af
4
+ data.tar.gz: aa58e88dc77c0b05aad0edf2bddb72bef70ecfaf
5
5
  SHA512:
6
- metadata.gz: 8b0a7ddeedb38269effe59375123ab5aab472c23e4347f467629fea08d136a2a52d8c07c11b16d9371be49c0e6e41c418955d0fd7ddbefa112aa7a4fa6353067
7
- data.tar.gz: a3543ed4ef9d6d543c3bf1961b385a718c393ec44adc440dab0292a26df5a5e21ab078d0599a844fbe2b2872c582906bc6c515095d6dbac571a194eb60784716
6
+ metadata.gz: 75bb227ad980a6bb45e80a70df01bc07a6f8de3b897b6b9aefb4289efe4371db788990df1f19c053fb47e04ee5681c648509856a24a31720634b2f4796b3dd5c
7
+ data.tar.gz: bf2391b52be1de38d42450b188e917fcd0714e39d21423abd50f8ee6f1a4c3f83a9f004cbe1e08df4ec7dc9ce3c9a95c89a802e8bf3052a0c7d25a1c018b848c
data/.gitignore CHANGED
@@ -7,3 +7,4 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
+ *.gem
data/README.md CHANGED
@@ -26,11 +26,11 @@ Add framework folders
26
26
 
27
27
  ## Usage
28
28
 
29
- Run `stylio` in your project folder to start the server.
29
+ Run `bundle exec stylio` in your project folder to start the server.
30
30
 
31
31
  See (stylio-example)[http://github.com/substrakt/stylio-example] to see an example setup.
32
32
 
33
- Stylesheets are added to the `assets/stylesheets` folder which you will need to create.
33
+ Stylesheets are added to the `assets/stylesheets` folder which you will need to create. The structure inside of this folder is completely up to the designers' own standards.
34
34
 
35
35
  ## Adding components
36
36
 
data/lib/stylio/app.rb CHANGED
@@ -45,7 +45,8 @@ module Stylio
45
45
  end
46
46
 
47
47
  get '/layouts' do
48
- directories = Dir.entries(settings.layouts).select {|f| !File.directory? f}
48
+ layouts = File.join(settings.app_path, 'layouts')
49
+ directories = Dir.entries(layouts).select {|f| !File.directory? f}
49
50
  erb :layouts,
50
51
  locals: {
51
52
  layouts: directories
@@ -53,13 +54,14 @@ module Stylio
53
54
  end
54
55
 
55
56
  get '/layouts/:id' do
57
+
56
58
  name = params[:id]
57
- path = File.join(settings.layouts, name)
58
- original_file_name = File.join(path, "#{ name }.scss")
59
+ path = File.join(settings.app_path, 'layouts', name)
59
60
 
60
61
  erb :layout,
61
62
  locals: {
62
63
  name: name,
64
+ path: path
63
65
  }, layout: :styleguide
64
66
  end
65
67
 
data/lib/stylio/assets.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  require 'sinatra'
2
+ require 'sass'
2
3
 
3
4
  module Sinatra
4
5
  module Assets
@@ -20,10 +21,9 @@ module Sinatra
20
21
 
21
22
  def self.registered(app)
22
23
  app.helpers Assets::Helpers
23
-
24
24
  app.get "/assets/application.css" do
25
25
  content_type("text/css")
26
- Sass::Engine.for_file(File.join(options.assets, "stylesheets", "application.scss"), {
26
+ Sass::Engine.for_file(File.join(settings.app_path, "assets", "stylesheets", "application.scss"), {
27
27
  cache: false,
28
28
  syntax: :scss,
29
29
  style: :compressed
@@ -1,3 +1,3 @@
1
1
  module Stylio
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -1 +1 @@
1
- <%= erb :"../layouts/#{name}/#{name}.html", locals: { yield_placeholder: 'Yielded content' } %>
1
+ <%= erb :"#{path}/#{name}.html", locals: { yield_placeholder: 'Yielded content' } %>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stylio
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Substrakt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-14 00:00:00.000000000 Z
11
+ date: 2016-06-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sinatra