breakfast 0.4.2 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +12 -5
- data/CHANGELOG.md +22 -0
- data/README.md +16 -38
- data/lib/breakfast/capistrano/tasks/breakfast.rake +3 -3
- data/lib/breakfast/version.rb +1 -1
- data/lib/generators/breakfast/install_generator.rb +14 -10
- data/lib/generators/breakfast/templates/app.js +3 -3
- data/lib/generators/breakfast/templates/brunch-config.js +3 -0
- data/lib/generators/breakfast/templates/package.json +4 -5
- data/node_package/package.json +1 -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: 06729a9f4ec425004a396267be979def63479548
|
4
|
+
data.tar.gz: 255069e7bee6574707efbe4926d1bc4b3d306bcd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 47159bde9216149cca74dfbd03daf4c40b22cc1525e702338e4fc8b0929d17ef3e63ccc0d83b708b32334da55e584be758134b1ecd321ec3d850893e2b4a075a
|
7
|
+
data.tar.gz: eb7db55eff1331db08f50f69338f278b0aa35cc67ca7a02b96799cc7da7eccc84dbf266adf4ece8c34674ce38c803a8a2fee7820c2be0a5b674557d2a67b9e0e
|
data/.travis.yml
CHANGED
@@ -1,11 +1,18 @@
|
|
1
|
-
sudo:
|
1
|
+
sudo: required
|
2
2
|
language: ruby
|
3
3
|
rvm:
|
4
4
|
- 2.3.1
|
5
5
|
before_install:
|
6
6
|
- gem install bundler -v 1.12.5
|
7
|
-
-
|
8
|
-
-
|
7
|
+
- nvm install 7.4.0
|
8
|
+
- nvm use 7.4.0
|
9
|
+
# Repo for Yarn
|
10
|
+
- sudo apt-key adv --keyserver pgp.mit.edu --recv D101F7899D41F3C3
|
11
|
+
- echo "deb http://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
|
12
|
+
- sudo apt-get update -qq
|
13
|
+
- sudo apt-get install -y -qq yarn
|
14
|
+
- yarn install
|
9
15
|
|
10
|
-
|
11
|
-
|
16
|
+
cache:
|
17
|
+
directories:
|
18
|
+
- $HOME/.yarn-cache
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,27 @@
|
|
1
1
|
# CHANGE LOG
|
2
2
|
|
3
|
+
### 0.5.0 - 2017-02-03
|
4
|
+
#### Added
|
5
|
+
- Adds support for [Yarn](https://yarnpkg.com/).
|
6
|
+
- New installs now require Yarn
|
7
|
+
- Capistrano options `:breakfast_yarn_path` && `:breakfast_yarn_install_command`
|
8
|
+
|
9
|
+
#### Removed
|
10
|
+
- NPM client requirement
|
11
|
+
- Capistrano options `:breakfast_npm_path` && `:breakfast_npm_install_command`
|
12
|
+
have been removed.
|
13
|
+
|
14
|
+
### Upgrading
|
15
|
+
#### Upgrading to `0.5.0` from `0.4.0`
|
16
|
+
- Update gem with `bundle update breakfast`
|
17
|
+
- Bump the `breakfast-rails` version in `package.json` to `0.5.0`
|
18
|
+
- Ensure [Yarn](https://yarnpkg.com/docs/install) is installed
|
19
|
+
- Run `yarn install`
|
20
|
+
|
21
|
+
*Note* If you are deploying with Capistrano then Yarn is expected to be
|
22
|
+
installed on
|
23
|
+
|
24
|
+
|
3
25
|
### 0.4.0 - 2016-11-14
|
4
26
|
#### Upgrading to `0.4.0` from `0.3.0`
|
5
27
|
- Update gem with `bundle update breakfast`
|
data/README.md
CHANGED
@@ -3,9 +3,9 @@
|
|
3
3
|
</p>
|
4
4
|
# Breakfast
|
5
5
|
[Breakfast](http://breakfast.devlocker.io/) integrates modern Javascript
|
6
|
-
tooling into your Rails project. Powered by [Brunch.io](http://brunch.io).
|
6
|
+
tooling into your Rails project. Powered by [Brunch.io](http://brunch.io).
|
7
7
|
|
8
|
-
Get support for ES6 syntax & modules, live reload for CSS, JS, & HTML, and
|
8
|
+
Get support for ES6 syntax & modules, live reload for CSS, JS, & HTML, and Yarn
|
9
9
|
support. Be up and running on the latest frontend framework in minutes.
|
10
10
|
|
11
11
|
|
@@ -15,48 +15,26 @@ See the official docs at
|
|
15
15
|
|
16
16
|
View updates in the [CHANGELOG](https://github.com/devlocker/breakfast/blob/master/CHANGELOG.md)
|
17
17
|
|
18
|
-
### Latest Release `0.
|
18
|
+
### Latest Release `0.5.0`
|
19
19
|
#### Added
|
20
|
-
-
|
21
|
-
|
22
|
-
-
|
23
|
-
test and true everywhere else. When true, enables Rails to serve fingerprinted
|
24
|
-
assets.
|
25
|
-
- Rake Commands to trigger certain behavior:
|
26
|
-
- `breakfast:assets:build`
|
27
|
-
Manually run a compilation step.
|
28
|
-
- `breakfast:assets:build_production`
|
29
|
-
Manually trigger a production build. This will cause assets to get minified.
|
30
|
-
- `breakfast:assets:digest`
|
31
|
-
Run through your compiled assets and add a fingerprint to each one. Creates
|
32
|
-
a copy, leaving a file with the original filename and a duplicate with an
|
33
|
-
md5 fingerprint.
|
34
|
-
- `breakfast:assets:clean`
|
35
|
-
Removes any assets from the output folder that are not specified in the
|
36
|
-
manifest file (removes out of date files).
|
37
|
-
- `breakfast:assets:nuke`
|
38
|
-
Removes manifest and fingerprinted assets from the output folder.
|
39
|
-
- New Capistrano Option: `:breakfast_npm_install_command`
|
40
|
-
Defaults to just `install`. Can be overridden to redirect output to dev/null.
|
41
|
-
Example:
|
42
|
-
|
43
|
-
```
|
44
|
-
set :breakfast_npm_install_command, "install > /dev/null 2>&1"
|
45
|
-
```
|
46
|
-
|
47
|
-
#### Changes
|
48
|
-
- Fixed small CSS issue if box-sizing is not set border-box globally.
|
20
|
+
- Adds support for [Yarn](https://yarnpkg.com/).
|
21
|
+
- New installs now require Yarn
|
22
|
+
- Capistrano options `:breakfast_yarn_path` && `:breakfast_yarn_install_command`
|
49
23
|
|
24
|
+
#### Removed
|
25
|
+
- NPM client requirement
|
26
|
+
- Capistrano options `:breakfast_npm_path` && `:breakfast_npm_install_command`
|
27
|
+
have been removed.
|
50
28
|
|
51
29
|
### Upgrading
|
52
|
-
#### Upgrading to `0.
|
30
|
+
#### Upgrading to `0.5.0` from `0.4.0`
|
53
31
|
- Update gem with `bundle update breakfast`
|
54
|
-
- Bump the `breakfast-rails` version in `package.json` to `0.
|
55
|
-
-
|
32
|
+
- Bump the `breakfast-rails` version in `package.json` to `0.5.0`
|
33
|
+
- Ensure [Yarn](https://yarnpkg.com/docs/install) is installed
|
34
|
+
- Run `yarn install`
|
56
35
|
|
57
|
-
*Note*
|
58
|
-
|
59
|
-
hard-coded links to assets will still work correctly.
|
36
|
+
*Note* If you are deploying with Capistrano then Yarn is expected to be
|
37
|
+
installed on
|
60
38
|
|
61
39
|
### Contributing
|
62
40
|
Bug reports and pull requests are welcome on GitHub at
|
@@ -4,7 +4,7 @@ namespace :breakfast do
|
|
4
4
|
on roles fetch(:breakfast_roles) do |host|
|
5
5
|
within release_path do
|
6
6
|
with rails_env: "#{fetch(:rails_env) || fetch(:stage)}" do
|
7
|
-
execute fetch(:
|
7
|
+
execute fetch(:breakfast_yarn_path).to_sym, fetch(:breakfast_yarn_install_command)
|
8
8
|
execute :rails, "breakfast:assets:build_production"
|
9
9
|
execute :rails, "breakfast:assets:digest"
|
10
10
|
end
|
@@ -31,7 +31,7 @@ end
|
|
31
31
|
namespace :load do
|
32
32
|
task :defaults do
|
33
33
|
set :breakfast_roles, -> { :web }
|
34
|
-
set :
|
35
|
-
set :
|
34
|
+
set :breakfast_yarn_path, "/usr/bin/yarn"
|
35
|
+
set :breakfast_yarn_install_command, "install"
|
36
36
|
end
|
37
37
|
end
|
data/lib/breakfast/version.rb
CHANGED
@@ -4,8 +4,7 @@ module Breakfast
|
|
4
4
|
module Generators
|
5
5
|
class InstallGenerator < Rails::Generators::Base
|
6
6
|
source_root File.expand_path("../templates", __FILE__)
|
7
|
-
NODE_VERSION = "
|
8
|
-
NPM_VERSION = "3.10.6"
|
7
|
+
NODE_VERSION = Gem::Version.new("4.1.0")
|
9
8
|
|
10
9
|
def install
|
11
10
|
if node_prerequisites_installed?
|
@@ -15,7 +14,7 @@ module Breakfast
|
|
15
14
|
create_app_js_file
|
16
15
|
create_app_scss_file
|
17
16
|
create_gitkeep_files
|
18
|
-
|
17
|
+
run_yarn_install
|
19
18
|
add_node_modules_to_gitignore
|
20
19
|
|
21
20
|
puts <<-SUCCESS.strip_heredoc
|
@@ -27,12 +26,12 @@ module Breakfast
|
|
27
26
|
else
|
28
27
|
puts <<-ERROR.strip_heredoc
|
29
28
|
|
30
|
-
---> ERROR - MISSING NODE &
|
29
|
+
---> ERROR - MISSING NODE & YARN
|
31
30
|
|
32
|
-
---> Node version >= #{NODE_VERSION} &
|
31
|
+
---> Node version >= #{NODE_VERSION} & yarn are required to run Breakfast.
|
33
32
|
---> Please install them before attempting to continue.
|
34
33
|
---> https://nodejs.org
|
35
|
-
---> https://
|
34
|
+
---> https://yarnpkg.com/docs/install/
|
36
35
|
|
37
36
|
ERROR
|
38
37
|
end
|
@@ -41,11 +40,15 @@ module Breakfast
|
|
41
40
|
private
|
42
41
|
|
43
42
|
def node_prerequisites_installed?
|
44
|
-
`which node`.present? && `which
|
43
|
+
`which node`.present? && `which yarn`.present? && node_versions_are_satisfactory?
|
45
44
|
end
|
46
45
|
|
47
46
|
def node_versions_are_satisfactory?
|
48
|
-
|
47
|
+
installed_node_version >= NODE_VERSION
|
48
|
+
end
|
49
|
+
|
50
|
+
def installed_node_version
|
51
|
+
Gem::Version.new(`node -v`.tr("v", ""))
|
49
52
|
end
|
50
53
|
|
51
54
|
def create_brunch_config
|
@@ -76,13 +79,14 @@ module Breakfast
|
|
76
79
|
create_file "app/frontend/vendor/.gitkeep"
|
77
80
|
end
|
78
81
|
|
79
|
-
def
|
80
|
-
run "
|
82
|
+
def run_yarn_install
|
83
|
+
run "yarn install"
|
81
84
|
end
|
82
85
|
|
83
86
|
def add_node_modules_to_gitignore
|
84
87
|
ignore = <<-IGNORE.strip_heredoc
|
85
88
|
# Added by Breakfast Gem
|
89
|
+
yarn-error.log
|
86
90
|
npm-debug.log
|
87
91
|
node_modules/*
|
88
92
|
public/assets/*
|
@@ -1,12 +1,12 @@
|
|
1
1
|
// Turbolinks - To disable remove the next two lines.
|
2
2
|
// https://github.com/turbolinks/turbolinks
|
3
|
-
|
3
|
+
import Turbolinks from "turbolinks";
|
4
4
|
Turbolinks.start();
|
5
5
|
|
6
6
|
// Require https://github.com/rails/jquery-ujs
|
7
|
-
|
7
|
+
import "jquery-ujs";
|
8
8
|
|
9
|
-
|
9
|
+
const App = {
|
10
10
|
init() {
|
11
11
|
}
|
12
12
|
}
|
@@ -2,18 +2,17 @@
|
|
2
2
|
"repository": {},
|
3
3
|
"dependencies": {
|
4
4
|
"actioncable": "^5.0.0",
|
5
|
-
"breakfast-rails": "0.
|
5
|
+
"breakfast-rails": "0.5.0",
|
6
6
|
"jquery": "^3.1.0",
|
7
7
|
"jquery-ujs": "^1.2.2",
|
8
8
|
"turbolinks": "^5.0.0"
|
9
9
|
},
|
10
10
|
"devDependencies": {
|
11
|
-
"brunch": "~2.
|
11
|
+
"brunch": "~2.10.5",
|
12
12
|
"babel-brunch": "~6.0.0",
|
13
13
|
"css-brunch": "^2.6.1",
|
14
14
|
"clean-css-brunch": "~1.8.0",
|
15
|
-
"
|
16
|
-
"
|
17
|
-
"uglify-js-brunch": "~1.7.0"
|
15
|
+
"sass-brunch": "~2.9.0",
|
16
|
+
"uglify-js-brunch": "~2.1.0"
|
18
17
|
}
|
19
18
|
}
|
data/node_package/package.json
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: breakfast
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Patrick Koperwas
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-02-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|