Skip to content

Instantly share code, notes, and snippets.

@bhavinkamani
Created February 15, 2016 10:30
Show Gist options
  • Save bhavinkamani/7e4d72b2c8892783bd83 to your computer and use it in GitHub Desktop.
Save bhavinkamani/7e4d72b2c8892783bd83 to your computer and use it in GitHub Desktop.
http2 jspm config files
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<meta http-equiv="Content-Type" content="application/xhtml+xml">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href='https://fonts.googleapis.com/css?family=PT+Sans|PT+Sans+Caption' rel='stylesheet' type='text/css'>
<style type="text/css">
html, body {
margin: 0 auto;
font-family: 'PT Sans', sans-serif;
font-size: 16px;
}
div {
box-sizing: border-box;
position: relative;
display: flex;
flex-shrink: 0;
margin: 0;
padding: 0;
}
</style>
<script src="jspm_packages/system.js"></script>
<script src="jspm.browser.js"></script>
<script src="jspm.config.js"></script>
</head>
<body>
<div id="root"></div>
<script type="text/javascript">
// if (location.origin.match(/10.211.55.9|localhost/)) {
// System.trace = true;
// console.log("starting hot loader");
// System.import('jspm-hot-reloader').then(function (HotReloader) {
// new HotReloader.default(location.host);
// })
// }
SystemJS.import('jspm_17/main.prd.js');
</script>
</body>
</html>
SystemJSz .config({
baseURL: "/",
production: true,
paths: {
"github:*": "jspm_packages/github/*",
"npm:*": "jspm_packages/npm/*",
"vendor/": "src/vendor/",
"jspm_17/": "src/"
},
bundles: {
// "jspm_17/main.prd.js": [
// "jspm_17/component.js",
// "jspm_17/index.css!npm:[email protected]/index.js",
// "jspm_17/main.js",
// "npm:[email protected]",
// "npm:[email protected]",
// "npm:[email protected]/babel-helpers/classCallCheck.js",
// "npm:[email protected]/babel-helpers/createClass.js",
// "npm:[email protected]/babel-helpers/inherits.js",
// "npm:[email protected]/babel-helpers/possibleConstructorReturn.js"
// ],
"jspm_17/vendor/jspm-hot-reloader.js": [
"github:capaj/[email protected]",
"github:capaj/[email protected]/hot-reloader.js",
"github:jspm/[email protected]",
"github:jspm/[email protected]/process.js",
"github:socketio/[email protected]",
"github:socketio/[email protected]/socket.io.js",
"npm:[email protected]",
"npm:[email protected]/browser.js",
"npm:[email protected]/debug.js",
"npm:[email protected]",
"npm:[email protected]/index.js",
"npm:[email protected]",
"npm:[email protected]/babel-helpers/classCallCheck.js",
"npm:[email protected]/babel-helpers/createClass.js",
"npm:[email protected]/babel-helpers/inherits.js",
"npm:[email protected]/babel-helpers/possibleConstructorReturn.js",
"npm:[email protected]",
"npm:[email protected]/weakee.js"
],
"vendor/react.js": [
"github:jspm/[email protected]",
"github:jspm/[email protected]/process.js",
"npm:[email protected]",
"npm:[email protected]/lib/EventListener.js",
"npm:[email protected]/lib/ExecutionEnvironment.js",
"npm:[email protected]/lib/camelize.js",
"npm:[email protected]/lib/camelizeStyleName.js",
"npm:[email protected]/lib/containsNode.js",
"npm:[email protected]/lib/createArrayFromMixed.js",
"npm:[email protected]/lib/createNodesFromMarkup.js",
"npm:[email protected]/lib/emptyFunction.js",
"npm:[email protected]/lib/emptyObject.js",
"npm:[email protected]/lib/focusNode.js",
"npm:[email protected]/lib/getActiveElement.js",
"npm:[email protected]/lib/getMarkupWrap.js",
"npm:[email protected]/lib/getUnboundedScrollPosition.js",
"npm:[email protected]/lib/hyphenate.js",
"npm:[email protected]/lib/hyphenateStyleName.js",
"npm:[email protected]/lib/invariant.js",
"npm:[email protected]/lib/isNode.js",
"npm:[email protected]/lib/isTextNode.js",
"npm:[email protected]/lib/keyMirror.js",
"npm:[email protected]/lib/keyOf.js",
"npm:[email protected]/lib/mapObject.js",
"npm:[email protected]/lib/memoizeStringOnly.js",
"npm:[email protected]/lib/shallowEqual.js",
"npm:[email protected]/lib/toArray.js",
"npm:[email protected]/lib/warning.js",
"npm:[email protected]",
"npm:[email protected]/index.js",
"npm:[email protected]",
"npm:[email protected]/lib/AutoFocusUtils.js",
"npm:[email protected]/lib/BeforeInputEventPlugin.js",
"npm:[email protected]/lib/CSSProperty.js",
"npm:[email protected]/lib/CSSPropertyOperations.js",
"npm:[email protected]/lib/CallbackQueue.js",
"npm:[email protected]/lib/ChangeEventPlugin.js",
"npm:[email protected]/lib/ClientReactRootIndex.js",
"npm:[email protected]/lib/DOMChildrenOperations.js",
"npm:[email protected]/lib/DOMProperty.js",
"npm:[email protected]/lib/DOMPropertyOperations.js",
"npm:[email protected]/lib/Danger.js",
"npm:[email protected]/lib/DefaultEventPluginOrder.js",
"npm:[email protected]/lib/EnterLeaveEventPlugin.js",
"npm:[email protected]/lib/EventConstants.js",
"npm:[email protected]/lib/EventPluginHub.js",
"npm:[email protected]/lib/EventPluginRegistry.js",
"npm:[email protected]/lib/EventPluginUtils.js",
"npm:[email protected]/lib/EventPropagators.js",
"npm:[email protected]/lib/FallbackCompositionState.js",
"npm:[email protected]/lib/HTMLDOMPropertyConfig.js",
"npm:[email protected]/lib/LinkedValueUtils.js",
"npm:[email protected]/lib/Object.assign.js",
"npm:[email protected]/lib/PooledClass.js",
"npm:[email protected]/lib/React.js",
"npm:[email protected]/lib/ReactBrowserComponentMixin.js",
"npm:[email protected]/lib/ReactBrowserEventEmitter.js",
"npm:[email protected]/lib/ReactChildReconciler.js",
"npm:[email protected]/lib/ReactChildren.js",
"npm:[email protected]/lib/ReactClass.js",
"npm:[email protected]/lib/ReactComponent.js",
"npm:[email protected]/lib/ReactComponentBrowserEnvironment.js",
"npm:[email protected]/lib/ReactComponentEnvironment.js",
"npm:[email protected]/lib/ReactCompositeComponent.js",
"npm:[email protected]/lib/ReactCurrentOwner.js",
"npm:[email protected]/lib/ReactDOM.js",
"npm:[email protected]/lib/ReactDOMButton.js",
"npm:[email protected]/lib/ReactDOMComponent.js",
"npm:[email protected]/lib/ReactDOMFactories.js",
"npm:[email protected]/lib/ReactDOMFeatureFlags.js",
"npm:[email protected]/lib/ReactDOMIDOperations.js",
"npm:[email protected]/lib/ReactDOMInput.js",
"npm:[email protected]/lib/ReactDOMOption.js",
"npm:[email protected]/lib/ReactDOMSelect.js",
"npm:[email protected]/lib/ReactDOMSelection.js",
"npm:[email protected]/lib/ReactDOMServer.js",
"npm:[email protected]/lib/ReactDOMTextComponent.js",
"npm:[email protected]/lib/ReactDOMTextarea.js",
"npm:[email protected]/lib/ReactDefaultBatchingStrategy.js",
"npm:[email protected]/lib/ReactDefaultInjection.js",
"npm:[email protected]/lib/ReactElement.js",
"npm:[email protected]/lib/ReactElementValidator.js",
"npm:[email protected]/lib/ReactEmptyComponent.js",
"npm:[email protected]/lib/ReactEmptyComponentRegistry.js",
"npm:[email protected]/lib/ReactErrorUtils.js",
"npm:[email protected]/lib/ReactEventEmitterMixin.js",
"npm:[email protected]/lib/ReactEventListener.js",
"npm:[email protected]/lib/ReactInjection.js",
"npm:[email protected]/lib/ReactInputSelection.js",
"npm:[email protected]/lib/ReactInstanceHandles.js",
"npm:[email protected]/lib/ReactInstanceMap.js",
"npm:[email protected]/lib/ReactIsomorphic.js",
"npm:[email protected]/lib/ReactMarkupChecksum.js",
"npm:[email protected]/lib/ReactMount.js",
"npm:[email protected]/lib/ReactMultiChild.js",
"npm:[email protected]/lib/ReactMultiChildUpdateTypes.js",
"npm:[email protected]/lib/ReactNativeComponent.js",
"npm:[email protected]/lib/ReactNoopUpdateQueue.js",
"npm:[email protected]/lib/ReactOwner.js",
"npm:[email protected]/lib/ReactPerf.js",
"npm:[email protected]/lib/ReactPropTypeLocationNames.js",
"npm:[email protected]/lib/ReactPropTypeLocations.js",
"npm:[email protected]/lib/ReactPropTypes.js",
"npm:[email protected]/lib/ReactReconcileTransaction.js",
"npm:[email protected]/lib/ReactReconciler.js",
"npm:[email protected]/lib/ReactRef.js",
"npm:[email protected]/lib/ReactRootIndex.js",
"npm:[email protected]/lib/ReactServerBatchingStrategy.js",
"npm:[email protected]/lib/ReactServerRendering.js",
"npm:[email protected]/lib/ReactServerRenderingTransaction.js",
"npm:[email protected]/lib/ReactUpdateQueue.js",
"npm:[email protected]/lib/ReactUpdates.js",
"npm:[email protected]/lib/ReactVersion.js",
"npm:[email protected]/lib/SVGDOMPropertyConfig.js",
"npm:[email protected]/lib/SelectEventPlugin.js",
"npm:[email protected]/lib/ServerReactRootIndex.js",
"npm:[email protected]/lib/SimpleEventPlugin.js",
"npm:[email protected]/lib/SyntheticClipboardEvent.js",
"npm:[email protected]/lib/SyntheticCompositionEvent.js",
"npm:[email protected]/lib/SyntheticDragEvent.js",
"npm:[email protected]/lib/SyntheticEvent.js",
"npm:[email protected]/lib/SyntheticFocusEvent.js",
"npm:[email protected]/lib/SyntheticInputEvent.js",
"npm:[email protected]/lib/SyntheticKeyboardEvent.js",
"npm:[email protected]/lib/SyntheticMouseEvent.js",
"npm:[email protected]/lib/SyntheticTouchEvent.js",
"npm:[email protected]/lib/SyntheticUIEvent.js",
"npm:[email protected]/lib/SyntheticWheelEvent.js",
"npm:[email protected]/lib/Transaction.js",
"npm:[email protected]/lib/ViewportMetrics.js",
"npm:[email protected]/lib/accumulateInto.js",
"npm:[email protected]/lib/adler32.js",
"npm:[email protected]/lib/canDefineProperty.js",
"npm:[email protected]/lib/dangerousStyleValue.js",
"npm:[email protected]/lib/deprecated.js",
"npm:[email protected]/lib/escapeTextContentForBrowser.js",
"npm:[email protected]/lib/findDOMNode.js",
"npm:[email protected]/lib/flattenChildren.js",
"npm:[email protected]/lib/forEachAccumulated.js",
"npm:[email protected]/lib/getEventCharCode.js",
"npm:[email protected]/lib/getEventKey.js",
"npm:[email protected]/lib/getEventModifierState.js",
"npm:[email protected]/lib/getEventTarget.js",
"npm:[email protected]/lib/getIteratorFn.js",
"npm:[email protected]/lib/getNodeForCharacterOffset.js",
"npm:[email protected]/lib/getTextContentAccessor.js",
"npm:[email protected]/lib/instantiateReactComponent.js",
"npm:[email protected]/lib/isEventSupported.js",
"npm:[email protected]/lib/isTextInputElement.js",
"npm:[email protected]/lib/onlyChild.js",
"npm:[email protected]/lib/quoteAttributeValueForBrowser.js",
"npm:[email protected]/lib/renderSubtreeIntoContainer.js",
"npm:[email protected]/lib/setInnerHTML.js",
"npm:[email protected]/lib/setTextContent.js",
"npm:[email protected]/lib/shouldUpdateReactComponent.js",
"npm:[email protected]/lib/traverseAllChildren.js",
"npm:[email protected]/lib/validateDOMNesting.js",
"npm:[email protected]/react.js"
]
}
});
SystemJS.config({
packageConfigPaths: [
"npm:@*/*.json",
"npm:*.json",
"github:*/*.json"
],
globalEvaluationScope: false,
transpiler: "none",
map: {
"css": "npm:[email protected]",
"jspm-hot-reloader": "github:capaj/[email protected]",
"react": "npm:[email protected]",
"react-dom": "npm:[email protected]",
},
packages: {
"jspm_17": {
"meta": {
"*.js": {
"format": "register"
}
}
},
"github:capaj/[email protected]": {
"map": {
"debug": "npm:[email protected]",
"socket.io-client": "github:socketio/[email protected]",
"weakee": "npm:[email protected]"
}
},
"github:jspm/[email protected]": {
"map": {
"buffer-browserify": "npm:[email protected]"
}
},
"github:jspm/[email protected]": {
"map": {
"stream-browserify": "npm:[email protected]"
}
},
"npm:[email protected]": {
"map": {
"babel-runtime": "npm:[email protected]",
"chalk": "npm:[email protected]",
"esutils": "npm:[email protected]",
"js-tokens": "npm:[email protected]",
"line-numbers": "npm:[email protected]",
"repeating": "npm:[email protected]"
}
},
"npm:[email protected]": {
"map": {
"babel-runtime": "npm:[email protected]",
"babel-types": "npm:[email protected]",
"esutils": "npm:[email protected]",
"lodash": "npm:[email protected]"
}
},
"npm:[email protected]": {
"map": {
"babel-runtime": "npm:[email protected]"
}
},
"npm:[email protected]": {
"map": {
"babel-runtime": "npm:[email protected]"
}
},
"npm:[email protected]": {
"map": {
"babel-helper-builder-react-jsx": "npm:[email protected]",
"babel-plugin-syntax-jsx": "npm:[email protected]",
"babel-runtime": "npm:[email protected]"
}
},
"npm:[email protected]": {
"map": {
"babel-code-frame": "npm:[email protected]",
"babel-messages": "npm:[email protected]",
"babel-runtime": "npm:[email protected]",
"babel-types": "npm:[email protected]",
"babylon": "npm:[email protected]",
"debug": "npm:[email protected]",
"globals": "npm:[email protected]",
"invariant": "npm:[email protected]",
"lodash": "npm:[email protected]",
"repeating": "npm:[email protected]"
}
},
"npm:[email protected]": {
"map": {
"babel-runtime": "npm:[email protected]",
"babel-traverse": "npm:[email protected]",
"esutils": "npm:[email protected]",
"lodash": "npm:[email protected]",
"to-fast-properties": "npm:[email protected]"
}
},
"npm:[email protected]": {
"map": {
"babel-runtime": "npm:[email protected]"
}
},
"npm:[email protected]": {
"map": {
"base64-js": "npm:[email protected]",
"ieee754": "npm:[email protected]",
"isarray": "npm:[email protected]"
}
},
"npm:[email protected]": {
"map": {
"ansi-styles": "npm:[email protected]",
"escape-string-regexp": "npm:[email protected]",
"has-ansi": "npm:[email protected]",
"strip-ansi": "npm:[email protected]",
"supports-color": "npm:[email protected]"
}
},
"npm:[email protected]": {
"map": {
"icss-replace-symbols": "npm:[email protected]",
"postcss": "npm:[email protected]",
"postcss-modules-extract-imports": "npm:[email protected]",
"postcss-modules-local-by-default": "npm:[email protected]",
"postcss-modules-scope": "npm:[email protected]",
"postcss-modules-values": "npm:[email protected]"
}
},
"npm:[email protected]": {
"map": {
"cssesc": "npm:[email protected]",
"fastparse": "npm:[email protected]"
}
},
"npm:[email protected]": {
"map": {
"date-now": "npm:[email protected]"
}
},
"npm:[email protected]": {
"map": {
"ms": "npm:[email protected]"
}
},
"npm:[email protected]": {
"map": {
"ansi-regex": "npm:[email protected]"
}
},
"npm:[email protected]": {
"map": {
"loose-envify": "npm:[email protected]"
}
},
"npm:[email protected]": {
"map": {
"number-is-nan": "npm:[email protected]"
}
},
"npm:[email protected]": {
"map": {
"jspm-loader-css": "npm:[email protected]"
}
},
"npm:[email protected]": {
"map": {
"css-modules-loader-core": "npm:[email protected]",
"debounce": "npm:[email protected]",
"path": "npm:[email protected]",
"toposort": "npm:[email protected]"
}
},
"npm:[email protected]": {
"map": {
"left-pad": "npm:[email protected]"
}
},
"npm:[email protected]": {
"map": {
"js-tokens": "npm:[email protected]"
}
},
"npm:[email protected]": {
"map": {
"process": "npm:[email protected]",
"util": "npm:[email protected]"
}
},
"npm:[email protected]": {
"map": {
"postcss": "npm:[email protected]"
}
},
"npm:[email protected]": {
"map": {
"css-selector-tokenizer": "npm:[email protected]",
"postcss": "npm:[email protected]"
}
},
"npm:[email protected]": {
"map": {
"css-selector-tokenizer": "npm:[email protected]",
"postcss": "npm:[email protected]"
}
},
"npm:[email protected]": {
"map": {
"icss-replace-symbols": "npm:[email protected]",
"postcss": "npm:[email protected]"
}
},
"npm:[email protected]": {
"map": {
"js-base64": "npm:[email protected]",
"source-map": "npm:[email protected]",
"supports-color": "npm:[email protected]"
}
},
"npm:[email protected]": {
"map": {
"fbjs": "npm:[email protected]"
}
},
"npm:[email protected]": {
"map": {
"core-util-is": "npm:[email protected]",
"inherits": "npm:[email protected]",
"isarray": "npm:[email protected]",
"process-nextick-args": "npm:[email protected]",
"string_decoder": "npm:[email protected]",
"util-deprecate": "npm:[email protected]"
}
},
"npm:[email protected]": {
"map": {
"is-finite": "npm:[email protected]"
}
},
"npm:[email protected]": {
"map": {
"inherits": "npm:[email protected]",
"readable-stream": "npm:[email protected]"
}
},
"npm:[email protected]": {
"map": {
"ansi-regex": "npm:[email protected]"
}
},
"npm:[email protected]": {
"map": {
"has-flag": "npm:[email protected]"
}
},
"npm:[email protected]": {
"map": {
"inherits": "npm:[email protected]"
}
}
}
});
System.register("npm:[email protected]/babel-helpers/classCallCheck.js", [], function($__export) {
"use strict";
return {
setters: [],
execute: function() {
$__export('default', (function(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}));
}
};
});
System.register("npm:[email protected]/babel-helpers/createClass.js", [], function($__export) {
"use strict";
return {
setters: [],
execute: function() {
$__export('default', (function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
descriptor.configurable = true;
if ("value" in descriptor)
descriptor.writable = true;
Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
if (protoProps)
defineProperties(Constructor.prototype, protoProps);
if (staticProps)
defineProperties(Constructor, staticProps);
return Constructor;
};
})());
}
};
});
System.register("npm:[email protected]/babel-helpers/possibleConstructorReturn.js", [], function($__export) {
"use strict";
return {
setters: [],
execute: function() {
$__export('default', (function(self, call) {
if (!self) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}
return call && (typeof call === "object" || typeof call === "function") ? call : self;
}));
}
};
});
System.registerDynamic("npm:[email protected]", [], false, function() {
return {
"main": "plugin-babel.js",
"map": {
"systemjs-babel-build": {
"browser": "./systemjs-babel-browser.js"
}
},
"meta": {
"./plugin-babel.js": {
"format": "cjs"
}
}
};
});
System.register("npm:[email protected]/babel-helpers/inherits.js", [], function($__export) {
"use strict";
return {
setters: [],
execute: function() {
$__export('default', (function(subClass, superClass) {
if (typeof superClass !== "function" && superClass !== null) {
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
}
subClass.prototype = Object.create(superClass && superClass.prototype, {constructor: {
value: subClass,
enumerable: false,
writable: true,
configurable: true
}});
if (superClass)
Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
}));
}
};
});
System.registerDynamic("npm:[email protected]", [], false, function() {
return {
"format": "es6",
"main": "index.js",
"meta": {
"*": {
"globals": {
"process": "process"
}
},
"*.json": {
"format": "json"
}
}
};
});
System.register("jspm_17/index.css!npm:[email protected]/index.js", [], function($__export) {
"use strict";
return {
setters: [],
execute: function() {
$__export('default', {"about": "_src_index__about"});
}
};
});
System.register("jspm_17/component.js", ["npm:[email protected]/babel-helpers/classCallCheck.js", "npm:[email protected]/babel-helpers/createClass.js", "npm:[email protected]/babel-helpers/possibleConstructorReturn.js", "npm:[email protected]/babel-helpers/inherits.js", "react", "./index.css!"], function($__export) {
"use strict";
var _classCallCheck,
_createClass,
_possibleConstructorReturn,
_inherits,
React,
styles,
HelloWorld;
return {
setters: [function($__m) {
_classCallCheck = $__m.default;
}, function($__m) {
_createClass = $__m.default;
}, function($__m) {
_possibleConstructorReturn = $__m.default;
}, function($__m) {
_inherits = $__m.default;
}, function($__m) {
React = $__m.default;
}, function($__m) {
styles = $__m.default;
}],
execute: function() {
HelloWorld = (function(_React$Component) {
_inherits(HelloWorld, _React$Component);
function HelloWorld() {
_classCallCheck(this, HelloWorld);
return _possibleConstructorReturn(this, Object.getPrototypeOf(HelloWorld).apply(this, arguments));
}
_createClass(HelloWorld, [{
key: 'render',
value: function render() {
return React.createElement('h1', {className: styles.about}, 'Hello World');
}
}]);
return HelloWorld;
})(React.Component);
$__export("HelloWorld", HelloWorld);
}
};
});
System.register("jspm_17/main.js", ["react", "react-dom", "jspm_17/component.js"], function($__export) {
"use strict";
var React,
ReactDOM,
HelloWorld,
container,
component;
return {
setters: [function($__m) {
React = $__m.default;
}, function($__m) {
ReactDOM = $__m.default;
}, function($__m) {
HelloWorld = $__m.HelloWorld;
}],
execute: function() {
container = document.getElementById('root');
component = ReactDOM.render(React.createElement(HelloWorld), container);
$__export('default', component);
}
};
});
// Fake file definitions
System.register('jspm_17/index.css!npm:[email protected]/index.js', [], function() { return { setters: [], execute: function() {}}});
// Inject all the css
(function(c){if (typeof document == 'undefined') return; var d=document,a='appendChild',i='styleSheet',s=d.createElement('style');s.type='text/css';d.getElementsByTagName('head')[0][a](s);s[i]?s[i].cssText=c:s[a](d.createTextNode(c));})
('._src_index__about {\n color: red;\n}\n');
//# sourceMappingURL=main.prd.js.map
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment