jekyll-postcss 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.tool-versions +1 -1
- data/CHANGELOG.md +6 -1
- data/README.md +28 -4
- data/bin/release +3 -0
- data/bin/spec +3 -0
- data/lib/jekyll-postcss/socket.rb +14 -6
- data/lib/jekyll-postcss/version.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cba7273f4532e27ab92106857418dc0263b353e5bf82de0f6b01ab7a9f0672c3
|
4
|
+
data.tar.gz: d4f38cf3b58e9d5a5f84425b19795a99c586eb5a7a65e3f17c24edad9bda81af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c33fa3a5cbaa238644fe013dbe4f8c0dc7773c4c77993b193c08f130b00b2fd2917997ab83416e88eb169b9464a621ef1011567c60b7b33a8913f63723d20bc
|
7
|
+
data.tar.gz: 30238af1504ce3ec730a22bd9dd02a0e01ef2550467d4b4d78a21e10663b9b9f61cc1cc1f528819586cad62a11d999cbae244a08d71115aca1c70808584f50b6
|
data/.tool-versions
CHANGED
@@ -1 +1 @@
|
|
1
|
-
ruby 2.
|
1
|
+
ruby 2.7.2
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.4.1
|
4
|
+
|
5
|
+
- Fix a weird issue where the jekyll server never booted up because the converter class got in an infinite loop trying to make a socket connection to the postcss server.
|
6
|
+
|
3
7
|
## 0.4.0
|
4
8
|
|
5
9
|
### Process SCSS/Sass files
|
@@ -24,7 +28,8 @@ jekyll-postcss has a higher priority, so it will hand off the the postcss output
|
|
24
28
|
|
25
29
|
## 0.3.1
|
26
30
|
|
27
|
-
- Only run development server in development
|
31
|
+
- Only run development server in development.
|
32
|
+
- This was discovered when attempting to deploy to Netlify. You can read more about it here [#8](https://github.com/mhanberg/jekyll-postcss/issues/8), [#15](https://github.com/mhanberg/jekyll-postcss/issues/15), and [here](https://community.netlify.com/t/deploy-is-hanging-postcss-problem/14822).
|
28
33
|
|
29
34
|
## 0.3.0
|
30
35
|
|
data/README.md
CHANGED
@@ -13,6 +13,7 @@ Add this line to your application's Gemfile:
|
|
13
13
|
```ruby
|
14
14
|
gem 'jekyll-postcss'
|
15
15
|
```
|
16
|
+
|
16
17
|
And then add this line to your application's `_config.yml`:
|
17
18
|
|
18
19
|
```yml
|
@@ -33,7 +34,7 @@ Add your PostCSS plugins to a `postcss.config.js` file in the root of your repos
|
|
33
34
|
|
34
35
|
module.exports = {
|
35
36
|
plugins: [
|
36
|
-
require("autoprefixer") // example of plugin you might use
|
37
|
+
require("autoprefixer"), // example of plugin you might use
|
37
38
|
...(process.env.JEKYLL_ENV == "production" // example of only using a plugin in production
|
38
39
|
? [require("cssnano")({ preset: "default" })]
|
39
40
|
: [])
|
@@ -56,11 +57,34 @@ module.exports = {
|
|
56
57
|
};
|
57
58
|
```
|
58
59
|
|
59
|
-
###
|
60
|
+
### Deployment
|
61
|
+
|
62
|
+
When deploying, make sure to set your `JEKYLL_ENV` to something like `production` or `staging`. This is necessary to make sure that jekyll-postcss will not use internal development conveniences when building on your host's servers.
|
63
|
+
|
64
|
+
This can be done so by setting your build command like so
|
65
|
+
|
66
|
+
```shell
|
67
|
+
JEKYLL_ENV=production bundle exec jekyll build
|
68
|
+
```
|
69
|
+
|
70
|
+
or using your hosts proprietary configuration. Here is an example using Netlify.
|
71
|
+
|
72
|
+
```toml
|
73
|
+
# netlify.toml
|
74
|
+
|
75
|
+
[context.production.environment]
|
76
|
+
JEKYLL_ENV = "production"
|
77
|
+
|
78
|
+
[context.branch-deploy.environment]
|
79
|
+
JEKYLL_ENV = "staging"
|
80
|
+
|
81
|
+
[context.deploy-preview.environment]
|
82
|
+
JEKYLL_ENV = "staging"
|
83
|
+
```
|
60
84
|
|
61
|
-
|
85
|
+
### Front Matter Reminder
|
62
86
|
|
63
|
-
|
87
|
+
Your stylesheets still need to have [front matter](https://jekyllrb.com/docs/step-by-step/03-front-matter/) for them to be processed by Jekyll.
|
64
88
|
|
65
89
|
```
|
66
90
|
---
|
data/bin/release
ADDED
data/bin/spec
ADDED
@@ -49,19 +49,27 @@ module PostCss
|
|
49
49
|
@env == "development"
|
50
50
|
end
|
51
51
|
|
52
|
+
MAX_ATTEMPTS = 100
|
53
|
+
|
52
54
|
def start_dev_server
|
53
55
|
Thread.new do
|
54
56
|
system "#{START_SCRIPT} #{POSTCSS_SCRIPT} --development"
|
55
57
|
end
|
56
58
|
|
57
|
-
|
58
|
-
|
59
|
+
attempts = 0
|
60
|
+
@postcss =
|
59
61
|
begin
|
60
|
-
|
61
|
-
rescue StandardError
|
62
|
-
|
62
|
+
TCPSocket.open("localhost", 8124)
|
63
|
+
rescue StandardError => e
|
64
|
+
attempts = attempts + 1
|
65
|
+
|
66
|
+
if attempts < MAX_ATTEMPTS
|
67
|
+
sleep 0.1
|
68
|
+
retry
|
69
|
+
else
|
70
|
+
raise "Could not connect to the PostCSS server"
|
71
|
+
end
|
63
72
|
end
|
64
|
-
end
|
65
73
|
end
|
66
74
|
end
|
67
75
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-postcss
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mitchell Hanberg
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-05-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -102,7 +102,9 @@ files:
|
|
102
102
|
- bin/command
|
103
103
|
- bin/console
|
104
104
|
- bin/postcss
|
105
|
+
- bin/release
|
105
106
|
- bin/setup
|
107
|
+
- bin/spec
|
106
108
|
- jekyll-postcss.gemspec
|
107
109
|
- lib/jekyll-postcss.rb
|
108
110
|
- lib/jekyll-postcss/socket.rb
|
@@ -131,8 +133,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
131
133
|
- !ruby/object:Gem::Version
|
132
134
|
version: '0'
|
133
135
|
requirements: []
|
134
|
-
|
135
|
-
rubygems_version: 2.7.6
|
136
|
+
rubygems_version: 3.1.4
|
136
137
|
signing_key:
|
137
138
|
specification_version: 4
|
138
139
|
summary: A PostCSS plugin for Jekyll.
|