Skip to content

Commit ee23eb4

Browse files
committed
Merge pull request shakacode#259 from shakacode/turbolinks-from-npm
Add turbolinks 5 from npm
2 parents e48b508 + 2854b29 commit ee23eb4

File tree

6 files changed

+15
-11
lines changed

6 files changed

+15
-11
lines changed

Gemfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ gem "coffee-rails"
2525

2626
# Turbolinks makes following links in your web application faster.
2727
# Read more: https://github.com/turbolinks/turbolinks
28-
gem 'turbolinks', '>= 5.0.0.beta2'
28+
# Get turbolinks from npm!
29+
# gem 'turbolinks', '>= 5.0.0.beta2'
2930

3031
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
3132
gem "jbuilder"

Gemfile.lock

-4
Original file line numberDiff line numberDiff line change
@@ -296,9 +296,6 @@ GEM
296296
thread_safe (0.3.5)
297297
tilt (2.0.2)
298298
tins (1.6.0)
299-
turbolinks (5.0.0.beta2)
300-
turbolinks-source
301-
turbolinks-source (5.0.0.beta2)
302299
tzinfo (1.2.2)
303300
thread_safe (~> 0.1)
304301
uglifier (2.7.2)
@@ -363,7 +360,6 @@ DEPENDENCIES
363360
spring-commands-rspec
364361
sqlite3
365362
therubyracer
366-
turbolinks (>= 5.0.0.beta2)
367363
uglifier
368364
web-console
369365

Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
// All webpack assets in development will be loaded via webpack dev server
2-
// It's important to include them in layout view above this asset
3-
// b/c it exposes jQuery for turbolinks and another non-webpack JS (if any)
42

5-
//= require turbolinks
3+
// turbolinks comes from npm and is listed in webpack.client.base.config.js
64

75
//= require rails_startup

client/npm-shrinkwrap.json

+7-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,15 @@
7373
"react-on-rails": "^4.0.0",
7474
"react-redux": "^4.4.0",
7575
"react-router": "^2.0.0",
76-
"redux": "^3.3.1",
7776
"react-router-redux": "^4.0.0",
77+
"redux": "^3.3.1",
7878
"redux-promise": "^0.5.1",
7979
"redux-thunk": "^1.0.3",
8080
"resolve-url-loader": "^1.4.3",
8181
"sass-loader": "^3.1.2",
8282
"sass-resources-loader": "1.0.2",
8383
"style-loader": "^0.13.0",
84+
"turbolinks": "0.0.2",
8485
"url-loader": "^0.5.7",
8586
"webpack": "^1.12.14"
8687
},
@@ -92,6 +93,7 @@
9293
"eslint": "^2.3.0",
9394
"eslint-config-shakacode": "^3.0.0",
9495
"eslint-plugin-react": "^4.2.0",
96+
"estraverse-fb": "^1.3.1",
9597
"express": "^4.13.4",
9698
"jade": "^1.11.0",
9799
"jscs": "^2.11.0",

client/webpack.client.base.config.js

+2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ module.exports = {
1919
'es5-shim/es5-shim',
2020
'es5-shim/es5-sham',
2121
'jquery',
22+
'turbolinks',
2223
],
2324

2425
// This will contain the app entry points defined by webpack.hot.config and webpack.rails.config
@@ -65,6 +66,7 @@ module.exports = {
6566

6667
{ test: require.resolve('jquery'), loader: 'expose?jQuery' },
6768
{ test: require.resolve('jquery'), loader: 'expose?$' },
69+
{ test: require.resolve('turbolinks'), loader: 'imports?this=>window' },
6870

6971
// Use one of these to serve jQuery for Bootstrap scripts:
7072

0 commit comments

Comments
 (0)