opal-webpack-loader 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/opal-webpack-loader/installer_cli.rb +5 -1
- data/lib/opal-webpack-loader/templates/Procfile.erb +1 -0
- data/lib/opal-webpack-loader/templates/initializer.rb.erb +1 -1
- data/lib/opal-webpack-loader/templates/webpacker_development.js_example +54 -0
- data/lib/opal-webpack-loader/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5672a877b6ca466410a9bee1da91def498da0ca53ac5f8d8748f967a9712479b
|
4
|
+
data.tar.gz: 27aabbb8f2e7f8bb7a0e895e34f7ad33f871eb2f7fac8ad04e8d0166c4cd7b7a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c6b3b91f6711df267441402cbb773027f7fff58557a215c22a6768daebc77095909eca0c17133ec2f326b7b0ed0402c01363b76cc775a3710f30fb9f529df898
|
7
|
+
data.tar.gz: 7f795596a4d52556e1c8756286bcc94a4e45606f80b428d2a3c1721bf50f441fa3ef56ae4b5a25e0d05dc1b3d912e63839c1a1d9f99fb5832fa8b2808bce56bb
|
@@ -216,7 +216,11 @@ module OpalWebpackLoader
|
|
216
216
|
File.write('Procfile', lines.join("\n"))
|
217
217
|
end
|
218
218
|
else
|
219
|
-
|
219
|
+
erb_hash = { web_starter: '' }
|
220
|
+
if @js_entrypoints_directory.start_with?('app')
|
221
|
+
erb_hash[:web_starter] = 'web: bundle exec rails s'
|
222
|
+
end
|
223
|
+
create_file_from_template('Procfile.erb', 'Procfile',erb_hash)
|
220
224
|
end
|
221
225
|
end
|
222
226
|
|
@@ -0,0 +1,54 @@
|
|
1
|
+
process.env.NODE_ENV = process.env.NODE_ENV || 'development';
|
2
|
+
const environment = require('./environment');
|
3
|
+
const chokidar = require('chokidar');
|
4
|
+
const OwlResolver = require('opal-webpack-loader/resolver');
|
5
|
+
|
6
|
+
const owl = {
|
7
|
+
test: /.(rb|js.rb)$/,
|
8
|
+
use: [
|
9
|
+
{
|
10
|
+
loader: 'opal-webpack-loader',
|
11
|
+
options: {
|
12
|
+
sourceMap: false,
|
13
|
+
hmr: true,
|
14
|
+
hmrHook: '<%= hmr_hook %>'
|
15
|
+
}
|
16
|
+
}
|
17
|
+
]
|
18
|
+
};
|
19
|
+
|
20
|
+
environment.loaders.append('owlloader', owl);
|
21
|
+
|
22
|
+
environment.resolve.plugins.append('owlresolver', new OwlResolver('resolve', 'resolved'));
|
23
|
+
|
24
|
+
environment.devServer = {
|
25
|
+
before: function(app, server) {
|
26
|
+
// reload page for changes in app/views
|
27
|
+
chokidar.watch(path.resolve(__dirname, '../../app/views')).on('all', function () {
|
28
|
+
server.sockWrite(server.sockets, 'content-changed');
|
29
|
+
})
|
30
|
+
},
|
31
|
+
open: false,
|
32
|
+
lazy: false,
|
33
|
+
port: 3035,
|
34
|
+
hot: true,
|
35
|
+
// hotOnly: true,
|
36
|
+
inline: true,
|
37
|
+
https: false,
|
38
|
+
disableHostCheck: true,
|
39
|
+
headers: {
|
40
|
+
"Access-Control-Allow-Origin": "*",
|
41
|
+
"Access-Control-Allow-Methods": "GET, POST, PUT, DELETE, PATCH, OPTIONS",
|
42
|
+
"Access-Control-Allow-Headers": "X-Requested-With, content-type, Authorization"
|
43
|
+
},
|
44
|
+
watchOptions: {
|
45
|
+
// in case of problems with hot reloading uncomment the following two lines:
|
46
|
+
// aggregateTimeout: 250,
|
47
|
+
// poll: 50,
|
48
|
+
ignored: /\bnode_modules\b/
|
49
|
+
},
|
50
|
+
contentBase: path.resolve(__dirname, 'public')
|
51
|
+
// watchContentBase: true
|
52
|
+
};
|
53
|
+
|
54
|
+
module.exports = environment;
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opal-webpack-loader
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Biedermann
|
@@ -164,6 +164,7 @@ files:
|
|
164
164
|
- lib/opal-webpack-loader/templates/opal_loader.rb.erb
|
165
165
|
- lib/opal-webpack-loader/templates/package.json.erb
|
166
166
|
- lib/opal-webpack-loader/templates/production.js.erb
|
167
|
+
- lib/opal-webpack-loader/templates/webpacker_development.js_example
|
167
168
|
- lib/opal-webpack-loader/version.rb
|
168
169
|
- lib/opal-webpack-loader/view_helper.rb
|
169
170
|
- spec/fixtures/flattering/Gemfile
|