Button.js
import { connect, actions } from 'mirrorx'
const Button = ({value, handleClick}) => (
<button onClick={handleClick}>
{value}| <html ng-app="demoApp"> | |
| <script type="text/javascript"> | |
| angular.module('demoApp', ['ngMessages']); // include ngMessages module | |
| angular | |
| .module('htmlxprs', []) | |
| .directive('usernameValidator', function () { | |
| return { | |
| restrict: 'AE', | |
| require: 'ngModel', | |
| link: function ($scope, elem, attrs, ngModel) { |
| 'use strict'; | |
| // 1. Revealing Module Pattern | |
| var revModule = function (param) { | |
| return { | |
| // public | |
| funk: funk | |
| }; | |
| // private |
| <!-- prevents copying --> | |
| <body ondragstart="return false;" onselectstart="return false;" oncontextmenu="return false;" onload="clearData();" | |
| onblur="clearData();"> | |
| <script type="text/javascript"> | |
| // IE fix for unselectable | |
| var elem = document.getElementById("resume"); | |
| elem.unselectable = "on"; // For IE and Opera | |
| </script> |
| <!-- Angular picture-fill: https://github.com/tinacious/angular-picturefill --> | |
| <!-- ng.pictureFill --> | |
| <span picture-fill data-alt="Image Description"> | |
| <span pf-src="images/image.png" data-media="(min-width: 1px)"></span> | |
| <span pf-src="images/image-600.png" data-media="(min-width: 645px)"></span> | |
| <span pf-src="images/image-1024.png" data-media="(min-width: 960px)"></span> | |
| </span> | |
| <span picture-fill data-alt="{{post.thumbnail.description}}" ng-if="post.thumbnail"> |
| // Atom Styles | |
| // theme: one-dark | |
| // syntax: apm install oceanic-next | |
| atom-text-editor, | |
| atom-workspace { | |
| font-family: "Fira Code"; // https://github.com/tonsky/FiraCode | |
| font-size: 14px; | |
| line-height: 1.7; | |
| } |
| { | |
| "name": "live-reload-npm-scripts", | |
| "version": "1.0.0", | |
| "description": "Run 'npm start' to begin developing", | |
| "main": "src/index.js", | |
| "scripts": { | |
| "browserify": "browserify src/index.js -o dist/bundle.js -t [ babelify --presets [ es2015 ] ]", | |
| "browsersync:start": "browser-sync start --server --files 'index.html dist/bundle.js'", | |
| "browsersync:reload": "browser-sync reload", | |
| "reload": "npm run browserify && npm run browsersync:reload", |
| if which yarn > /dev/null; then | |
| yarn | |
| else | |
| npm install | |
| fi |
| # NPM Unfuck | |
| # Brought to you by: | |
| # Mackenzie Kieran & Shawn McKay | |
| # remove deps | |
| rm -rf node_modules | |
| npm cache clean | |
| # lock dependencies |
Button.js
import { connect, actions } from 'mirrorx'
const Button = ({value, handleClick}) => (
<button onClick={handleClick}>
{value}| class Store { | |
| constructor(reducers = {}, initialState = {}, middleware = []) { | |
| this.state = initialState | |
| this.reducers = reducers | |
| this.subscriptions = [] | |
| this.middlewares = middlewares | |
| } | |
| getState() { | |
| return this.state | |
| } |