isomorfeus-installer 1.0.0.delta1 → 1.0.0.delta2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +21 -0
- data/bin/isomorfeus +8 -122
- data/lib/isomorfeus/installer/cli.rb +26 -0
- data/lib/isomorfeus/installer/databases/arangodb.rb +4 -1
- data/lib/isomorfeus/installer/databases/mysql.rb +18 -2
- data/lib/isomorfeus/installer/databases/neo4j.rb +7 -2
- data/lib/isomorfeus/installer/databases/postgresql.rb +18 -2
- data/lib/isomorfeus/installer/databases/sqlite.rb +22 -0
- data/lib/isomorfeus/installer/new_project.rb +56 -0
- data/lib/isomorfeus/installer/options_mangler.rb +49 -0
- data/lib/isomorfeus/installer/other_modules.rb +11 -0
- data/lib/isomorfeus/installer/rack_servers.rb +19 -0
- data/{Gemfile → lib/isomorfeus/installer/templates/.gitkeep.erb} +0 -0
- data/lib/isomorfeus/installer/templates/Gemfile.erb +18 -8
- data/lib/isomorfeus/installer/templates/Procfile.erb +2 -2
- data/lib/isomorfeus/installer/templates/ProcfileDebug.erb +2 -0
- data/lib/isomorfeus/installer/templates/actioncable/actioncable_ru.erb +3 -0
- data/lib/isomorfeus/installer/templates/app.rb.erb +35 -0
- data/lib/isomorfeus/installer/templates/app_loader.rb.erb +13 -0
- data/lib/isomorfeus/installer/{spectre.rb → templates/application.css.erb} +0 -0
- data/lib/isomorfeus/installer/templates/application.js.erb +15 -23
- data/lib/isomorfeus/installer/templates/application_common.js.erb +23 -0
- data/lib/isomorfeus/installer/templates/application_debug.js.erb +9 -0
- data/lib/isomorfeus/installer/templates/application_ssr.js.erb +18 -0
- data/lib/isomorfeus/installer/templates/application_web_worker.js.erb +5 -0
- data/lib/isomorfeus/installer/templates/config_ru.erb +3 -0
- data/lib/isomorfeus/installer/templates/isomorfeus_loader.rb.erb +11 -2
- data/lib/isomorfeus/installer/templates/isomorfeus_web_worker_loader.rb.erb +2 -0
- data/lib/isomorfeus/installer/templates/my_app.rb.erb +1 -1
- data/lib/isomorfeus/installer/templates/package.json.erb +20 -6
- data/lib/isomorfeus/installer/templates/spec_helper.rb.erb +19 -0
- data/lib/isomorfeus/installer/templates/test_spec.rb.erb +13 -0
- data/lib/isomorfeus/installer/transport_stores/redis.rb +14 -0
- data/lib/isomorfeus/installer/transports/actioncable.rb +33 -1
- data/lib/isomorfeus/installer.rb +250 -130
- data/readme.md +2 -5
- metadata +125 -30
- data/isomorfeus-installer.gemspec +0 -19
- data/lib/isomorfeus/installer/asset_bundlers/opal_webpack_loader.rb +0 -103
- data/lib/isomorfeus/installer/databases/none.rb +0 -11
- data/lib/isomorfeus/installer/frameworks/cuba.rb +0 -26
- data/lib/isomorfeus/installer/frameworks/rails.rb +0 -78
- data/lib/isomorfeus/installer/frameworks/roda.rb +0 -26
- data/lib/isomorfeus/installer/frameworks/sinatra.rb +0 -26
- data/lib/isomorfeus/installer/templates/cuba/config_ru.erb +0 -48
- data/lib/isomorfeus/installer/templates/owl/development.js.erb +0 -145
- data/lib/isomorfeus/installer/templates/owl/production.js.erb +0 -93
- data/lib/isomorfeus/installer/templates/owl/test.js.erb +0 -0
- data/lib/isomorfeus/installer/templates/rails/application.html.erb.head +0 -6
- data/lib/isomorfeus/installer/templates/rails/application.html.erb.tail +0 -6
- data/lib/isomorfeus/installer/templates/rails/application_controller.rb +0 -5
- data/lib/isomorfeus/installer/templates/rails/application_helper.rb.erb +0 -3
- data/lib/isomorfeus/installer/templates/rails/assets.rb.erb +0 -1
- data/lib/isomorfeus/installer/templates/rails/basic-react.rb +0 -453
- data/lib/isomorfeus/installer/templates/rails/index.html +0 -1
- data/lib/isomorfeus/installer/templates/rails/routes.rb +0 -5
- data/lib/isomorfeus/installer/templates/roda/config_ru.erb +0 -39
- data/lib/isomorfeus/installer/templates/sinatra/config_ru.erb +0 -38
- data/lib/isomorfeus/installer/transport.rb +0 -0
- data/lib/isomorfeus/installer/transport_store.rb +0 -0
@@ -1,145 +0,0 @@
|
|
1
|
-
// require requirements used below
|
2
|
-
const path = require('path');
|
3
|
-
const webpack = require('webpack');
|
4
|
-
const OwlResolver = require('opal-webpack-loader/resolver'); // to resolve ruby files
|
5
|
-
|
6
|
-
module.exports = {
|
7
|
-
parallelism: 8,
|
8
|
-
context: path.resolve(__dirname, '<%= isomorfeus_path %>'),
|
9
|
-
mode: "development",
|
10
|
-
optimization: {
|
11
|
-
minimize: false // dont minimize in development, to speed up hot reloads
|
12
|
-
},
|
13
|
-
performance: {
|
14
|
-
maxAssetSize: 20000000, // isomorfeus is some code
|
15
|
-
maxEntrypointSize: 20000000
|
16
|
-
},
|
17
|
-
// use one of these below for source maps, disable for faster hot reloads
|
18
|
-
// devtool: 'source-map', // this works well, good compromise between accuracy and performance
|
19
|
-
// devtool: 'cheap-eval-source-map', // less accurate
|
20
|
-
// devtool: 'inline-source-map', // slowest
|
21
|
-
// devtool: 'inline-cheap-source-map',
|
22
|
-
entry: {
|
23
|
-
application: [path.resolve(__dirname, '<%= entrypoint_path %>')], // entrypoint for isomorfeus
|
24
|
-
},
|
25
|
-
output: {
|
26
|
-
// webpack-serve keeps the output in memory
|
27
|
-
filename: '[name].js',
|
28
|
-
path: path.resolve(__dirname, '<%= asset_output_path %>'),
|
29
|
-
publicPath: 'http://localhost:3035/assets/'
|
30
|
-
},
|
31
|
-
resolve: {
|
32
|
-
plugins: [
|
33
|
-
// this makes it possible for webpack to find ruby files
|
34
|
-
new OwlResolver('resolve', 'resolved')
|
35
|
-
],
|
36
|
-
alias: {
|
37
|
-
'react-dom': 'react-dom/profiling',
|
38
|
-
'schedule/tracing': 'schedule/tracing-profiling',
|
39
|
-
}
|
40
|
-
},
|
41
|
-
plugins: [
|
42
|
-
// both for hot reloading
|
43
|
-
new webpack.NamedModulesPlugin(),
|
44
|
-
new webpack.HotModuleReplacementPlugin()
|
45
|
-
],
|
46
|
-
module: {
|
47
|
-
rules: [
|
48
|
-
{
|
49
|
-
// loader for .scss files
|
50
|
-
// test means "test for for file endings"
|
51
|
-
test: /.scss$/,
|
52
|
-
use: [
|
53
|
-
{
|
54
|
-
loader: "style-loader",
|
55
|
-
options: {
|
56
|
-
hmr: true
|
57
|
-
}
|
58
|
-
},
|
59
|
-
{
|
60
|
-
loader: "css-loader",
|
61
|
-
options: {
|
62
|
-
// sourceMap: true, // set to false to speed up hot reloads
|
63
|
-
minimize: false // set to false to speed up hot reloads
|
64
|
-
}
|
65
|
-
},
|
66
|
-
{
|
67
|
-
loader: "sass-loader",
|
68
|
-
options: {
|
69
|
-
includePaths: [path.resolve(__dirname, '<%= stylesheets_path %>')],
|
70
|
-
// sourceMap: true // set to false to speed up hot reloads
|
71
|
-
}
|
72
|
-
}
|
73
|
-
]
|
74
|
-
},
|
75
|
-
{
|
76
|
-
// loader for .css files
|
77
|
-
test: /.css$/,
|
78
|
-
use: [
|
79
|
-
{
|
80
|
-
loader: "style-loader",
|
81
|
-
options: {
|
82
|
-
hmr: true
|
83
|
-
}
|
84
|
-
},
|
85
|
-
{
|
86
|
-
loader: "css-loader",
|
87
|
-
options: {
|
88
|
-
// sourceMap: true, // set to false to speed up hot reloads
|
89
|
-
minimize: false // set to false to speed up hot reloads
|
90
|
-
}
|
91
|
-
}
|
92
|
-
]
|
93
|
-
},
|
94
|
-
{
|
95
|
-
test: /.(png|svg|jpg|gif)$/,
|
96
|
-
use: [
|
97
|
-
'file-loader'
|
98
|
-
]
|
99
|
-
},
|
100
|
-
{
|
101
|
-
test: /.(woff|woff2|eot|ttf|otf)$/,
|
102
|
-
use: [
|
103
|
-
'file-loader'
|
104
|
-
]
|
105
|
-
},
|
106
|
-
{
|
107
|
-
// opal-webpack-loader will compile and include ruby files in the pack
|
108
|
-
test: /.(rb|js.rb)$/,
|
109
|
-
use: [
|
110
|
-
{
|
111
|
-
loader: 'opal-webpack-loader',
|
112
|
-
options: {
|
113
|
-
// sourceMap: true
|
114
|
-
}
|
115
|
-
}
|
116
|
-
]
|
117
|
-
}
|
118
|
-
]
|
119
|
-
},
|
120
|
-
// configuration for webpack-dev-server
|
121
|
-
devServer: {
|
122
|
-
open: false,
|
123
|
-
lazy: false,
|
124
|
-
port: 3035,
|
125
|
-
hot: true,
|
126
|
-
// hotOnly: true,
|
127
|
-
inline: true,
|
128
|
-
https: false,
|
129
|
-
disableHostCheck: true,
|
130
|
-
headers: {
|
131
|
-
"Access-Control-Allow-Origin": "*",
|
132
|
-
"Access-Control-Allow-Methods": "GET, POST, PUT, DELETE, PATCH, OPTIONS",
|
133
|
-
"Access-Control-Allow-Headers": "X-Requested-With, content-type, Authorization"
|
134
|
-
},
|
135
|
-
watchOptions: {
|
136
|
-
// in case of problems with hot reloading uncomment the following two lines:
|
137
|
-
// aggregateTimeout: 250,
|
138
|
-
// poll: 50,
|
139
|
-
ignored: /\bnode_modules\b/
|
140
|
-
},
|
141
|
-
contentBase: path.resolve(__dirname, 'public')
|
142
|
-
// watchContentBase: true
|
143
|
-
}
|
144
|
-
};
|
145
|
-
|
@@ -1,93 +0,0 @@
|
|
1
|
-
const path = require('path');
|
2
|
-
const OwlResolver = require('opal-webpack-loader/resolver');
|
3
|
-
const CompressionPlugin = require("compression-webpack-plugin"); // for gzipping the packs
|
4
|
-
const ManifestPlugin = require('webpack-manifest-plugin'); // for generating the manifest
|
5
|
-
|
6
|
-
module.exports = {
|
7
|
-
parallelism: 8,
|
8
|
-
context: path.resolve(__dirname, '<%= isomorfeus_path %>'),
|
9
|
-
mode: "production",
|
10
|
-
optimization: {
|
11
|
-
minimize: true // minimize
|
12
|
-
},
|
13
|
-
performance: {
|
14
|
-
maxAssetSize: 20000000, // isomorfeus is some code
|
15
|
-
maxEntrypointSize: 20000000
|
16
|
-
},
|
17
|
-
entry: {
|
18
|
-
application: [path.resolve(__dirname, '<%= entrypoint_path %>')],
|
19
|
-
},
|
20
|
-
plugins: [
|
21
|
-
new CompressionPlugin({ test: /.js/ }), // gzip compress
|
22
|
-
new ManifestPlugin() // generate manifest
|
23
|
-
],
|
24
|
-
output: {
|
25
|
-
filename: '[name]-[chunkhash].js', // include fingerprint in file name, so browsers get the latest
|
26
|
-
path: path.resolve(__dirname, '<%= asset_output_path %>'),
|
27
|
-
publicPath: '/assets/'
|
28
|
-
},
|
29
|
-
resolve: {
|
30
|
-
plugins: [
|
31
|
-
// resolve ruby files
|
32
|
-
new OwlResolver('resolve', 'resolved')
|
33
|
-
]
|
34
|
-
},
|
35
|
-
module: {
|
36
|
-
rules: [
|
37
|
-
{
|
38
|
-
test: /.scss$/,
|
39
|
-
use: [
|
40
|
-
{
|
41
|
-
loader: "style-loader",
|
42
|
-
options: {
|
43
|
-
hmr: false
|
44
|
-
}
|
45
|
-
},
|
46
|
-
{
|
47
|
-
loader: "css-loader"
|
48
|
-
},
|
49
|
-
{
|
50
|
-
loader: "sass-loader",
|
51
|
-
options: {
|
52
|
-
includePath: [
|
53
|
-
path.resolve(__dirname, '<%= stylesheets_path %>')
|
54
|
-
]
|
55
|
-
}
|
56
|
-
}
|
57
|
-
]
|
58
|
-
},
|
59
|
-
{
|
60
|
-
test: /.css$/,
|
61
|
-
use: [
|
62
|
-
'style-loader',
|
63
|
-
'css-loader'
|
64
|
-
]
|
65
|
-
},
|
66
|
-
{
|
67
|
-
test: /.(png|svg|jpg|gif)$/,
|
68
|
-
use: [
|
69
|
-
'file-loader'
|
70
|
-
]
|
71
|
-
},
|
72
|
-
{
|
73
|
-
test: /.(woff|woff2|eot|ttf|otf)$/,
|
74
|
-
use: [
|
75
|
-
'file-loader'
|
76
|
-
]
|
77
|
-
},
|
78
|
-
{
|
79
|
-
// opal-webpack-loader will compile and include ruby files in the pack
|
80
|
-
test: /.(rb|js.rb)$/,
|
81
|
-
use: [
|
82
|
-
{
|
83
|
-
loader: 'opal-webpack-loader',
|
84
|
-
options: {
|
85
|
-
sourceMap: false
|
86
|
-
}
|
87
|
-
}
|
88
|
-
]
|
89
|
-
}
|
90
|
-
]
|
91
|
-
}
|
92
|
-
};
|
93
|
-
|
File without changes
|
@@ -1 +0,0 @@
|
|
1
|
-
<%= asset_bundler_config %>
|