Skip to content

Instantly share code, notes, and snippets.

View arackaf's full-sized avatar
🏠
Working from home

Adam Rackis arackaf

🏠
Working from home
View GitHub Profile
import {DragSource, DragDropContext, DropTarget, DragLayer} from 'react-dnd';
@connect((state, ownProps) => {
return {
currentlyDragging: state.subjectsModule.draggingId
}
})
@DragLayer((monitor, x) => {
return {
item: monitor.getItem(),
const SmartEditor = () => <input placeholder="blah" />;
class PopoverEdit extends Component {
componentDidMount(){
$(this.anchorEl).popover({
content(evt){
let res = document.createElement('div');
render(<SmartEditor />, res);
return res;
},
let modulePromise = (() => {
switch(module.toLowerCase()){
case 'activate': return (System.import('./modules/activate/activate'));
case 'authenticate': return (System.import('./modules/authenticate/authenticate'));
case 'books': return (System.import('./modules/books/books'));
case 'home': return (System.import('./modules/home/home'));
case 'scan': return (System.import('./modules/scan/scan'));
case 'subjects': return (System.import('./modules/subjects/subjects'));
}
})();
var path = require('path');
var webpack = require('webpack');
module.exports = {
entry: './reactStartup.js',
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist')
},
resolve: {
var BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
var path = require('path');
var webpack = require('webpack');
module.exports = {
entry: './reactStartup.js',
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist')
},
var BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
var path = require('path');
var webpack = require('webpack');
module.exports = {
entry: './reactStartup.js',
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist')
},
var BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
var path = require('path');
var webpack = require('webpack');
module.exports = {
entry: './reactStartup.js',
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist')
},
var BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
var path = require('path');
var webpack = require('webpack');
module.exports = {
entry: './reactStartup.js',
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist')
},
entry: {
main: './reactStartup.js'
},
output: {
filename: '[name]-bundle.js',
chunkFilename: '[name]-chunk.js',
path: path.resolve(__dirname, 'dist'),
publicPath: 'react-redux/dist/'
},
devServer: {
proxy: {
"/subject": "http://localhost:3000",
"/tag": "http://localhost:3000",
"/book": "http://localhost:3000",
"/static": "http://localhost:3000"
}
}