Skip to content

Instantly share code, notes, and snippets.

View rohanBagchi's full-sized avatar

Rohan Bagchi rohanBagchi

View GitHub Profile
<html>
<head>
<title>Welcome | Fame Cinema</title>
</head>
<body ng-app="fameCinemaApp" ng-controller="BehaviourController as bController">
<div class="jumbotron">
<div class="container">
# Official framework image. Look for the different tagged releases at:
# https://hub.docker.com/r/library/node/tags/
image: node:latest
before_script:
- npm prune
- npm install
- npm install -g grunt-cli
- npm install -g firebase-tools
@rohanBagchi
rohanBagchi / package.json
Last active May 13, 2017 19:36
How to build React using Webpack package.json
{
"name": "webpack-poc",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
@rohanBagchi
rohanBagchi / index.html
Created May 13, 2017 18:28
Basic HTML to tryout webpack
<html>
<head>
<title>webpack poc</title>
</head>
<body>
<div id="app"></div>
<script src="./dist/bundle.js"></script>
</body>
</html>
@rohanBagchi
rohanBagchi / Hello.js
Created May 13, 2017 18:31
Basic react component
import React, {PropTypes} from 'react';
const Home = (props) => {
return (
<div>
Hello World
</div>
)
};
@rohanBagchi
rohanBagchi / index.js
Created May 13, 2017 18:34
basic webpack+react entry script
import React from 'react';
import ReactDOM from 'react-dom';
import Hello from './Hello';
const init = () => {
ReactDOM.render(
<Hello/>,
document.getElementById('app')
);
};
@rohanBagchi
rohanBagchi / webpack.config.js
Last active May 13, 2017 19:20
Basic webpack config
var path = require('path');
module.exports = {
entry: './app/index.js',
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist')
},
module: {
rules: [
@rohanBagchi
rohanBagchi / App.js
Created February 7, 2018 06:00
ReactNativeTodo App.js initial code
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
export default class App extends React.Component {
render() {
return (
<View style={styles.container}>
<Text>Shake your phone to open the developer menu.</Text>
</View>
);
@rohanBagchi
rohanBagchi / App.js
Last active February 16, 2018 05:34
UserList Updated with web workers
import worker from './app.worker.js';
import WebWorker from './WebWorker';
componentDidMount() {
this.worker = new WebWorker(worker);
this.worker.addEventListener('message', event => {
const sortedList = event.data;
this.setState({
users: sortedList
import React from 'react';
export default Icon = props => (
<i className={props.name}/>
);