pieces 0.3.9 → 0.3.10

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: a6ee4dda30033a5731985268919bbd5287513269
4
- data.tar.gz: baa91e4fc63e49afc2cf83ce0999742fc2382372
3
+ metadata.gz: 4292f979a8bb04f3a50415271701f89ef3e8067a
4
+ data.tar.gz: 3f88e5432528635c2accb49f57da66a788351357
5
5
  SHA512:
6
- metadata.gz: 9a8af9f673d72d5582d42ebd203830b36e1eae705af39675c9997fb56fb32beb959f5c6b90c7c8badb157ac06046154a17318fa156026a77558ee3abe8bf6fec
7
- data.tar.gz: 17c49ca65c2ce7f228a99ac3d5b7543cf179138d7e56a9166c3d1cc90ed8caebe4815230ae3ada7fdb766b939132288ba34a4a7c0282a55736d9f7704b369f7c
6
+ metadata.gz: 26cbe9e224e22663339d17022aefc65542f93b7ff913afc2e894072e0862ec85b769c29d6f9598f2cd6a0ab0b6610d6c70995377eb06cdbfb43fe1ea1f9aa305
7
+ data.tar.gz: 29001e9c547fffa426620396819ff92c7b18d02c24a44e4c15e0bc0afc1763cd8236ae72fc53de685fe40f473d8d5152b68b8e310573d085733c59f2f9178375
data/README.md CHANGED
@@ -5,19 +5,19 @@
5
5
  [![Code Climate](https://codeclimate.com/github/drpheltright/pieces/badges/gpa.svg)](https://codeclimate.com/github/drpheltright/pieces)
6
6
  [![Test Coverage](https://codeclimate.com/github/drpheltright/pieces/badges/coverage.svg)](https://codeclimate.com/github/drpheltright/pieces/coverage)
7
7
 
8
- This gem will take your HTML and CSS components and compile them into a static
9
- site.
8
+ Pieces is a gem that will take your HTML and CSS components and compile them
9
+ into a static site or styleguide.
10
10
 
11
11
  - <h5>Build static sites and blogs</h5>
12
12
  - <h5>Produce styleguides for your rails applications</h5>
13
13
  - <h5>Mock up designs</h5>
14
14
 
15
- With pieces, you define the view of your application with components. Even
15
+ With Pieces, you define the view of your application with components. Even
16
16
  your layout is just another component.
17
17
 
18
18
  ### Installation
19
19
 
20
- If installing pieces into a rails app, add it to your Gemfile:
20
+ If installing Pieces into a rails app, add it to your Gemfile:
21
21
 
22
22
  ``` ruby
23
23
  gem 'pieces'
@@ -31,8 +31,9 @@ gem install pieces
31
31
 
32
32
  ### Quick example
33
33
 
34
- Let's start by defining some "pieces", or views as they are better known in
35
- the rails world.
34
+ Let's start by defining some "pieces", or components, or views as they are
35
+ better known in the rails world. You'll notice Pieces looks for files in the
36
+ same places rails does.
36
37
 
37
38
  **`app/views/article/article.html.erb`:**
38
39
 
@@ -58,7 +59,7 @@ For example, `.article` should be defined like so.
58
59
  }
59
60
  ```
60
61
 
61
- You can use `.css`, `.scss`, `.sass` and `.less` with pieces.
62
+ You can use `.css`, `.scss`, `.sass` and `.less` with Pieces.
62
63
 
63
64
  **`app/views/layouts/application.html.erb`:**
64
65
 
@@ -74,7 +75,7 @@ You can use `.css`, `.scss`, `.sass` and `.less` with pieces.
74
75
  ```
75
76
 
76
77
  We pull the pieces together with a configuration file. Here you can define
77
- nested pieces and data to be used to generate a static site.
78
+ nested components and data to be used to generate a static site.
78
79
 
79
80
  **`config/pieces.yml`:**
80
81
 
@@ -100,20 +101,20 @@ you change your `config/routes.yml` or views they will be reflected on the site.
100
101
 
101
102
  ## Use as styleguide for rails
102
103
 
103
- Firstly, ensure you have added pieces to your `Gemfile`:
104
+ Firstly, ensure you have added Pieces to your `Gemfile`:
104
105
 
105
106
  ``` ruby
106
107
  gem 'pieces'
107
108
  ```
108
109
 
109
- Next you need to initialize your application to use pieces:
110
+ Next you need to initialize your application to use Pieces:
110
111
 
111
112
  ```
112
113
  bundle
113
114
  bundle exec pieces init
114
115
  ```
115
116
 
116
- Now mount pieces in your `config/routes.rb`:
117
+ Now mount Pieces in your `config/routes.rb`:
117
118
 
118
119
  ``` ruby
119
120
  Rails.application.routes.draw do
@@ -141,7 +142,7 @@ And then visit [http://localhost:8080](http://localhost:8080)
141
142
 
142
143
  ## Create new static site
143
144
 
144
- To create a new static site with pieces:
145
+ To create a new static site with Pieces:
145
146
 
146
147
  ```
147
148
  gem install pieces
@@ -151,7 +152,8 @@ pieces init hello_world
151
152
  This will install `config/pieces.yml`, a layout and example header and footer
152
153
  into `hello_world/` for you.
153
154
 
154
- Once you've built the pieces and routes for your site all you have to do is run:
155
+ Once you've built the components and routes for your site all you have to do is
156
+ run:
155
157
 
156
158
  ```
157
159
  pieces build
@@ -173,7 +175,7 @@ Now visit [http://localhost:8080](http://localhost:8080) in your browser.
173
175
 
174
176
  ## Configuration
175
177
 
176
- Using configuration found in `config/pieces.yml` pieces will compile your
178
+ Using configuration found in `config/pieces.yml` Pieces' will compile your
177
179
  modular components ala BEM (or whatever you prefer) into a static HTML site.
178
180
 
179
181
  At the top level of your `pieces.yml` you define your output files, or "routes".
@@ -207,7 +209,7 @@ portfolio/another-client:
207
209
  - case_study: {}
208
210
  ```
209
211
 
210
- Likewise you can structure your pieces in directories:
212
+ Likewise you can structure your components in directories:
211
213
 
212
214
  ``` yml
213
215
  about:
@@ -251,7 +253,7 @@ The child pieces will be rendered in order and passed into the parent
251
253
 
252
254
  - [Original example][original] using .erb and .mustache (liek wtf!)
253
255
  - [Boilerplate example][boilerplate] used by `pieces init`
254
- - [Rails example][rails] using pieces as a styleguide
256
+ - [Rails example][rails] using Pieces as a styleguide
255
257
 
256
258
  [original]: https://github.com/drpheltright/pieces/tree/master/examples/original
257
259
  [boilerplate]: https://github.com/drpheltright/pieces/tree/master/examples/boilerplate
@@ -17,7 +17,7 @@ module Pieces
17
17
 
18
18
  def yield_stylesheets(dir)
19
19
  Dir["#{path}/#{dir}/**/*.{css,scss,sass,less}"].reduce('') do |contents, stylesheet|
20
- contents << ::Tilt.new(stylesheet).render
20
+ contents << ::Tilt.new(stylesheet, load_paths: ["#{path}/app/assets/stylesheets/"]).render
21
21
  end
22
22
  end
23
23
  end
data/lib/pieces/server.rb CHANGED
@@ -21,11 +21,7 @@ module Pieces
21
21
 
22
22
  Rack::Builder.app do
23
23
  use Rack::Reloader
24
-
25
- use Rack::Static, urls: files,
26
- root: build_path,
27
- index: 'index.html'
28
-
24
+ use Rack::Static, urls: files, root: build_path, index: 'index.html'
29
25
  run Proc.new { |env| [404, {}, ['Not found']] }
30
26
  end
31
27
  end
@@ -1,3 +1,3 @@
1
1
  module Pieces
2
- VERSION = '0.3.9'
2
+ VERSION = '0.3.10'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pieces
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.9
4
+ version: 0.3.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luke Morton
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-09 00:00:00.000000000 Z
11
+ date: 2015-08-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tilt