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
/** | |
* When a user enters copy into a <textarea> and adds line breaks | |
* that information is ignored by defualt if you were to save it | |
* and then display the copy in the DOM. | |
* | |
* For example I enter this copy into a text area and save it: | |
* <textarea> | |
* My name is Ryan | |
* and I'm a web developer. | |
* </textarea> |
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
# https://github.com/creationix/nvm | |
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash |
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
export default env => { | |
return { | |
entry: { | |
app: [ | |
'react-hot-loader/patch', | |
'babel-polyfill', | |
'main.tsx' | |
] | |
} | |
} |
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
// NOTE: This is not a complete config file, just a partial file for example | |
import webpack from 'webpack'; | |
import { getIfUtils, removeEmpty } from 'webpack-config-utils'; | |
export default env => { | |
const { ifProd, ifNotProd } = getIfUtils(env); | |
return { | |
cache: ifProd(), | |
// ------------------------------------ | |
// Entry Points |
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
import webpack from 'webpack'; | |
import { resolve } from 'path'; | |
import HtmlWebpackPlugin from 'html-webpack-plugin'; | |
import ProgressBarPlugin from 'progress-bar-webpack-plugin'; | |
import ExtractTextPlugin from 'extract-text-webpack-plugin'; | |
import CopyWebpackPlugin from 'copy-webpack-plugin'; | |
import combineLoaders from 'webpack-combine-loaders'; | |
import { getIfUtils, removeEmpty } from 'webpack-config-utils'; | |
import autoprefixer from 'autoprefixer'; |
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
import React from 'react'; | |
const Modal = props => { | |
const { isOpen, children } = props; | |
const renderModal = ( | |
<div className="blocker"> | |
<div className="content"> | |
{ children } | |
</div> | |
</div> |
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
import React from 'react'; | |
const Spinner = props => { | |
const { isSpinning } = props; | |
renderSpinner = ( | |
<div className="spinner"> | |
<div className="double-bounce1"></div> | |
<div className="double-bounce2"></div> | |
</div> | |
); |
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
import { connect } from 'react-redux'; | |
import Spinner from 'components/Spinner'; | |
const mapStateToProps = state => ({ isSpinning: state.isFetchingArticles }); | |
export default connect(mapStateToProps)(Spinner); |
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
import { connect } from 'react-redux'; | |
import Spinner from 'components/Spinner'; | |
const mapStateToProps = state => ({ isSpinning: state.isArticleSubmitting }); | |
export default connect(mapStateToProps)(Spinner); |
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
import React from 'react'; | |
import { connect } from 'react-redux'; | |
import ImageCarousel from 'components/ImageCarousel'; | |
import Modal from 'components/Modal'; | |
const mapStateToProps = state => ({ | |
isOpen: state.modals.isImageModalOpen, | |
children: React.createElement(ImageCarousel, { images: state.images }) | |
}); |
OlderNewer