repack 2.1.5 → 2.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/example/fileMock.js +1 -0
- data/example/package.json +24 -3
- data/example/styleMock.js +1 -0
- data/example/webpack.config.heroku.js +6 -8
- data/example/webpack.config.js +2 -2
- data/lib/generators/repack/install_generator.rb +7 -0
- data/lib/repack/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a4a9d56f4f6315d83d0087b1d5f528e982e133ed
|
4
|
+
data.tar.gz: 6c462c4e02ae75050514baa2c78d92f1e24f9c62
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c8a9d4c6468c054560f2f91991d04377e343c7f9f54db7491224b05680014a70a74195a845a3debb606e09f978ccfbbd57e7dfa67dc5b4d545e2123e450561e9
|
7
|
+
data.tar.gz: 788dc32c2e53d0d403b34761354ba30696ff0e0a24ce7030726c15e3dbca9efd9881bec64a6ace10fdfc3db8912d2e54507ee334aa381e74e434d146295e7667
|
data/example/fileMock.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
module.exports = {}
|
data/example/package.json
CHANGED
@@ -2,12 +2,21 @@
|
|
2
2
|
"name": "repack",
|
3
3
|
"version": "0.0.1",
|
4
4
|
"license": "MIT",
|
5
|
+
"jest": {
|
6
|
+
"moduleNameMapper": {
|
7
|
+
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/client/__tests__/__mocks__/fileMock.js",
|
8
|
+
"\\.(css|less)$": "<rootDir>/client/__tests__/__mocks__/styleMock.js"
|
9
|
+
},
|
10
|
+
"testRegex": "test.js$"
|
11
|
+
},
|
5
12
|
"scripts": {
|
6
13
|
"dev_server": "./node_modules/.bin/webpack-dev-server --config config/webpack.config.js",
|
7
14
|
"build": "webpack --config=config/webpack.config.js -p",
|
8
15
|
"heroku-setup": "heroku buildpacks:clear && heroku buildpacks:set heroku/nodejs && heroku buildpacks:add heroku/ruby --index 2",
|
9
16
|
"webpack:deploy-heroku": "webpack --config=config/webpack.config.heroku.js -p",
|
10
|
-
"heroku-postbuild": "npm run webpack:deploy-heroku"
|
17
|
+
"heroku-postbuild": "npm run webpack:deploy-heroku",
|
18
|
+
"test": "jest",
|
19
|
+
"test_watch": "jest --watch"
|
11
20
|
},
|
12
21
|
"dependencies": {
|
13
22
|
"react": "^15.1.0",
|
@@ -16,13 +25,25 @@
|
|
16
25
|
"webpack": "^1.9.11",
|
17
26
|
"babel-core": "^6.9.1",
|
18
27
|
"babel-loader": "^6.2.4",
|
19
|
-
"babel-preset-
|
28
|
+
"babel-preset-latest": "^6.16.0",
|
20
29
|
"image-webpack-loader": "3.0.0",
|
30
|
+
"file-loader": "^0.9.0",
|
31
|
+
"url-loader": "^0.5.7",
|
21
32
|
"babel-preset-react": "^6.5.0",
|
22
33
|
"babel-preset-stage-0": "^6.5.0",
|
23
34
|
"webpack-dev-middleware": "1.7.0"
|
24
35
|
},
|
25
36
|
"devDependencies": {
|
26
|
-
"
|
37
|
+
"babel-jest": "^18.0.0",
|
38
|
+
"enzyme": "^2.7.0",
|
39
|
+
"jest": "^18.1.0",
|
40
|
+
"react-addons-test-utils": "^15.4.1",
|
41
|
+
"react-shallow-renderer": "^1.1.4",
|
42
|
+
"react-test-renderer": "^15.4.1",
|
43
|
+
"react-test-utils": "^0.0.1",
|
44
|
+
"redux-mock-store": "^1.2.1",
|
45
|
+
"sinon": "^1.17.7",
|
46
|
+
"webpack-dashboard": "^0.2.0",
|
47
|
+
"webpack-dev-server": "^1.9.0",
|
27
48
|
}
|
28
49
|
}
|
@@ -0,0 +1 @@
|
|
1
|
+
module.exports = {}
|
@@ -41,16 +41,16 @@ var config = {
|
|
41
41
|
loader: "babel",
|
42
42
|
query:
|
43
43
|
{
|
44
|
-
presets:['
|
44
|
+
presets:['latest', 'react', 'stage-0']
|
45
45
|
}
|
46
46
|
},
|
47
47
|
{
|
48
48
|
test: /\.(jpe?g|png|gif|svg)$/i,
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
}
|
49
|
+
loader: 'url-loader',
|
50
|
+
options: {
|
51
|
+
limit: 25000
|
52
|
+
}
|
53
|
+
},
|
54
54
|
]
|
55
55
|
},
|
56
56
|
|
@@ -68,7 +68,6 @@ var config = {
|
|
68
68
|
|
69
69
|
if (production) {
|
70
70
|
config.plugins.push(
|
71
|
-
new webpack.NoErrorsPlugin(),
|
72
71
|
new webpack.DefinePlugin({
|
73
72
|
'process.env': { NODE_ENV: JSON.stringify('production') }
|
74
73
|
}),
|
@@ -82,7 +81,6 @@ if (production) {
|
|
82
81
|
};
|
83
82
|
config.output.publicPath = '//localhost:' + devServerPort + '/client/';
|
84
83
|
// Source maps
|
85
|
-
config.devtool = 'cheap-module-eval-source-map';
|
86
84
|
}
|
87
85
|
|
88
86
|
module.exports = config;
|
data/example/webpack.config.js
CHANGED
@@ -41,7 +41,7 @@ var config = {
|
|
41
41
|
loader: "babel",
|
42
42
|
query:
|
43
43
|
{
|
44
|
-
presets:['
|
44
|
+
presets:['latest', 'react', 'stage-0']
|
45
45
|
}
|
46
46
|
},
|
47
47
|
{
|
@@ -86,7 +86,7 @@ if (production) {
|
|
86
86
|
};
|
87
87
|
config.output.publicPath = '//localhost:' + devServerPort + '/client/';
|
88
88
|
// Source maps
|
89
|
-
config.devtool = '
|
89
|
+
config.devtool = 'eval-source-map';
|
90
90
|
}
|
91
91
|
|
92
92
|
module.exports = config;
|
@@ -32,6 +32,7 @@ module Repack
|
|
32
32
|
end
|
33
33
|
end
|
34
34
|
end
|
35
|
+
|
35
36
|
def copy_webpack_conf
|
36
37
|
copy_file "webpack.config.js", "config/webpack.config.js"
|
37
38
|
if yes?('Are you going to be deploying to heroku? (yes \ no)')
|
@@ -39,10 +40,16 @@ module Repack
|
|
39
40
|
copy_file "webpack.config.heroku.js", "config/webpack.config.heroku.js"
|
40
41
|
end
|
41
42
|
end
|
43
|
+
|
42
44
|
def create_webpack_application_js
|
43
45
|
empty_directory "client"
|
44
46
|
empty_directory "client/containers"
|
45
47
|
empty_directory "client/components"
|
48
|
+
empty_directory "client/__tests__"
|
49
|
+
empty_directory "client/__tests__/__mocks__"
|
50
|
+
copy_file ".babelrc", ".babelrc"
|
51
|
+
copy_file "styleMock", "client/__tests__/__mocks__"
|
52
|
+
copy_file "fileMock", "client/__tests__/__mocks__"
|
46
53
|
if options[:router] && options[:redux]
|
47
54
|
copy_file "boilerplate/router_redux/application.js", "client/application.js"
|
48
55
|
copy_file "boilerplate/routes.js", "client/routes.js"
|
data/lib/repack/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: repack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dave Jungst
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2017-01-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -55,7 +55,9 @@ files:
|
|
55
55
|
- example/boilerplate/views/rails_view.html.erb
|
56
56
|
- example/boilerplate/views/rails_view.html.haml
|
57
57
|
- example/dot_gitignore
|
58
|
+
- example/fileMock.js
|
58
59
|
- example/package.json
|
60
|
+
- example/styleMock.js
|
59
61
|
- example/webpack.config.heroku.js
|
60
62
|
- example/webpack.config.js
|
61
63
|
- lib/generators/repack/install_generator.rb
|