This file contains hidden or 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
import {includePaths} from 'node-bourbon'; | |
module: { | |
loaders: [ | |
{ | |
test: /\.scss$/, | |
loader: `style!css!sass?includePaths[]=${includePaths}` | |
} | |
] | |
} |
This file contains hidden or 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
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' | |
} |
This file contains hidden or 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
"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" | |
} |
This file contains hidden or 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
export default { | |
entry: ....., | |
output: ...., | |
plugins:[ | |
new webpack.ResolverPlugin( | |
new webpack.ResolverPlugin.DirectoryDescriptionFilePlugin( | |
'bower.json', ['main'] | |
) | |
], | |
resolve: { |
This file contains hidden or 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
const plugins = [ | |
new webpack.ProvidePlugin({ | |
$: ‘jquery’, | |
jQuery: ‘jquery’, | |
‘window.jQuery’: ‘jquery’, | |
React: ‘react’, | |
paper: ‘paper’ | |
}) | |
]; |
This file contains hidden or 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
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. | |
* | |
*/ |
This file contains hidden or 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
const requireTest = require.context('./test', true, /_test\.js$/); | |
requireTest.keys().forEach(requireTest); //stolen directly from @shama |
This file contains hidden or 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
export default function(ComposedComponent) { | |
let displayName = ComposedComponent.displayName || ComposedComponent.name; | |
@nuclearComponent({ | |
formState: FormGetters.formState, | |
formValidation: FormGetters.formValidation | |
}) | |
@provideContextDec({ | |
Actions: PropTypes.object.isRequired, | |
formId: PropTypes.string.isRequired |
This file contains hidden or 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
var checkComplexPassword = function(password) { | |
var CHAR_LOWERS = /[a-z]/, | |
CHAR_UPPERS = /[A-Z]/, | |
CHAR_NUMBERS = /[0-9]/, | |
CHAR_SPECIAL = /[?=.*!@#$%^&*]/, | |
CHAR_TYPES = [CHAR_LOWERS,CHAR_UPPERS,CHAR_NUMBERS,CHAR_SPECIAL], | |
counter = 4; | |
for (var i=0; i<CHAR_TYPES.length; i++){ | |
if(!CHAR_TYPES[i].test(password)){ |
This file contains hidden or 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
let mockNuclearDec = mockNuclearComponent({formState, formValidation}); | |
HigherOrderInput.__Rewire__('nuclearComponent', mockNuclearDec); | |
let HigherOrderComponent = HigherOrderInput(Input); | |
let hoc = TestUtils.renderIntoDocument( | |
<HigherOrderComponent {...mockProps} /> | |
); | |
let hocElm = React.findDOMNode(hoc); | |
let inputObj = TestUtils.findRenderedDOMComponentWithClass(hoc, 'one'); |