-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
8,753 additions
and
157 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"presets": ["es2015", "stage-0"] | ||
"presets": ["@babel/preset-env"] | ||
} |
4,938 changes: 4,938 additions & 0 deletions
4,938
baton/static/baton/app/dist/18df003f90a7f1313b98b23384ec4f1b.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
3,570 changes: 3,570 additions & 0 deletions
3,570
baton/static/baton/app/dist/3c45c98f6f6c1b009c082510d0255ef4.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -150,7 +150,8 @@ | |
} | ||
|
||
|
||
.open { | ||
.open, | ||
.default-open { | ||
@include media-breakpoint-up(lg) { | ||
.has-children { | ||
&::after { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,79 +1,89 @@ | ||
import webpack from 'webpack' | ||
import path from 'path' | ||
import svgToMiniDataURI from 'mini-svg-data-uri' | ||
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; | ||
|
||
const webpackConfig = { | ||
// this is needed to resolve imports from the js root | ||
resolve: { | ||
// always import from root (src and node_modules) | ||
root: [ | ||
'src', | ||
'node_modules' | ||
], | ||
extensions: ['', '.js'] | ||
}, | ||
// let the loaders be found when parsing resources in all paths | ||
resolveLoader: { | ||
root: path.join(__dirname, 'node_modules') | ||
}, | ||
// library entry point | ||
entry: './src/index.js', | ||
output: { | ||
path: path.join(__dirname, 'dist'), | ||
publicPath: '/dist', | ||
filename: 'baton.min.js', | ||
}, | ||
// this for creating source maps | ||
devtool: 'source-map' | ||
} | ||
|
||
webpackConfig.plugins = [ | ||
new webpack.optimize.UglifyJsPlugin({minimize: true}), | ||
new webpack.ProvidePlugin({ | ||
jQuery: 'jquery', | ||
$: 'jquery', | ||
jquery: 'jquery' | ||
}) | ||
] | ||
module.exports = env => { | ||
const webpackConfig = { | ||
mode: 'production', | ||
// this is needed to resolve imports from the js root | ||
resolve: { | ||
// always import from root (src and node_modules) | ||
modules: [ | ||
path.join(__dirname, 'src'), | ||
'node_modules' | ||
], | ||
extensions: ['.js'] | ||
}, | ||
// library entry point | ||
entry: './src/index.js', | ||
output: { | ||
path: path.join(__dirname, 'dist'), | ||
publicPath: '/dist', | ||
filename: 'baton.min.js', | ||
}, | ||
// this for creating source maps | ||
devtool: 'source-map' | ||
} | ||
|
||
webpackConfig.module = { | ||
loaders: [] | ||
} | ||
webpackConfig.plugins = [ | ||
new BundleAnalyzerPlugin(), | ||
new webpack.ProvidePlugin({ | ||
jQuery: 'jquery', | ||
$: 'jquery', | ||
jquery: 'jquery' | ||
}) | ||
] | ||
|
||
// js loaders | ||
webpackConfig.module.loaders.push({ | ||
test: /\.(js)$/, | ||
exclude: /node_modules/, | ||
loader: 'babel-loader', | ||
query: { | ||
presets: ['es2015', 'stage-0'] | ||
webpackConfig.module = { | ||
rules: [] | ||
} | ||
}) | ||
|
||
// css loaders | ||
webpackConfig.module.loaders.push({ | ||
test: /\.scss/, | ||
loader: 'style!css!postcss!sass' | ||
}, { | ||
test: /\.sass/, | ||
loader: 'style!css!postcss!sass' | ||
}) | ||
// js loaders | ||
webpackConfig.module.rules.push({ | ||
test: /\.(js)$/, | ||
exclude: /node_modules/, | ||
loader: 'babel-loader', | ||
query: { | ||
presets: ['@babel/preset-env'] | ||
} | ||
}) | ||
|
||
// File loaders | ||
webpackConfig.module.loaders.push( | ||
{ | ||
test: /\.svg(\?.*)?$/, | ||
loader: 'url?prefix=fonts/&name=[path][name].[ext]&limit=10000&mimetype=image/svg+xml' | ||
}, | ||
/* | ||
{ | ||
test: /\.(png|jpg)$/, | ||
loader: 'url?limit=8192' | ||
}, | ||
*/ | ||
{ | ||
test: /\.(eot|woff|woff2|ttf|svg|png|jpe?g|gif)(\?\S*)?$/, | ||
loader: 'url?limit=100000&name=[name].[ext]' | ||
} | ||
) | ||
// css loaders | ||
webpackConfig.module.rules.push({ | ||
test: /\.scss/, | ||
loader: 'style-loader!css-loader!postcss-loader!sass-loader' | ||
}, { | ||
test: /\.sass/, | ||
loader: 'style-loader!css-loader!postcss-loader!sass-loader' | ||
}) | ||
|
||
export default webpackConfig | ||
// File loaders | ||
webpackConfig.module.rules.push( | ||
{ | ||
test: /\.(eot|woff|woff2|ttf|png|jpe?g|gif)(\?\S*)?$/, | ||
use: { | ||
loader: 'url-loader', | ||
options: { | ||
limit: env.NODE_ENV === 'development' ? 5e6 : 1e4, | ||
publicPath: '/static/baton/app/dist/', | ||
} | ||
} | ||
}, | ||
{ | ||
test: /\.svg$/i, | ||
use: [ | ||
{ | ||
loader: 'url-loader', | ||
options: { | ||
limit: env.NODE_ENV === 'development' ? 5e6 : 1e4, | ||
publicPath: '/static/baton/app/dist/', | ||
generator: (content) => svgToMiniDataURI(content.toString()), | ||
}, | ||
}, | ||
], | ||
}, | ||
) | ||
|
||
return webpackConfig | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters