repack 2.2.1 → 2.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/example/babelrc +1 -1
- data/example/package.json +11 -2
- data/example/webpack.config.heroku.js +30 -10
- data/example/webpack.config.js +37 -13
- data/lib/repack/version.rb +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: af7904dcfb97cb6b47224935a52a8ba8b4cf5d2e
|
4
|
+
data.tar.gz: 05cc95cda2f47c9c5f16dc0523164dd8bca55b00
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 40e62f69da763f6dd02f9349437d8dc28672c01ea15c0f34136e4a3a831022f6768bcd8fdd24793b30dfd3a8562d6c9e084ea5c1969333e5fda0feaa3603b460
|
7
|
+
data.tar.gz: 53042dce86e70b4b2a927a8095a4371af895e64392d2092023af45e336ad9c4c7949fff4ebe2c4dc5836d86b19dfb4774ab96d210582c23004cdec517ab108a4
|
data/example/babelrc
CHANGED
data/example/package.json
CHANGED
@@ -19,10 +19,11 @@
|
|
19
19
|
"test_watch": "jest --watch"
|
20
20
|
},
|
21
21
|
"dependencies": {
|
22
|
+
"autoprefixer": "^6.7.6",
|
22
23
|
"react": "^15.1.0",
|
23
24
|
"react-dom": "^15.1.0",
|
24
25
|
"stats-webpack-plugin": "^0.2.1",
|
25
|
-
"webpack": "^
|
26
|
+
"webpack": "^2.2.1",
|
26
27
|
"babel-core": "^6.9.1",
|
27
28
|
"babel-loader": "^6.2.4",
|
28
29
|
"babel-preset-latest": "^6.16.0",
|
@@ -30,7 +31,15 @@
|
|
30
31
|
"file-loader": "^0.9.0",
|
31
32
|
"url-loader": "^0.5.7",
|
32
33
|
"babel-preset-react": "^6.5.0",
|
33
|
-
"babel-preset-stage-
|
34
|
+
"babel-preset-stage-2": "^6.22.0",
|
35
|
+
"css-loader": "^0.26.1",
|
36
|
+
"node-sass": "^4.3.0",
|
37
|
+
"postcss-loader": "^1.3.3",
|
38
|
+
"sass-loader": "^4.1.1",
|
39
|
+
"extract-text-webpack-plugin": "v2.0.0",
|
40
|
+
"json-loader": "^0.5.4",
|
41
|
+
"pngquant": "^1.2.0",
|
42
|
+
"style-loader": "^0.13.1",
|
34
43
|
"webpack-dev-middleware": "1.7.0"
|
35
44
|
},
|
36
45
|
"devDependencies": {
|
@@ -4,6 +4,8 @@
|
|
4
4
|
var path = require('path');
|
5
5
|
var webpack = require('webpack');
|
6
6
|
var StatsPlugin = require('stats-webpack-plugin');
|
7
|
+
var ExtractTextPlugin = require('extract-text-webpack-plugin');
|
8
|
+
var autoprefixer = require('autoprefixer');
|
7
9
|
|
8
10
|
// must match config.webpack.dev_server.port
|
9
11
|
var devServerPort = 3808;
|
@@ -29,33 +31,50 @@ var config = {
|
|
29
31
|
},
|
30
32
|
|
31
33
|
resolve: {
|
32
|
-
root: path.join(__dirname, '..', 'client'),
|
33
34
|
extensions: ["", ".js", ".jsx", ".es6"]
|
34
35
|
},
|
35
36
|
|
36
37
|
module: {
|
37
|
-
|
38
|
+
rules: [
|
38
39
|
{
|
39
40
|
test: /\.jsx?$/, // Match both .js and .jsx files
|
40
41
|
exclude: /node_modules/,
|
41
|
-
loader: "babel",
|
42
|
-
|
43
|
-
{
|
44
|
-
presets:['latest', 'react', 'stage-0']
|
45
|
-
}
|
42
|
+
loader: "babel-loader",
|
43
|
+
include: [ path.join(__dirname, "..", "client")],
|
44
|
+
options: { cacheDirectory: true }
|
46
45
|
},
|
47
46
|
{
|
48
47
|
test: /\.(jpe?g|png|gif|svg)$/i,
|
49
48
|
loader: 'url-loader',
|
49
|
+
include: [ path.join(__dirname, "..", "client")],
|
50
50
|
options: {
|
51
51
|
limit: 25000
|
52
52
|
}
|
53
53
|
},
|
54
|
+
{
|
55
|
+
test: /\.scss$/,
|
56
|
+
use: [
|
57
|
+
{ loader: "style-loader", query: { sourceMap: true }},
|
58
|
+
{
|
59
|
+
loader: "css-loader",
|
60
|
+
query: {
|
61
|
+
modules: true,
|
62
|
+
importLoaders: true,
|
63
|
+
localIdentName: '[local]___[hash:base64:5]'
|
64
|
+
}
|
65
|
+
},
|
66
|
+
{ loader: "sass-loader" },
|
67
|
+
{ loader: "postcss-loader" }
|
68
|
+
],
|
69
|
+
exclude: /node_modules/,
|
70
|
+
include: [ path.join(__dirname, "..", "client")],
|
71
|
+
}
|
54
72
|
]
|
55
73
|
},
|
56
74
|
|
57
75
|
plugins: [
|
58
76
|
// must match config.webpack.manifest_filename
|
77
|
+
new webpack.LoaderOptionsPlugin({ options: { postcss: [ autoprefixer ] }}),
|
59
78
|
new StatsPlugin('manifest.json', {
|
60
79
|
// We only need assetsByChunkName
|
61
80
|
chunkModules: false,
|
@@ -63,7 +82,9 @@ var config = {
|
|
63
82
|
chunks: false,
|
64
83
|
modules: false,
|
65
84
|
assets: true
|
66
|
-
})
|
85
|
+
}),
|
86
|
+
new ExtractTextPlugin({ filename: 'bundle.css', allChunks: true })
|
87
|
+
]
|
67
88
|
};
|
68
89
|
|
69
90
|
if (production) {
|
@@ -71,8 +92,7 @@ if (production) {
|
|
71
92
|
new webpack.DefinePlugin({
|
72
93
|
'process.env': { NODE_ENV: JSON.stringify('production') }
|
73
94
|
}),
|
74
|
-
new webpack.optimize.DedupePlugin()
|
75
|
-
new webpack.optimize.OccurenceOrderPlugin()
|
95
|
+
new webpack.optimize.DedupePlugin()
|
76
96
|
);
|
77
97
|
} else {
|
78
98
|
config.devServer = {
|
data/example/webpack.config.js
CHANGED
@@ -4,6 +4,8 @@
|
|
4
4
|
var path = require('path');
|
5
5
|
var webpack = require('webpack');
|
6
6
|
var StatsPlugin = require('stats-webpack-plugin');
|
7
|
+
var ExtractTextPlugin = require('extract-text-webpack-plugin');
|
8
|
+
var autoprefixer = require('autoprefixer');
|
7
9
|
|
8
10
|
// must match config.webpack.dev_server.port
|
9
11
|
var devServerPort = 3808;
|
@@ -30,31 +32,52 @@ var config = {
|
|
30
32
|
|
31
33
|
resolve: {
|
32
34
|
root: path.join(__dirname, '..', 'client'),
|
33
|
-
extensions: ["
|
35
|
+
extensions: [".js", ".jsx", ".es6", "css", "scss"]
|
34
36
|
},
|
35
37
|
|
36
38
|
module: {
|
37
|
-
|
39
|
+
rules: [
|
38
40
|
{
|
39
41
|
test: /\.jsx?$/, // Match both .js and .jsx files
|
40
42
|
exclude: /node_modules/,
|
41
|
-
loader: "babel",
|
42
|
-
|
43
|
-
{
|
44
|
-
presets:['latest', 'react', 'stage-0']
|
45
|
-
}
|
43
|
+
loader: "babel-loader",
|
44
|
+
include: [ path.join(__dirname, "..", "client")],
|
45
|
+
options: { cacheDirectory: true }
|
46
46
|
},
|
47
47
|
{
|
48
48
|
test: /\.(jpe?g|png|gif|svg)$/i,
|
49
|
-
|
50
|
-
|
51
|
-
|
49
|
+
include: [ path.join(__dirname, "..", "client")],
|
50
|
+
use: [
|
51
|
+
{ loader: 'file-loader', query: { hash: 'sha512&digest=hex&name=[hash].[ext]' }},
|
52
|
+
{
|
53
|
+
loader: 'image-webpack-loader',
|
54
|
+
query: { bypassOnDebug: 7, optimizationLevel: 7, interlaced: false }
|
55
|
+
}
|
52
56
|
]
|
57
|
+
},
|
58
|
+
{
|
59
|
+
test: /\.scss$/,
|
60
|
+
use: [
|
61
|
+
{ loader: "style-loader", query: { sourceMap: true }},
|
62
|
+
{
|
63
|
+
loader: "css-loader",
|
64
|
+
query: {
|
65
|
+
modules: true,
|
66
|
+
importLoaders: true,
|
67
|
+
localIdentName: '[local]___[hash:base64:5]'
|
68
|
+
}
|
69
|
+
},
|
70
|
+
{ loader: "sass-loader" },
|
71
|
+
{ loader: "postcss-loader" }
|
72
|
+
],
|
73
|
+
exclude: /node_modules/,
|
74
|
+
include: [ path.join(__dirname, "..", "client")],
|
53
75
|
}
|
54
76
|
]
|
55
77
|
},
|
56
78
|
|
57
79
|
plugins: [
|
80
|
+
new webpack.LoaderOptionsPlugin({ options: { postcss: [ autoprefixer ] }}),
|
58
81
|
// must match config.webpack.manifest_filename
|
59
82
|
new StatsPlugin('manifest.json', {
|
60
83
|
// We only need assetsByChunkName
|
@@ -63,7 +86,9 @@ var config = {
|
|
63
86
|
chunks: false,
|
64
87
|
modules: false,
|
65
88
|
assets: true
|
66
|
-
})
|
89
|
+
}),
|
90
|
+
new ExtractTextPlugin({ filename: 'bundle.css', allChunks: true }),
|
91
|
+
]
|
67
92
|
};
|
68
93
|
|
69
94
|
if (production) {
|
@@ -76,8 +101,7 @@ if (production) {
|
|
76
101
|
new webpack.DefinePlugin({
|
77
102
|
'process.env': { NODE_ENV: JSON.stringify('production') }
|
78
103
|
}),
|
79
|
-
new webpack.optimize.DedupePlugin()
|
80
|
-
new webpack.optimize.OccurenceOrderPlugin()
|
104
|
+
new webpack.optimize.DedupePlugin()
|
81
105
|
);
|
82
106
|
} else {
|
83
107
|
config.devServer = {
|
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.
|
4
|
+
version: 2.3.0
|
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: 2017-
|
12
|
+
date: 2017-03-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|