Skip to content

Instantly share code, notes, and snippets.

//example usage fade in and out
.modal-dialog-container {
$animprop: opacity 1 0;
$transition: all 0.2s linear;
width: 100%;
height: 100%;
cursor: pointer;
background: #fff;
position: absolute;
top: 0;
entry: {
vendor: [
'handlebars',
/*more common vendors to chunk*/
],
'bundle-with-hbs': './src/index.js',
'no-hbs': './src/a.js',
'with-hbs': './src/b.js'
},
output: .....,
export default {
entry: {
'bundle-with-hbs': './src/index.js',
'no-hbs': './src/a.js',
'with-hbs': './src/b.js'
},
output: {
filename: '[name].js',
path: `${__dirname}/dist`
},
import {includePaths} from 'node-bourbon';
module: {
loaders: [
{
test: /\.scss$/,
loader: `style!css!sass?includePaths[]=${includePaths}`
}
]
}
entry: {
'global-shit': './src/my/global/shit.js',
'pages/page-a-shit.js': './src/my/pages/a-shit.js',
'layouts/layout-a-shit.js': './src/my/layouts/a-shit.js'
},
output: {
path: `./${options.outputPath}`, //hipster options passed in
filename: '[name].js'
}
"scripts": {
"dev-server": "webpack-dev-server — config webpack-dev-server.config.js — progress — colors — port 2992 — inline",
"hot-dev-server": "webpack-dev-server — config webpack-hot-dev-server.config.js — hot — progress — colors — port 2992 — inline",
"build": "webpack — config webpack-production.config.js — progress — profile — colors",
"start-dev": "node lib/server-development",
"start": "node lib/server-production"
}
export default {
entry: .....,
output: ....,
plugins:[
new webpack.ResolverPlugin(
new webpack.ResolverPlugin.DirectoryDescriptionFilePlugin(
'bower.json', ['main']
)
],
resolve: {
const plugins = [
new webpack.ProvidePlugin({
$: ‘jquery’,
jQuery: ‘jquery’,
‘window.jQuery’: ‘jquery’,
React: ‘react’,
paper: ‘paper’
})
];
import 'script!history.js/scripts/bundled/html4+html5/jquery.history';
import 'script!jquery.cookie';
/**
* These function calls bootstrap all of the global files, essentially requiring them in
* to mimic concat behavior. This is a temporary solution until we begin `require`ing utilities
* into page level JS rather than referencing them as globals.
* RegEx excludes files that have already been required in a specific order or those that should be omitted.
*
*/
const requireTest = require.context('./test', true, /_test\.js$/);
requireTest.keys().forEach(requireTest); //stolen directly from @shama