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
const chalk = require("chalk"); | |
const packages = [ | |
require("./package.json"), | |
require("./packages/cec-scripts/package.json"), | |
require("./packages/generator-cec/package.json"), | |
require("./packages/utility-cec-simulator/package.json") | |
]; | |
const compareDeps = p => { |
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
// Extends the return of the HTTPError class | |
class HTTPError extends Error { | |
readonly response: any; | |
readonly status: number; | |
readonly statusText: string; | |
constructor(status: number, statusText: string, response: any) { | |
super(statusText); | |
this.status = status; | |
this.statusText = statusText; |
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
const _toQueryString = params => | |
`?${Object.entries(params) | |
.map( | |
([key, value]) => | |
`${encodeURIComponent(key)}=${encodeURIComponent(value)}` | |
) | |
.join("&")}`; | |
// EDIT here if you prefer a storage implementation or a store subscription etc. | |
// you could actually also remove the getToken function and directly call it in the header below |
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 { Provider } from 'react-redux'; | |
import { applyMiddleware, compose, createStore } from 'redux'; | |
import thunk from 'redux-thunk'; | |
import rootReducer from './src/reducers'; | |
const loadDevTools = () => | |
process.env.NODE_ENV === 'development' && typeof window !== 'undefined' && window.devToolsExtension | |
? window.__REDUX_DEVTOOLS_EXTENSION__ && | |
window.__REDUX_DEVTOOLS_EXTENSION__() |