Adding dev and build scripts
This commit is contained in:
parent
55b425eccc
commit
21bee9fd9b
|
@ -1,7 +1,17 @@
|
|||
const autoprefixer = require('autoprefixer');
|
||||
const cssvars = require('postcss-simple-vars');
|
||||
const webpack = require('webpack');
|
||||
const HtmlWebPackPlugin = require("html-webpack-plugin");
|
||||
|
||||
const paths = require('./paths');
|
||||
const getClientEnvironment = require('./env');
|
||||
|
||||
// `publicUrl` we will provide it to our app
|
||||
// as %PUBLIC_URL% in `index.html` and `process.env.PUBLIC_URL` in JavaScript.
|
||||
// Omit trailing slash as %PUBLIC_PATH%/xyz looks better than %PUBLIC_PATH%xyz.
|
||||
var publicUrl = '';
|
||||
// Get environment variables to inject into our app.
|
||||
var env = getClientEnvironment(publicUrl);
|
||||
|
||||
const cssvariables = require(paths.appSrc + '/theme/variables');
|
||||
|
||||
|
@ -71,7 +81,8 @@ module.exports = {
|
|||
plugins: [
|
||||
new HtmlWebPackPlugin({
|
||||
template: paths.appHtml,
|
||||
filename: "./index.html"
|
||||
})
|
||||
}),
|
||||
new webpack.DefinePlugin(env),
|
||||
new webpack.HotModuleReplacementPlugin(),
|
||||
]
|
||||
};
|
||||
|
|
|
@ -1 +1 @@
|
|||
<!DOCTYPE html> <html lang=en> <head> <meta charset=utf-8> <meta name=viewport content="width=device-width,initial-scale=1"> <link rel="shortcut icon" href=%PUBLIC_URL%/favicon.ico> <link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700" rel=stylesheet> <link rel=stylesheet href="https://fonts.googleapis.com/icon?family=Material+Icons"> <title>Multisig Safe</title> </head> <body> <div id=root></div> <script type="text/javascript" src="main.js"></script></body> </html>
|
||||
<!DOCTYPE html> <html lang=en> <head> <meta charset=utf-8> <meta name=viewport content="width=device-width,initial-scale=1"> <link rel="shortcut icon" href=favicon.ico> <link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700" rel=stylesheet> <link rel=stylesheet href="https://fonts.googleapis.com/icon?family=Material+Icons"> <title>Multisig Safe</title> </head> <body> <div id=root></div> <script type="text/javascript" src="main.js"></script></body> </html>
|
|
@ -1,4 +1,691 @@
|
|||
/******/ (function(modules) { // webpackBootstrap
|
||||
/******/ function hotDisposeChunk(chunkId) {
|
||||
/******/ delete installedChunks[chunkId];
|
||||
/******/ }
|
||||
/******/ var parentHotUpdateCallback = window["webpackHotUpdate"];
|
||||
/******/ window["webpackHotUpdate"] = // eslint-disable-next-line no-unused-vars
|
||||
/******/ function webpackHotUpdateCallback(chunkId, moreModules) {
|
||||
/******/ hotAddUpdateChunk(chunkId, moreModules);
|
||||
/******/ if (parentHotUpdateCallback) parentHotUpdateCallback(chunkId, moreModules);
|
||||
/******/ } ;
|
||||
/******/
|
||||
/******/ // eslint-disable-next-line no-unused-vars
|
||||
/******/ function hotDownloadUpdateChunk(chunkId) {
|
||||
/******/ var head = document.getElementsByTagName("head")[0];
|
||||
/******/ var script = document.createElement("script");
|
||||
/******/ script.charset = "utf-8";
|
||||
/******/ script.src = __webpack_require__.p + "" + chunkId + "." + hotCurrentHash + ".hot-update.js";
|
||||
/******/ ;
|
||||
/******/ head.appendChild(script);
|
||||
/******/ }
|
||||
/******/
|
||||
/******/ // eslint-disable-next-line no-unused-vars
|
||||
/******/ function hotDownloadManifest(requestTimeout) {
|
||||
/******/ requestTimeout = requestTimeout || 10000;
|
||||
/******/ return new Promise(function(resolve, reject) {
|
||||
/******/ if (typeof XMLHttpRequest === "undefined")
|
||||
/******/ return reject(new Error("No browser support"));
|
||||
/******/ try {
|
||||
/******/ var request = new XMLHttpRequest();
|
||||
/******/ var requestPath = __webpack_require__.p + "" + hotCurrentHash + ".hot-update.json";
|
||||
/******/ request.open("GET", requestPath, true);
|
||||
/******/ request.timeout = requestTimeout;
|
||||
/******/ request.send(null);
|
||||
/******/ } catch (err) {
|
||||
/******/ return reject(err);
|
||||
/******/ }
|
||||
/******/ request.onreadystatechange = function() {
|
||||
/******/ if (request.readyState !== 4) return;
|
||||
/******/ if (request.status === 0) {
|
||||
/******/ // timeout
|
||||
/******/ reject(
|
||||
/******/ new Error("Manifest request to " + requestPath + " timed out.")
|
||||
/******/ );
|
||||
/******/ } else if (request.status === 404) {
|
||||
/******/ // no update available
|
||||
/******/ resolve();
|
||||
/******/ } else if (request.status !== 200 && request.status !== 304) {
|
||||
/******/ // other failure
|
||||
/******/ reject(new Error("Manifest request to " + requestPath + " failed."));
|
||||
/******/ } else {
|
||||
/******/ // success
|
||||
/******/ try {
|
||||
/******/ var update = JSON.parse(request.responseText);
|
||||
/******/ } catch (e) {
|
||||
/******/ reject(e);
|
||||
/******/ return;
|
||||
/******/ }
|
||||
/******/ resolve(update);
|
||||
/******/ }
|
||||
/******/ };
|
||||
/******/ });
|
||||
/******/ }
|
||||
/******/
|
||||
/******/ var hotApplyOnUpdate = true;
|
||||
/******/ var hotCurrentHash = "2d4e0a0c1e355481b1c5"; // eslint-disable-line no-unused-vars
|
||||
/******/ var hotRequestTimeout = 10000;
|
||||
/******/ var hotCurrentModuleData = {};
|
||||
/******/ var hotCurrentChildModule; // eslint-disable-line no-unused-vars
|
||||
/******/ var hotCurrentParents = []; // eslint-disable-line no-unused-vars
|
||||
/******/ var hotCurrentParentsTemp = []; // eslint-disable-line no-unused-vars
|
||||
/******/
|
||||
/******/ // eslint-disable-next-line no-unused-vars
|
||||
/******/ function hotCreateRequire(moduleId) {
|
||||
/******/ var me = installedModules[moduleId];
|
||||
/******/ if (!me) return __webpack_require__;
|
||||
/******/ var fn = function(request) {
|
||||
/******/ if (me.hot.active) {
|
||||
/******/ if (installedModules[request]) {
|
||||
/******/ if (!installedModules[request].parents.includes(moduleId))
|
||||
/******/ installedModules[request].parents.push(moduleId);
|
||||
/******/ } else {
|
||||
/******/ hotCurrentParents = [moduleId];
|
||||
/******/ hotCurrentChildModule = request;
|
||||
/******/ }
|
||||
/******/ if (!me.children.includes(request)) me.children.push(request);
|
||||
/******/ } else {
|
||||
/******/ console.warn(
|
||||
/******/ "[HMR] unexpected require(" +
|
||||
/******/ request +
|
||||
/******/ ") from disposed module " +
|
||||
/******/ moduleId
|
||||
/******/ );
|
||||
/******/ hotCurrentParents = [];
|
||||
/******/ }
|
||||
/******/ return __webpack_require__(request);
|
||||
/******/ };
|
||||
/******/ var ObjectFactory = function ObjectFactory(name) {
|
||||
/******/ return {
|
||||
/******/ configurable: true,
|
||||
/******/ enumerable: true,
|
||||
/******/ get: function() {
|
||||
/******/ return __webpack_require__[name];
|
||||
/******/ },
|
||||
/******/ set: function(value) {
|
||||
/******/ __webpack_require__[name] = value;
|
||||
/******/ }
|
||||
/******/ };
|
||||
/******/ };
|
||||
/******/ for (var name in __webpack_require__) {
|
||||
/******/ if (
|
||||
/******/ Object.prototype.hasOwnProperty.call(__webpack_require__, name) &&
|
||||
/******/ name !== "e"
|
||||
/******/ ) {
|
||||
/******/ Object.defineProperty(fn, name, ObjectFactory(name));
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ fn.e = function(chunkId) {
|
||||
/******/ if (hotStatus === "ready") hotSetStatus("prepare");
|
||||
/******/ hotChunksLoading++;
|
||||
/******/ return __webpack_require__.e(chunkId).then(finishChunkLoading, function(err) {
|
||||
/******/ finishChunkLoading();
|
||||
/******/ throw err;
|
||||
/******/ });
|
||||
/******/
|
||||
/******/ function finishChunkLoading() {
|
||||
/******/ hotChunksLoading--;
|
||||
/******/ if (hotStatus === "prepare") {
|
||||
/******/ if (!hotWaitingFilesMap[chunkId]) {
|
||||
/******/ hotEnsureUpdateChunk(chunkId);
|
||||
/******/ }
|
||||
/******/ if (hotChunksLoading === 0 && hotWaitingFiles === 0) {
|
||||
/******/ hotUpdateDownloaded();
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ };
|
||||
/******/ return fn;
|
||||
/******/ }
|
||||
/******/
|
||||
/******/ // eslint-disable-next-line no-unused-vars
|
||||
/******/ function hotCreateModule(moduleId) {
|
||||
/******/ var hot = {
|
||||
/******/ // private stuff
|
||||
/******/ _acceptedDependencies: {},
|
||||
/******/ _declinedDependencies: {},
|
||||
/******/ _selfAccepted: false,
|
||||
/******/ _selfDeclined: false,
|
||||
/******/ _disposeHandlers: [],
|
||||
/******/ _main: hotCurrentChildModule !== moduleId,
|
||||
/******/
|
||||
/******/ // Module API
|
||||
/******/ active: true,
|
||||
/******/ accept: function(dep, callback) {
|
||||
/******/ if (typeof dep === "undefined") hot._selfAccepted = true;
|
||||
/******/ else if (typeof dep === "function") hot._selfAccepted = dep;
|
||||
/******/ else if (typeof dep === "object")
|
||||
/******/ for (var i = 0; i < dep.length; i++)
|
||||
/******/ hot._acceptedDependencies[dep[i]] = callback || function() {};
|
||||
/******/ else hot._acceptedDependencies[dep] = callback || function() {};
|
||||
/******/ },
|
||||
/******/ decline: function(dep) {
|
||||
/******/ if (typeof dep === "undefined") hot._selfDeclined = true;
|
||||
/******/ else if (typeof dep === "object")
|
||||
/******/ for (var i = 0; i < dep.length; i++)
|
||||
/******/ hot._declinedDependencies[dep[i]] = true;
|
||||
/******/ else hot._declinedDependencies[dep] = true;
|
||||
/******/ },
|
||||
/******/ dispose: function(callback) {
|
||||
/******/ hot._disposeHandlers.push(callback);
|
||||
/******/ },
|
||||
/******/ addDisposeHandler: function(callback) {
|
||||
/******/ hot._disposeHandlers.push(callback);
|
||||
/******/ },
|
||||
/******/ removeDisposeHandler: function(callback) {
|
||||
/******/ var idx = hot._disposeHandlers.indexOf(callback);
|
||||
/******/ if (idx >= 0) hot._disposeHandlers.splice(idx, 1);
|
||||
/******/ },
|
||||
/******/
|
||||
/******/ // Management API
|
||||
/******/ check: hotCheck,
|
||||
/******/ apply: hotApply,
|
||||
/******/ status: function(l) {
|
||||
/******/ if (!l) return hotStatus;
|
||||
/******/ hotStatusHandlers.push(l);
|
||||
/******/ },
|
||||
/******/ addStatusHandler: function(l) {
|
||||
/******/ hotStatusHandlers.push(l);
|
||||
/******/ },
|
||||
/******/ removeStatusHandler: function(l) {
|
||||
/******/ var idx = hotStatusHandlers.indexOf(l);
|
||||
/******/ if (idx >= 0) hotStatusHandlers.splice(idx, 1);
|
||||
/******/ },
|
||||
/******/
|
||||
/******/ //inherit from previous dispose call
|
||||
/******/ data: hotCurrentModuleData[moduleId]
|
||||
/******/ };
|
||||
/******/ hotCurrentChildModule = undefined;
|
||||
/******/ return hot;
|
||||
/******/ }
|
||||
/******/
|
||||
/******/ var hotStatusHandlers = [];
|
||||
/******/ var hotStatus = "idle";
|
||||
/******/
|
||||
/******/ function hotSetStatus(newStatus) {
|
||||
/******/ hotStatus = newStatus;
|
||||
/******/ for (var i = 0; i < hotStatusHandlers.length; i++)
|
||||
/******/ hotStatusHandlers[i].call(null, newStatus);
|
||||
/******/ }
|
||||
/******/
|
||||
/******/ // while downloading
|
||||
/******/ var hotWaitingFiles = 0;
|
||||
/******/ var hotChunksLoading = 0;
|
||||
/******/ var hotWaitingFilesMap = {};
|
||||
/******/ var hotRequestedFilesMap = {};
|
||||
/******/ var hotAvailableFilesMap = {};
|
||||
/******/ var hotDeferred;
|
||||
/******/
|
||||
/******/ // The update info
|
||||
/******/ var hotUpdate, hotUpdateNewHash;
|
||||
/******/
|
||||
/******/ function toModuleId(id) {
|
||||
/******/ var isNumber = +id + "" === id;
|
||||
/******/ return isNumber ? +id : id;
|
||||
/******/ }
|
||||
/******/
|
||||
/******/ function hotCheck(apply) {
|
||||
/******/ if (hotStatus !== "idle")
|
||||
/******/ throw new Error("check() is only allowed in idle status");
|
||||
/******/ hotApplyOnUpdate = apply;
|
||||
/******/ hotSetStatus("check");
|
||||
/******/ return hotDownloadManifest(hotRequestTimeout).then(function(update) {
|
||||
/******/ if (!update) {
|
||||
/******/ hotSetStatus("idle");
|
||||
/******/ return null;
|
||||
/******/ }
|
||||
/******/ hotRequestedFilesMap = {};
|
||||
/******/ hotWaitingFilesMap = {};
|
||||
/******/ hotAvailableFilesMap = update.c;
|
||||
/******/ hotUpdateNewHash = update.h;
|
||||
/******/
|
||||
/******/ hotSetStatus("prepare");
|
||||
/******/ var promise = new Promise(function(resolve, reject) {
|
||||
/******/ hotDeferred = {
|
||||
/******/ resolve: resolve,
|
||||
/******/ reject: reject
|
||||
/******/ };
|
||||
/******/ });
|
||||
/******/ hotUpdate = {};
|
||||
/******/ var chunkId = "main";
|
||||
/******/ {
|
||||
/******/ // eslint-disable-line no-lone-blocks
|
||||
/******/ /*globals chunkId */
|
||||
/******/ hotEnsureUpdateChunk(chunkId);
|
||||
/******/ }
|
||||
/******/ if (
|
||||
/******/ hotStatus === "prepare" &&
|
||||
/******/ hotChunksLoading === 0 &&
|
||||
/******/ hotWaitingFiles === 0
|
||||
/******/ ) {
|
||||
/******/ hotUpdateDownloaded();
|
||||
/******/ }
|
||||
/******/ return promise;
|
||||
/******/ });
|
||||
/******/ }
|
||||
/******/
|
||||
/******/ // eslint-disable-next-line no-unused-vars
|
||||
/******/ function hotAddUpdateChunk(chunkId, moreModules) {
|
||||
/******/ if (!hotAvailableFilesMap[chunkId] || !hotRequestedFilesMap[chunkId])
|
||||
/******/ return;
|
||||
/******/ hotRequestedFilesMap[chunkId] = false;
|
||||
/******/ for (var moduleId in moreModules) {
|
||||
/******/ if (Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {
|
||||
/******/ hotUpdate[moduleId] = moreModules[moduleId];
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ if (--hotWaitingFiles === 0 && hotChunksLoading === 0) {
|
||||
/******/ hotUpdateDownloaded();
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/
|
||||
/******/ function hotEnsureUpdateChunk(chunkId) {
|
||||
/******/ if (!hotAvailableFilesMap[chunkId]) {
|
||||
/******/ hotWaitingFilesMap[chunkId] = true;
|
||||
/******/ } else {
|
||||
/******/ hotRequestedFilesMap[chunkId] = true;
|
||||
/******/ hotWaitingFiles++;
|
||||
/******/ hotDownloadUpdateChunk(chunkId);
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/
|
||||
/******/ function hotUpdateDownloaded() {
|
||||
/******/ hotSetStatus("ready");
|
||||
/******/ var deferred = hotDeferred;
|
||||
/******/ hotDeferred = null;
|
||||
/******/ if (!deferred) return;
|
||||
/******/ if (hotApplyOnUpdate) {
|
||||
/******/ // Wrap deferred object in Promise to mark it as a well-handled Promise to
|
||||
/******/ // avoid triggering uncaught exception warning in Chrome.
|
||||
/******/ // See https://bugs.chromium.org/p/chromium/issues/detail?id=465666
|
||||
/******/ Promise.resolve()
|
||||
/******/ .then(function() {
|
||||
/******/ return hotApply(hotApplyOnUpdate);
|
||||
/******/ })
|
||||
/******/ .then(
|
||||
/******/ function(result) {
|
||||
/******/ deferred.resolve(result);
|
||||
/******/ },
|
||||
/******/ function(err) {
|
||||
/******/ deferred.reject(err);
|
||||
/******/ }
|
||||
/******/ );
|
||||
/******/ } else {
|
||||
/******/ var outdatedModules = [];
|
||||
/******/ for (var id in hotUpdate) {
|
||||
/******/ if (Object.prototype.hasOwnProperty.call(hotUpdate, id)) {
|
||||
/******/ outdatedModules.push(toModuleId(id));
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ deferred.resolve(outdatedModules);
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/
|
||||
/******/ function hotApply(options) {
|
||||
/******/ if (hotStatus !== "ready")
|
||||
/******/ throw new Error("apply() is only allowed in ready status");
|
||||
/******/ options = options || {};
|
||||
/******/
|
||||
/******/ var cb;
|
||||
/******/ var i;
|
||||
/******/ var j;
|
||||
/******/ var module;
|
||||
/******/ var moduleId;
|
||||
/******/
|
||||
/******/ function getAffectedStuff(updateModuleId) {
|
||||
/******/ var outdatedModules = [updateModuleId];
|
||||
/******/ var outdatedDependencies = {};
|
||||
/******/
|
||||
/******/ var queue = outdatedModules.slice().map(function(id) {
|
||||
/******/ return {
|
||||
/******/ chain: [id],
|
||||
/******/ id: id
|
||||
/******/ };
|
||||
/******/ });
|
||||
/******/ while (queue.length > 0) {
|
||||
/******/ var queueItem = queue.pop();
|
||||
/******/ var moduleId = queueItem.id;
|
||||
/******/ var chain = queueItem.chain;
|
||||
/******/ module = installedModules[moduleId];
|
||||
/******/ if (!module || module.hot._selfAccepted) continue;
|
||||
/******/ if (module.hot._selfDeclined) {
|
||||
/******/ return {
|
||||
/******/ type: "self-declined",
|
||||
/******/ chain: chain,
|
||||
/******/ moduleId: moduleId
|
||||
/******/ };
|
||||
/******/ }
|
||||
/******/ if (module.hot._main) {
|
||||
/******/ return {
|
||||
/******/ type: "unaccepted",
|
||||
/******/ chain: chain,
|
||||
/******/ moduleId: moduleId
|
||||
/******/ };
|
||||
/******/ }
|
||||
/******/ for (var i = 0; i < module.parents.length; i++) {
|
||||
/******/ var parentId = module.parents[i];
|
||||
/******/ var parent = installedModules[parentId];
|
||||
/******/ if (!parent) continue;
|
||||
/******/ if (parent.hot._declinedDependencies[moduleId]) {
|
||||
/******/ return {
|
||||
/******/ type: "declined",
|
||||
/******/ chain: chain.concat([parentId]),
|
||||
/******/ moduleId: moduleId,
|
||||
/******/ parentId: parentId
|
||||
/******/ };
|
||||
/******/ }
|
||||
/******/ if (outdatedModules.includes(parentId)) continue;
|
||||
/******/ if (parent.hot._acceptedDependencies[moduleId]) {
|
||||
/******/ if (!outdatedDependencies[parentId])
|
||||
/******/ outdatedDependencies[parentId] = [];
|
||||
/******/ addAllToSet(outdatedDependencies[parentId], [moduleId]);
|
||||
/******/ continue;
|
||||
/******/ }
|
||||
/******/ delete outdatedDependencies[parentId];
|
||||
/******/ outdatedModules.push(parentId);
|
||||
/******/ queue.push({
|
||||
/******/ chain: chain.concat([parentId]),
|
||||
/******/ id: parentId
|
||||
/******/ });
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/
|
||||
/******/ return {
|
||||
/******/ type: "accepted",
|
||||
/******/ moduleId: updateModuleId,
|
||||
/******/ outdatedModules: outdatedModules,
|
||||
/******/ outdatedDependencies: outdatedDependencies
|
||||
/******/ };
|
||||
/******/ }
|
||||
/******/
|
||||
/******/ function addAllToSet(a, b) {
|
||||
/******/ for (var i = 0; i < b.length; i++) {
|
||||
/******/ var item = b[i];
|
||||
/******/ if (!a.includes(item)) a.push(item);
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/
|
||||
/******/ // at begin all updates modules are outdated
|
||||
/******/ // the "outdated" status can propagate to parents if they don't accept the children
|
||||
/******/ var outdatedDependencies = {};
|
||||
/******/ var outdatedModules = [];
|
||||
/******/ var appliedUpdate = {};
|
||||
/******/
|
||||
/******/ var warnUnexpectedRequire = function warnUnexpectedRequire() {
|
||||
/******/ console.warn(
|
||||
/******/ "[HMR] unexpected require(" + result.moduleId + ") to disposed module"
|
||||
/******/ );
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ for (var id in hotUpdate) {
|
||||
/******/ if (Object.prototype.hasOwnProperty.call(hotUpdate, id)) {
|
||||
/******/ moduleId = toModuleId(id);
|
||||
/******/ var result;
|
||||
/******/ if (hotUpdate[id]) {
|
||||
/******/ result = getAffectedStuff(moduleId);
|
||||
/******/ } else {
|
||||
/******/ result = {
|
||||
/******/ type: "disposed",
|
||||
/******/ moduleId: id
|
||||
/******/ };
|
||||
/******/ }
|
||||
/******/ var abortError = false;
|
||||
/******/ var doApply = false;
|
||||
/******/ var doDispose = false;
|
||||
/******/ var chainInfo = "";
|
||||
/******/ if (result.chain) {
|
||||
/******/ chainInfo = "\nUpdate propagation: " + result.chain.join(" -> ");
|
||||
/******/ }
|
||||
/******/ switch (result.type) {
|
||||
/******/ case "self-declined":
|
||||
/******/ if (options.onDeclined) options.onDeclined(result);
|
||||
/******/ if (!options.ignoreDeclined)
|
||||
/******/ abortError = new Error(
|
||||
/******/ "Aborted because of self decline: " +
|
||||
/******/ result.moduleId +
|
||||
/******/ chainInfo
|
||||
/******/ );
|
||||
/******/ break;
|
||||
/******/ case "declined":
|
||||
/******/ if (options.onDeclined) options.onDeclined(result);
|
||||
/******/ if (!options.ignoreDeclined)
|
||||
/******/ abortError = new Error(
|
||||
/******/ "Aborted because of declined dependency: " +
|
||||
/******/ result.moduleId +
|
||||
/******/ " in " +
|
||||
/******/ result.parentId +
|
||||
/******/ chainInfo
|
||||
/******/ );
|
||||
/******/ break;
|
||||
/******/ case "unaccepted":
|
||||
/******/ if (options.onUnaccepted) options.onUnaccepted(result);
|
||||
/******/ if (!options.ignoreUnaccepted)
|
||||
/******/ abortError = new Error(
|
||||
/******/ "Aborted because " + moduleId + " is not accepted" + chainInfo
|
||||
/******/ );
|
||||
/******/ break;
|
||||
/******/ case "accepted":
|
||||
/******/ if (options.onAccepted) options.onAccepted(result);
|
||||
/******/ doApply = true;
|
||||
/******/ break;
|
||||
/******/ case "disposed":
|
||||
/******/ if (options.onDisposed) options.onDisposed(result);
|
||||
/******/ doDispose = true;
|
||||
/******/ break;
|
||||
/******/ default:
|
||||
/******/ throw new Error("Unexception type " + result.type);
|
||||
/******/ }
|
||||
/******/ if (abortError) {
|
||||
/******/ hotSetStatus("abort");
|
||||
/******/ return Promise.reject(abortError);
|
||||
/******/ }
|
||||
/******/ if (doApply) {
|
||||
/******/ appliedUpdate[moduleId] = hotUpdate[moduleId];
|
||||
/******/ addAllToSet(outdatedModules, result.outdatedModules);
|
||||
/******/ for (moduleId in result.outdatedDependencies) {
|
||||
/******/ if (
|
||||
/******/ Object.prototype.hasOwnProperty.call(
|
||||
/******/ result.outdatedDependencies,
|
||||
/******/ moduleId
|
||||
/******/ )
|
||||
/******/ ) {
|
||||
/******/ if (!outdatedDependencies[moduleId])
|
||||
/******/ outdatedDependencies[moduleId] = [];
|
||||
/******/ addAllToSet(
|
||||
/******/ outdatedDependencies[moduleId],
|
||||
/******/ result.outdatedDependencies[moduleId]
|
||||
/******/ );
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ if (doDispose) {
|
||||
/******/ addAllToSet(outdatedModules, [result.moduleId]);
|
||||
/******/ appliedUpdate[moduleId] = warnUnexpectedRequire;
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/
|
||||
/******/ // Store self accepted outdated modules to require them later by the module system
|
||||
/******/ var outdatedSelfAcceptedModules = [];
|
||||
/******/ for (i = 0; i < outdatedModules.length; i++) {
|
||||
/******/ moduleId = outdatedModules[i];
|
||||
/******/ if (
|
||||
/******/ installedModules[moduleId] &&
|
||||
/******/ installedModules[moduleId].hot._selfAccepted
|
||||
/******/ )
|
||||
/******/ outdatedSelfAcceptedModules.push({
|
||||
/******/ module: moduleId,
|
||||
/******/ errorHandler: installedModules[moduleId].hot._selfAccepted
|
||||
/******/ });
|
||||
/******/ }
|
||||
/******/
|
||||
/******/ // Now in "dispose" phase
|
||||
/******/ hotSetStatus("dispose");
|
||||
/******/ Object.keys(hotAvailableFilesMap).forEach(function(chunkId) {
|
||||
/******/ if (hotAvailableFilesMap[chunkId] === false) {
|
||||
/******/ hotDisposeChunk(chunkId);
|
||||
/******/ }
|
||||
/******/ });
|
||||
/******/
|
||||
/******/ var idx;
|
||||
/******/ var queue = outdatedModules.slice();
|
||||
/******/ while (queue.length > 0) {
|
||||
/******/ moduleId = queue.pop();
|
||||
/******/ module = installedModules[moduleId];
|
||||
/******/ if (!module) continue;
|
||||
/******/
|
||||
/******/ var data = {};
|
||||
/******/
|
||||
/******/ // Call dispose handlers
|
||||
/******/ var disposeHandlers = module.hot._disposeHandlers;
|
||||
/******/ for (j = 0; j < disposeHandlers.length; j++) {
|
||||
/******/ cb = disposeHandlers[j];
|
||||
/******/ cb(data);
|
||||
/******/ }
|
||||
/******/ hotCurrentModuleData[moduleId] = data;
|
||||
/******/
|
||||
/******/ // disable module (this disables requires from this module)
|
||||
/******/ module.hot.active = false;
|
||||
/******/
|
||||
/******/ // remove module from cache
|
||||
/******/ delete installedModules[moduleId];
|
||||
/******/
|
||||
/******/ // when disposing there is no need to call dispose handler
|
||||
/******/ delete outdatedDependencies[moduleId];
|
||||
/******/
|
||||
/******/ // remove "parents" references from all children
|
||||
/******/ for (j = 0; j < module.children.length; j++) {
|
||||
/******/ var child = installedModules[module.children[j]];
|
||||
/******/ if (!child) continue;
|
||||
/******/ idx = child.parents.indexOf(moduleId);
|
||||
/******/ if (idx >= 0) {
|
||||
/******/ child.parents.splice(idx, 1);
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/
|
||||
/******/ // remove outdated dependency from module children
|
||||
/******/ var dependency;
|
||||
/******/ var moduleOutdatedDependencies;
|
||||
/******/ for (moduleId in outdatedDependencies) {
|
||||
/******/ if (
|
||||
/******/ Object.prototype.hasOwnProperty.call(outdatedDependencies, moduleId)
|
||||
/******/ ) {
|
||||
/******/ module = installedModules[moduleId];
|
||||
/******/ if (module) {
|
||||
/******/ moduleOutdatedDependencies = outdatedDependencies[moduleId];
|
||||
/******/ for (j = 0; j < moduleOutdatedDependencies.length; j++) {
|
||||
/******/ dependency = moduleOutdatedDependencies[j];
|
||||
/******/ idx = module.children.indexOf(dependency);
|
||||
/******/ if (idx >= 0) module.children.splice(idx, 1);
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/
|
||||
/******/ // Not in "apply" phase
|
||||
/******/ hotSetStatus("apply");
|
||||
/******/
|
||||
/******/ hotCurrentHash = hotUpdateNewHash;
|
||||
/******/
|
||||
/******/ // insert new code
|
||||
/******/ for (moduleId in appliedUpdate) {
|
||||
/******/ if (Object.prototype.hasOwnProperty.call(appliedUpdate, moduleId)) {
|
||||
/******/ modules[moduleId] = appliedUpdate[moduleId];
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/
|
||||
/******/ // call accept handlers
|
||||
/******/ var error = null;
|
||||
/******/ for (moduleId in outdatedDependencies) {
|
||||
/******/ if (
|
||||
/******/ Object.prototype.hasOwnProperty.call(outdatedDependencies, moduleId)
|
||||
/******/ ) {
|
||||
/******/ module = installedModules[moduleId];
|
||||
/******/ if (module) {
|
||||
/******/ moduleOutdatedDependencies = outdatedDependencies[moduleId];
|
||||
/******/ var callbacks = [];
|
||||
/******/ for (i = 0; i < moduleOutdatedDependencies.length; i++) {
|
||||
/******/ dependency = moduleOutdatedDependencies[i];
|
||||
/******/ cb = module.hot._acceptedDependencies[dependency];
|
||||
/******/ if (cb) {
|
||||
/******/ if (callbacks.includes(cb)) continue;
|
||||
/******/ callbacks.push(cb);
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ for (i = 0; i < callbacks.length; i++) {
|
||||
/******/ cb = callbacks[i];
|
||||
/******/ try {
|
||||
/******/ cb(moduleOutdatedDependencies);
|
||||
/******/ } catch (err) {
|
||||
/******/ if (options.onErrored) {
|
||||
/******/ options.onErrored({
|
||||
/******/ type: "accept-errored",
|
||||
/******/ moduleId: moduleId,
|
||||
/******/ dependencyId: moduleOutdatedDependencies[i],
|
||||
/******/ error: err
|
||||
/******/ });
|
||||
/******/ }
|
||||
/******/ if (!options.ignoreErrored) {
|
||||
/******/ if (!error) error = err;
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/
|
||||
/******/ // Load self accepted modules
|
||||
/******/ for (i = 0; i < outdatedSelfAcceptedModules.length; i++) {
|
||||
/******/ var item = outdatedSelfAcceptedModules[i];
|
||||
/******/ moduleId = item.module;
|
||||
/******/ hotCurrentParents = [moduleId];
|
||||
/******/ try {
|
||||
/******/ __webpack_require__(moduleId);
|
||||
/******/ } catch (err) {
|
||||
/******/ if (typeof item.errorHandler === "function") {
|
||||
/******/ try {
|
||||
/******/ item.errorHandler(err);
|
||||
/******/ } catch (err2) {
|
||||
/******/ if (options.onErrored) {
|
||||
/******/ options.onErrored({
|
||||
/******/ type: "self-accept-error-handler-errored",
|
||||
/******/ moduleId: moduleId,
|
||||
/******/ error: err2,
|
||||
/******/ originalError: err
|
||||
/******/ });
|
||||
/******/ }
|
||||
/******/ if (!options.ignoreErrored) {
|
||||
/******/ if (!error) error = err2;
|
||||
/******/ }
|
||||
/******/ if (!error) error = err;
|
||||
/******/ }
|
||||
/******/ } else {
|
||||
/******/ if (options.onErrored) {
|
||||
/******/ options.onErrored({
|
||||
/******/ type: "self-accept-errored",
|
||||
/******/ moduleId: moduleId,
|
||||
/******/ error: err
|
||||
/******/ });
|
||||
/******/ }
|
||||
/******/ if (!options.ignoreErrored) {
|
||||
/******/ if (!error) error = err;
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/
|
||||
/******/ // handle errors in accept handlers and self accepted module load
|
||||
/******/ if (error) {
|
||||
/******/ hotSetStatus("fail");
|
||||
/******/ return Promise.reject(error);
|
||||
/******/ }
|
||||
/******/
|
||||
/******/ hotSetStatus("idle");
|
||||
/******/ return new Promise(function(resolve) {
|
||||
/******/ resolve(outdatedModules);
|
||||
/******/ });
|
||||
/******/ }
|
||||
/******/
|
||||
/******/ // The module cache
|
||||
/******/ var installedModules = {};
|
||||
/******/
|
||||
|
@ -13,11 +700,14 @@
|
|||
/******/ var module = installedModules[moduleId] = {
|
||||
/******/ i: moduleId,
|
||||
/******/ l: false,
|
||||
/******/ exports: {}
|
||||
/******/ exports: {},
|
||||
/******/ hot: hotCreateModule(moduleId),
|
||||
/******/ parents: (hotCurrentParentsTemp = hotCurrentParents, hotCurrentParents = [], hotCurrentParentsTemp),
|
||||
/******/ children: []
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Execute the module function
|
||||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||||
/******/ modules[moduleId].call(module.exports, module, module.exports, hotCreateRequire(moduleId));
|
||||
/******/
|
||||
/******/ // Flag the module as loaded
|
||||
/******/ module.l = true;
|
||||
|
@ -64,9 +754,12 @@
|
|||
/******/ // __webpack_public_path__
|
||||
/******/ __webpack_require__.p = "";
|
||||
/******/
|
||||
/******/ // __webpack_hash__
|
||||
/******/ __webpack_require__.h = function() { return hotCurrentHash; };
|
||||
/******/
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = "./src/index.js");
|
||||
/******/ return hotCreateRequire("./src/index.js")(__webpack_require__.s = "./src/index.js");
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ({
|
||||
|
@ -110860,7 +111553,7 @@ var debugs = {};
|
|||
var debugEnviron;
|
||||
exports.debuglog = function(set) {
|
||||
if (isUndefined(debugEnviron))
|
||||
debugEnviron = process.env.NODE_DEBUG || '';
|
||||
debugEnviron = Object({"NODE_ENV":"development","PUBLIC_URL":""}).NODE_DEBUG || '';
|
||||
set = set.toUpperCase();
|
||||
if (!debugs[set]) {
|
||||
if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) {
|
||||
|
@ -122557,7 +123250,7 @@ var isNode = typeof process !== "undefined" &&
|
|||
classString(process).toLowerCase() === "[object process]";
|
||||
|
||||
function env(key, def) {
|
||||
return isNode ? process.env[key] : def;
|
||||
return isNode ? Object({"NODE_ENV":"development","PUBLIC_URL":""})[key] : def;
|
||||
}
|
||||
|
||||
var ret = {
|
||||
|
@ -138961,7 +139654,7 @@ var isNode = typeof process !== "undefined" &&
|
|||
classString(process).toLowerCase() === "[object process]";
|
||||
|
||||
function env(key, def) {
|
||||
return isNode ? process.env[key] : def;
|
||||
return isNode ? Object({"NODE_ENV":"development","PUBLIC_URL":""})[key] : def;
|
||||
}
|
||||
|
||||
var ret = {
|
||||
|
@ -158535,7 +159228,32 @@ var update = __webpack_require__(/*! ../node_modules/style-loader/lib/addStyles.
|
|||
|
||||
if(content.locals) module.exports = content.locals;
|
||||
|
||||
if(false) {}
|
||||
if(true) {
|
||||
module.hot.accept(/*! !../node_modules/css-loader??ref--5-1!../node_modules/postcss-loader/lib??ref--5-2!./App.scss */ "./node_modules/css-loader/index.js??ref--5-1!./node_modules/postcss-loader/lib/index.js??ref--5-2!./src/App.scss", function(__WEBPACK_OUTDATED_DEPENDENCIES__) { (function() {
|
||||
var newContent = __webpack_require__(/*! !../node_modules/css-loader??ref--5-1!../node_modules/postcss-loader/lib??ref--5-2!./App.scss */ "./node_modules/css-loader/index.js??ref--5-1!./node_modules/postcss-loader/lib/index.js??ref--5-2!./src/App.scss");
|
||||
|
||||
if(typeof newContent === 'string') newContent = [[module.i, newContent, '']];
|
||||
|
||||
var locals = (function(a, b) {
|
||||
var key, idx = 0;
|
||||
|
||||
for(key in a) {
|
||||
if(!b || a[key] !== b[key]) return false;
|
||||
idx++;
|
||||
}
|
||||
|
||||
for(key in b) idx--;
|
||||
|
||||
return idx === 0;
|
||||
}(content.locals, newContent.locals));
|
||||
|
||||
if(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');
|
||||
|
||||
update(newContent);
|
||||
})(__WEBPACK_OUTDATED_DEPENDENCIES__); });
|
||||
|
||||
module.hot.dispose(function() { update(); });
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
|
@ -158597,7 +159315,32 @@ var update = __webpack_require__(/*! ../../../node_modules/style-loader/lib/addS
|
|||
|
||||
if(content.locals) module.exports = content.locals;
|
||||
|
||||
if(false) {}
|
||||
if(true) {
|
||||
module.hot.accept(/*! !../../../node_modules/css-loader??ref--5-1!../../../node_modules/postcss-loader/lib??ref--5-2!./index.scss */ "./node_modules/css-loader/index.js??ref--5-1!./node_modules/postcss-loader/lib/index.js??ref--5-2!./src/components/Header/index.scss", function(__WEBPACK_OUTDATED_DEPENDENCIES__) { (function() {
|
||||
var newContent = __webpack_require__(/*! !../../../node_modules/css-loader??ref--5-1!../../../node_modules/postcss-loader/lib??ref--5-2!./index.scss */ "./node_modules/css-loader/index.js??ref--5-1!./node_modules/postcss-loader/lib/index.js??ref--5-2!./src/components/Header/index.scss");
|
||||
|
||||
if(typeof newContent === 'string') newContent = [[module.i, newContent, '']];
|
||||
|
||||
var locals = (function(a, b) {
|
||||
var key, idx = 0;
|
||||
|
||||
for(key in a) {
|
||||
if(!b || a[key] !== b[key]) return false;
|
||||
idx++;
|
||||
}
|
||||
|
||||
for(key in b) idx--;
|
||||
|
||||
return idx === 0;
|
||||
}(content.locals, newContent.locals));
|
||||
|
||||
if(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');
|
||||
|
||||
update(newContent);
|
||||
})(__WEBPACK_OUTDATED_DEPENDENCIES__); });
|
||||
|
||||
module.hot.dispose(function() { update(); });
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
|
@ -158712,7 +159455,32 @@ var update = __webpack_require__(/*! ../../../../node_modules/style-loader/lib/a
|
|||
|
||||
if(content.locals) module.exports = content.locals;
|
||||
|
||||
if(false) {}
|
||||
if(true) {
|
||||
module.hot.accept(/*! !../../../../node_modules/css-loader??ref--5-1!../../../../node_modules/postcss-loader/lib??ref--5-2!./index.scss */ "./node_modules/css-loader/index.js??ref--5-1!./node_modules/postcss-loader/lib/index.js??ref--5-2!./src/components/layout/Page/index.scss", function(__WEBPACK_OUTDATED_DEPENDENCIES__) { (function() {
|
||||
var newContent = __webpack_require__(/*! !../../../../node_modules/css-loader??ref--5-1!../../../../node_modules/postcss-loader/lib??ref--5-2!./index.scss */ "./node_modules/css-loader/index.js??ref--5-1!./node_modules/postcss-loader/lib/index.js??ref--5-2!./src/components/layout/Page/index.scss");
|
||||
|
||||
if(typeof newContent === 'string') newContent = [[module.i, newContent, '']];
|
||||
|
||||
var locals = (function(a, b) {
|
||||
var key, idx = 0;
|
||||
|
||||
for(key in a) {
|
||||
if(!b || a[key] !== b[key]) return false;
|
||||
idx++;
|
||||
}
|
||||
|
||||
for(key in b) idx--;
|
||||
|
||||
return idx === 0;
|
||||
}(content.locals, newContent.locals));
|
||||
|
||||
if(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');
|
||||
|
||||
update(newContent);
|
||||
})(__WEBPACK_OUTDATED_DEPENDENCIES__); });
|
||||
|
||||
module.hot.dispose(function() { update(); });
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
|
@ -158775,7 +159543,32 @@ var update = __webpack_require__(/*! ../../../../node_modules/style-loader/lib/a
|
|||
|
||||
if(content.locals) module.exports = content.locals;
|
||||
|
||||
if(false) {}
|
||||
if(true) {
|
||||
module.hot.accept(/*! !../../../../node_modules/css-loader??ref--5-1!../../../../node_modules/postcss-loader/lib??ref--5-2!./index.scss */ "./node_modules/css-loader/index.js??ref--5-1!./node_modules/postcss-loader/lib/index.js??ref--5-2!./src/components/layout/PageFrame/index.scss", function(__WEBPACK_OUTDATED_DEPENDENCIES__) { (function() {
|
||||
var newContent = __webpack_require__(/*! !../../../../node_modules/css-loader??ref--5-1!../../../../node_modules/postcss-loader/lib??ref--5-2!./index.scss */ "./node_modules/css-loader/index.js??ref--5-1!./node_modules/postcss-loader/lib/index.js??ref--5-2!./src/components/layout/PageFrame/index.scss");
|
||||
|
||||
if(typeof newContent === 'string') newContent = [[module.i, newContent, '']];
|
||||
|
||||
var locals = (function(a, b) {
|
||||
var key, idx = 0;
|
||||
|
||||
for(key in a) {
|
||||
if(!b || a[key] !== b[key]) return false;
|
||||
idx++;
|
||||
}
|
||||
|
||||
for(key in b) idx--;
|
||||
|
||||
return idx === 0;
|
||||
}(content.locals, newContent.locals));
|
||||
|
||||
if(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');
|
||||
|
||||
update(newContent);
|
||||
})(__WEBPACK_OUTDATED_DEPENDENCIES__); });
|
||||
|
||||
module.hot.dispose(function() { update(); });
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -983,12 +983,6 @@
|
|||
"@babel/helper-function-name": "7.0.0-beta.40"
|
||||
}
|
||||
},
|
||||
"@babel/plugin-transform-instanceof": {
|
||||
"version": "7.0.0-beta.40",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-instanceof/-/plugin-transform-instanceof-7.0.0-beta.40.tgz",
|
||||
"integrity": "sha512-ORqBkINVkU09q/K2ALP1H6sSFkoipyFN+LX5cR81FKEFvyP4q74MLdGfDFi3wATExms9qFECnaIPz10XhzyRdw==",
|
||||
"dev": true
|
||||
},
|
||||
"@babel/plugin-transform-literals": {
|
||||
"version": "7.0.0-beta.40",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.0.0-beta.40.tgz",
|
||||
|
@ -1251,38 +1245,6 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"@babel/preset-es2015": {
|
||||
"version": "7.0.0-beta.40",
|
||||
"resolved": "https://registry.npmjs.org/@babel/preset-es2015/-/preset-es2015-7.0.0-beta.40.tgz",
|
||||
"integrity": "sha512-qt3UcEUbN2IwyN2RzMlOYnup98CpaXkd/6sQh3I0k1ezEQXYQDnTdc44fpWP+JTY07kDGT1VTePIy1GUpMQKHw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/plugin-transform-arrow-functions": "7.0.0-beta.40",
|
||||
"@babel/plugin-transform-block-scoped-functions": "7.0.0-beta.40",
|
||||
"@babel/plugin-transform-block-scoping": "7.0.0-beta.40",
|
||||
"@babel/plugin-transform-classes": "7.0.0-beta.40",
|
||||
"@babel/plugin-transform-computed-properties": "7.0.0-beta.40",
|
||||
"@babel/plugin-transform-destructuring": "7.0.0-beta.40",
|
||||
"@babel/plugin-transform-duplicate-keys": "7.0.0-beta.40",
|
||||
"@babel/plugin-transform-for-of": "7.0.0-beta.40",
|
||||
"@babel/plugin-transform-function-name": "7.0.0-beta.40",
|
||||
"@babel/plugin-transform-instanceof": "7.0.0-beta.40",
|
||||
"@babel/plugin-transform-literals": "7.0.0-beta.40",
|
||||
"@babel/plugin-transform-modules-amd": "7.0.0-beta.40",
|
||||
"@babel/plugin-transform-modules-commonjs": "7.0.0-beta.40",
|
||||
"@babel/plugin-transform-modules-systemjs": "7.0.0-beta.40",
|
||||
"@babel/plugin-transform-modules-umd": "7.0.0-beta.40",
|
||||
"@babel/plugin-transform-object-super": "7.0.0-beta.40",
|
||||
"@babel/plugin-transform-parameters": "7.0.0-beta.40",
|
||||
"@babel/plugin-transform-regenerator": "7.0.0-beta.40",
|
||||
"@babel/plugin-transform-shorthand-properties": "7.0.0-beta.40",
|
||||
"@babel/plugin-transform-spread": "7.0.0-beta.40",
|
||||
"@babel/plugin-transform-sticky-regex": "7.0.0-beta.40",
|
||||
"@babel/plugin-transform-template-literals": "7.0.0-beta.40",
|
||||
"@babel/plugin-transform-typeof-symbol": "7.0.0-beta.40",
|
||||
"@babel/plugin-transform-unicode-regex": "7.0.0-beta.40"
|
||||
}
|
||||
},
|
||||
"@babel/preset-react": {
|
||||
"version": "7.0.0-beta.40",
|
||||
"resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.0.0-beta.40.tgz",
|
||||
|
@ -1511,6 +1473,12 @@
|
|||
"xtend": "4.0.1"
|
||||
}
|
||||
},
|
||||
"address": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/address/-/address-1.0.3.tgz",
|
||||
"integrity": "sha512-z55ocwKBRLryBs394Sm3ushTtBeg6VAeuku7utSoSnsJKvKcnXFIyC6vh27n3rXyxSgkJBBCAvyOn7gSUcTYjg==",
|
||||
"dev": true
|
||||
},
|
||||
"aes-js": {
|
||||
"version": "0.2.4",
|
||||
"resolved": "https://registry.npmjs.org/aes-js/-/aes-js-0.2.4.tgz",
|
||||
|
@ -4951,6 +4919,16 @@
|
|||
"integrity": "sha1-ogM8CcyOFY03dI+951B4Mr1s4Sc=",
|
||||
"dev": true
|
||||
},
|
||||
"detect-port-alt": {
|
||||
"version": "1.1.5",
|
||||
"resolved": "https://registry.npmjs.org/detect-port-alt/-/detect-port-alt-1.1.5.tgz",
|
||||
"integrity": "sha512-PlE9BuBz44BSDV8sJvfUxkGquPcDW4oHSYa5wY4yKj943C2I4xNU5Gd/EFroqdWNur7W6yU2zOLqvmKJCB//aA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"address": "1.0.3",
|
||||
"debug": "2.6.9"
|
||||
}
|
||||
},
|
||||
"detective": {
|
||||
"version": "4.7.1",
|
||||
"resolved": "https://registry.npmjs.org/detective/-/detective-4.7.1.tgz",
|
||||
|
@ -5089,6 +5067,12 @@
|
|||
"create-hmac": "1.1.6"
|
||||
}
|
||||
},
|
||||
"duplexer": {
|
||||
"version": "0.1.1",
|
||||
"resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz",
|
||||
"integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=",
|
||||
"dev": true
|
||||
},
|
||||
"duplexer2": {
|
||||
"version": "0.1.4",
|
||||
"resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz",
|
||||
|
@ -6209,6 +6193,12 @@
|
|||
"integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=",
|
||||
"dev": true
|
||||
},
|
||||
"filesize": {
|
||||
"version": "3.5.11",
|
||||
"resolved": "https://registry.npmjs.org/filesize/-/filesize-3.5.11.tgz",
|
||||
"integrity": "sha512-ZH7loueKBoDb7yG9esn1U+fgq7BzlzW6NRi5/rMdxIZ05dj7GFD/Xc5rq2CDt5Yq86CyfSYVyx4242QQNZbx1g==",
|
||||
"dev": true
|
||||
},
|
||||
"fill-range": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz",
|
||||
|
@ -7851,6 +7841,15 @@
|
|||
"integrity": "sha1-Dqd0NxXbjY3ixe3hd14bRayFwC8=",
|
||||
"dev": true
|
||||
},
|
||||
"gzip-size": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-3.0.0.tgz",
|
||||
"integrity": "sha1-VGGI6b3DN/Zzdy+BZgRks4nc5SA=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"duplexer": "0.1.1"
|
||||
}
|
||||
},
|
||||
"handle-thing": {
|
||||
"version": "1.2.5",
|
||||
"resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-1.2.5.tgz",
|
||||
|
@ -9030,6 +9029,12 @@
|
|||
"resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz",
|
||||
"integrity": "sha1-EaBgVotnM5REAz0BJaYaINVk+zQ="
|
||||
},
|
||||
"is-root": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-root/-/is-root-1.0.0.tgz",
|
||||
"integrity": "sha1-B7bCM7w5TNnQK6FclmvWZg1jQtU=",
|
||||
"dev": true
|
||||
},
|
||||
"is-scoped": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-scoped/-/is-scoped-1.0.0.tgz",
|
||||
|
@ -12920,6 +12925,113 @@
|
|||
"prop-types": "15.6.1"
|
||||
}
|
||||
},
|
||||
"react-dev-utils": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/react-dev-utils/-/react-dev-utils-5.0.0.tgz",
|
||||
"integrity": "sha512-j+Rmwct2aOGAbIk046PjBpQ5zxaLtSlTFwyt3yhVfpQgieqyQbtFwATKY4HSB3j+hSQ4UEBBxwjxjSJiGCP+ow==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"address": "1.0.3",
|
||||
"babel-code-frame": "6.26.0",
|
||||
"chalk": "1.1.3",
|
||||
"cross-spawn": "5.1.0",
|
||||
"detect-port-alt": "1.1.5",
|
||||
"escape-string-regexp": "1.0.5",
|
||||
"filesize": "3.5.11",
|
||||
"global-modules": "1.0.0",
|
||||
"gzip-size": "3.0.0",
|
||||
"inquirer": "3.3.0",
|
||||
"is-root": "1.0.0",
|
||||
"opn": "5.2.0",
|
||||
"react-error-overlay": "4.0.0",
|
||||
"recursive-readdir": "2.2.1",
|
||||
"shell-quote": "1.6.1",
|
||||
"sockjs-client": "1.1.4",
|
||||
"strip-ansi": "3.0.1",
|
||||
"text-table": "0.2.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"ansi-regex": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
|
||||
"integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
|
||||
"dev": true
|
||||
},
|
||||
"ansi-styles": {
|
||||
"version": "3.2.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
|
||||
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"color-convert": "1.9.1"
|
||||
}
|
||||
},
|
||||
"cross-spawn": {
|
||||
"version": "5.1.0",
|
||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz",
|
||||
"integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"lru-cache": "4.1.1",
|
||||
"shebang-command": "1.2.0",
|
||||
"which": "1.3.0"
|
||||
}
|
||||
},
|
||||
"inquirer": {
|
||||
"version": "3.3.0",
|
||||
"resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.3.0.tgz",
|
||||
"integrity": "sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ansi-escapes": "3.0.0",
|
||||
"chalk": "2.3.2",
|
||||
"cli-cursor": "2.1.0",
|
||||
"cli-width": "2.2.0",
|
||||
"external-editor": "2.1.0",
|
||||
"figures": "2.0.0",
|
||||
"lodash": "4.17.5",
|
||||
"mute-stream": "0.0.7",
|
||||
"run-async": "2.3.0",
|
||||
"rx-lite": "4.0.8",
|
||||
"rx-lite-aggregates": "4.0.8",
|
||||
"string-width": "2.1.1",
|
||||
"strip-ansi": "4.0.0",
|
||||
"through": "2.3.8"
|
||||
},
|
||||
"dependencies": {
|
||||
"chalk": {
|
||||
"version": "2.3.2",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.2.tgz",
|
||||
"integrity": "sha512-ZM4j2/ld/YZDc3Ma8PgN7gyAk+kHMMMyzLNryCPGhWrsfAuDVeuid5bpRFTDgMH9JBK2lA4dyyAkkZYF/WcqDQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ansi-styles": "3.2.1",
|
||||
"escape-string-regexp": "1.0.5",
|
||||
"supports-color": "5.3.0"
|
||||
}
|
||||
},
|
||||
"strip-ansi": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
|
||||
"integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ansi-regex": "3.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"supports-color": {
|
||||
"version": "5.3.0",
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.3.0.tgz",
|
||||
"integrity": "sha512-0aP01LLIskjKs3lq52EC0aGBAJhLq7B2Rd8HC/DR/PtNNpcLilNmHC12O+hu0usQpo7wtHNRqtrhBwtDb0+dNg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"has-flag": "3.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"react-dom": {
|
||||
"version": "16.2.0",
|
||||
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.2.0.tgz",
|
||||
|
@ -12932,6 +13044,12 @@
|
|||
"prop-types": "15.6.1"
|
||||
}
|
||||
},
|
||||
"react-error-overlay": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-4.0.0.tgz",
|
||||
"integrity": "sha512-FlsPxavEyMuR6TjVbSSywovXSEyOg6ZDj5+Z8nbsRl9EkOzAhEIcS+GLoQDC5fz/t9suhUXWmUrOBrgeUvrMxw==",
|
||||
"dev": true
|
||||
},
|
||||
"react-event-listener": {
|
||||
"version": "0.5.3",
|
||||
"resolved": "https://registry.npmjs.org/react-event-listener/-/react-event-listener-0.5.3.tgz",
|
||||
|
@ -13160,6 +13278,26 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"recursive-readdir": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/recursive-readdir/-/recursive-readdir-2.2.1.tgz",
|
||||
"integrity": "sha1-kO8jHQd4xc4JPJpI105cVCLROpk=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"minimatch": "3.0.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"minimatch": {
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz",
|
||||
"integrity": "sha1-Kk5AkLlrLbBqnX3wEFWmKnfJt3Q=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"brace-expansion": "1.1.11"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"redent": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz",
|
||||
|
|
|
@ -6,8 +6,9 @@
|
|||
"test": "test"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "webpack --mode development --config config/webpack.dev.js",
|
||||
"build": "webpack --mode production --config config/webpack.dev.js"
|
||||
"start": "node scripts/start.js",
|
||||
"build": "node scripts/build.js",
|
||||
"test": "node scripts/test.js --env=jsdom"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@ -36,6 +37,7 @@
|
|||
"postcss-loader": "^2.1.1",
|
||||
"postcss-simple-vars": "^4.1.0",
|
||||
"react": "^16.2.0",
|
||||
"react-dev-utils": "^5.0.0",
|
||||
"react-dom": "^16.2.0",
|
||||
"style-loader": "^0.20.2",
|
||||
"truffle-contract": "^3.0.4",
|
||||
|
|
|
@ -3,18 +3,9 @@
|
|||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
|
||||
<link rel="shortcut icon" href="favicon.ico">
|
||||
<link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700" rel="stylesheet">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
|
||||
<!--
|
||||
Notice the use of %PUBLIC_URL% in the tag above.
|
||||
It will be replaced with the URL of the `public` folder during the build.
|
||||
Only files inside the `public` folder can be referenced from the HTML.
|
||||
|
||||
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
|
||||
work correctly both with client-side routing and a non-root public URL.
|
||||
Learn how to configure a non-root public URL by running `npm run build`.
|
||||
-->
|
||||
<title>Multisig Safe</title>
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
@ -0,0 +1,224 @@
|
|||
// Do this as the first thing so that any code reading it knows the right env.
|
||||
process.env.NODE_ENV = 'production';
|
||||
|
||||
// Load environment variables from .env file. Suppress warnings using silent
|
||||
// if this file is missing. dotenv will never modify any environment variables
|
||||
// that have already been set.
|
||||
// https://github.com/motdotla/dotenv
|
||||
require('dotenv').config({silent: true});
|
||||
|
||||
var chalk = require('chalk');
|
||||
var fs = require('fs-extra');
|
||||
var path = require('path');
|
||||
var pathExists = require('path-exists');
|
||||
var filesize = require('filesize');
|
||||
var gzipSize = require('gzip-size').sync;
|
||||
var webpack = require('webpack');
|
||||
var config = require('../config/webpack.config.prod');
|
||||
var paths = require('../config/paths');
|
||||
var checkRequiredFiles = require('react-dev-utils/checkRequiredFiles');
|
||||
var recursive = require('recursive-readdir');
|
||||
var stripAnsi = require('strip-ansi');
|
||||
|
||||
var useYarn = pathExists.sync(paths.yarnLockFile);
|
||||
|
||||
// Warn and crash if required files are missing
|
||||
if (!checkRequiredFiles([paths.appHtml, paths.appIndexJs])) {
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
// Input: /User/dan/app/build/static/js/main.82be8.js
|
||||
// Output: /static/js/main.js
|
||||
function removeFileNameHash(fileName) {
|
||||
return fileName
|
||||
.replace(paths.appBuild, '')
|
||||
.replace(/\/?(.*)(\.\w+)(\.js|\.css)/, (match, p1, p2, p3) => p1 + p3);
|
||||
}
|
||||
|
||||
// Input: 1024, 2048
|
||||
// Output: "(+1 KB)"
|
||||
function getDifferenceLabel(currentSize, previousSize) {
|
||||
var FIFTY_KILOBYTES = 1024 * 50;
|
||||
var difference = currentSize - previousSize;
|
||||
var fileSize = !Number.isNaN(difference) ? filesize(difference) : 0;
|
||||
if (difference >= FIFTY_KILOBYTES) {
|
||||
return chalk.red('+' + fileSize);
|
||||
} else if (difference < FIFTY_KILOBYTES && difference > 0) {
|
||||
return chalk.yellow('+' + fileSize);
|
||||
} else if (difference < 0) {
|
||||
return chalk.green(fileSize);
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
// First, read the current file sizes in build directory.
|
||||
// This lets us display how much they changed later.
|
||||
recursive(paths.appBuild, (err, fileNames) => {
|
||||
var previousSizeMap = (fileNames || [])
|
||||
.filter(fileName => /\.(js|css)$/.test(fileName))
|
||||
.reduce((memo, fileName) => {
|
||||
var contents = fs.readFileSync(fileName);
|
||||
var key = removeFileNameHash(fileName);
|
||||
memo[key] = gzipSize(contents);
|
||||
return memo;
|
||||
}, {});
|
||||
|
||||
// Remove all content but keep the directory so that
|
||||
// if you're in it, you don't end up in Trash
|
||||
fs.emptyDirSync(paths.appBuild);
|
||||
|
||||
// Start the webpack build
|
||||
build(previousSizeMap);
|
||||
|
||||
// Merge with the public folder
|
||||
copyPublicFolder();
|
||||
});
|
||||
|
||||
// Print a detailed summary of build files.
|
||||
function printFileSizes(stats, previousSizeMap) {
|
||||
var assets = stats.toJson().assets
|
||||
.filter(asset => /\.(js|css)$/.test(asset.name))
|
||||
.map(asset => {
|
||||
var fileContents = fs.readFileSync(paths.appBuild + '/' + asset.name);
|
||||
var size = gzipSize(fileContents);
|
||||
var previousSize = previousSizeMap[removeFileNameHash(asset.name)];
|
||||
var difference = getDifferenceLabel(size, previousSize);
|
||||
return {
|
||||
folder: path.join('build_webpack', path.dirname(asset.name)),
|
||||
name: path.basename(asset.name),
|
||||
size: size,
|
||||
sizeLabel: filesize(size) + (difference ? ' (' + difference + ')' : '')
|
||||
};
|
||||
});
|
||||
assets.sort((a, b) => b.size - a.size);
|
||||
var longestSizeLabelLength = Math.max.apply(null,
|
||||
assets.map(a => stripAnsi(a.sizeLabel).length)
|
||||
);
|
||||
assets.forEach(asset => {
|
||||
var sizeLabel = asset.sizeLabel;
|
||||
var sizeLength = stripAnsi(sizeLabel).length;
|
||||
if (sizeLength < longestSizeLabelLength) {
|
||||
var rightPadding = ' '.repeat(longestSizeLabelLength - sizeLength);
|
||||
sizeLabel += rightPadding;
|
||||
}
|
||||
console.log(
|
||||
' ' + sizeLabel +
|
||||
' ' + chalk.dim(asset.folder + path.sep) + chalk.cyan(asset.name)
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
// Print out errors
|
||||
function printErrors(summary, errors) {
|
||||
console.log(chalk.red(summary));
|
||||
console.log();
|
||||
errors.forEach(err => {
|
||||
console.log(err.message || err);
|
||||
console.log();
|
||||
});
|
||||
}
|
||||
|
||||
// Create the production build and print the deployment instructions.
|
||||
function build(previousSizeMap) {
|
||||
console.log('Creating an optimized production build...');
|
||||
webpack(config).run((err, stats) => {
|
||||
if (err) {
|
||||
printErrors('Failed to compile.', [err]);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
if (stats.compilation.errors.length) {
|
||||
printErrors('Failed to compile.', stats.compilation.errors);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
if (process.env.CI && stats.compilation.warnings.length) {
|
||||
printErrors('Failed to compile.', stats.compilation.warnings);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
console.log(chalk.green('Compiled successfully.'));
|
||||
console.log();
|
||||
|
||||
console.log('File sizes after gzip:');
|
||||
console.log();
|
||||
printFileSizes(stats, previousSizeMap);
|
||||
console.log();
|
||||
|
||||
var openCommand = process.platform === 'win32' ? 'start' : 'open';
|
||||
var appPackage = require(paths.appPackageJson);
|
||||
var homepagePath = appPackage.homepage;
|
||||
var publicPath = config.output.publicPath;
|
||||
if (homepagePath && homepagePath.indexOf('.github.io/') !== -1) {
|
||||
// "homepage": "http://user.github.io/project"
|
||||
console.log('The project was built assuming it is hosted at ' + chalk.green(publicPath) + '.');
|
||||
console.log('You can control this with the ' + chalk.green('homepage') + ' field in your ' + chalk.cyan('package.json') + '.');
|
||||
console.log();
|
||||
console.log('The ' + chalk.cyan('build_webpack') + ' folder is ready to be deployed.');
|
||||
console.log('To publish it at ' + chalk.green(homepagePath) + ', run:');
|
||||
// If script deploy has been added to package.json, skip the instructions
|
||||
if (typeof appPackage.scripts.deploy === 'undefined') {
|
||||
console.log();
|
||||
if (useYarn) {
|
||||
console.log(' ' + chalk.cyan('yarn') + ' add --dev gh-pages');
|
||||
} else {
|
||||
console.log(' ' + chalk.cyan('npm') + ' install --save-dev gh-pages');
|
||||
}
|
||||
console.log();
|
||||
console.log('Add the following script in your ' + chalk.cyan('package.json') + '.');
|
||||
console.log();
|
||||
console.log(' ' + chalk.dim('// ...'));
|
||||
console.log(' ' + chalk.yellow('"scripts"') + ': {');
|
||||
console.log(' ' + chalk.dim('// ...'));
|
||||
console.log(' ' + chalk.yellow('"deploy"') + ': ' + chalk.yellow('"npm run build&&gh-pages -d build"'));
|
||||
console.log(' }');
|
||||
console.log();
|
||||
console.log('Then run:');
|
||||
}
|
||||
console.log();
|
||||
console.log(' ' + chalk.cyan(useYarn ? 'yarn' : 'npm') + ' run deploy');
|
||||
console.log();
|
||||
} else if (publicPath !== '/') {
|
||||
// "homepage": "http://mywebsite.com/project"
|
||||
console.log('The project was built assuming it is hosted at ' + chalk.green(publicPath) + '.');
|
||||
console.log('You can control this with the ' + chalk.green('homepage') + ' field in your ' + chalk.cyan('package.json') + '.');
|
||||
console.log();
|
||||
console.log('The ' + chalk.cyan('build_webpack') + ' folder is ready to be deployed.');
|
||||
console.log();
|
||||
} else {
|
||||
// no homepage or "homepage": "http://mywebsite.com"
|
||||
console.log('The project was built assuming it is hosted at the server root.');
|
||||
if (homepagePath) {
|
||||
// "homepage": "http://mywebsite.com"
|
||||
console.log('You can control this with the ' + chalk.green('homepage') + ' field in your ' + chalk.cyan('package.json') + '.');
|
||||
console.log();
|
||||
} else {
|
||||
// no homepage
|
||||
console.log('To override this, specify the ' + chalk.green('homepage') + ' in your ' + chalk.cyan('package.json') + '.');
|
||||
console.log('For example, add this to build it for GitHub Pages:')
|
||||
console.log();
|
||||
console.log(' ' + chalk.green('"homepage"') + chalk.cyan(': ') + chalk.green('"http://myname.github.io/myapp"') + chalk.cyan(','));
|
||||
console.log();
|
||||
}
|
||||
console.log('The ' + chalk.cyan('build_webpack') + ' folder is ready to be deployed.');
|
||||
console.log('You may also serve it locally with a static server:')
|
||||
console.log();
|
||||
if (useYarn) {
|
||||
console.log(' ' + chalk.cyan('yarn') + ' global add pushstate-server');
|
||||
} else {
|
||||
console.log(' ' + chalk.cyan('npm') + ' install -g pushstate-server');
|
||||
}
|
||||
console.log(' ' + chalk.cyan('pushstate-server') + ' build');
|
||||
console.log(' ' + chalk.cyan(openCommand) + ' http://localhost:9000');
|
||||
console.log();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function copyPublicFolder() {
|
||||
fs.copySync(paths.appPublic, paths.appBuild, {
|
||||
dereference: true,
|
||||
filter: file => file !== paths.appHtml
|
||||
});
|
||||
}
|
|
@ -0,0 +1,315 @@
|
|||
process.env.NODE_ENV = 'development';
|
||||
|
||||
// Load environment variables from .env file. Suppress warnings using silent
|
||||
// if this file is missing. dotenv will never modify any environment variables
|
||||
// that have already been set.
|
||||
// https://github.com/motdotla/dotenv
|
||||
require('dotenv').config({silent: true});
|
||||
|
||||
var chalk = require('chalk');
|
||||
var webpack = require('webpack');
|
||||
var WebpackDevServer = require('webpack-dev-server');
|
||||
var historyApiFallback = require('connect-history-api-fallback');
|
||||
var httpProxyMiddleware = require('http-proxy-middleware');
|
||||
var detect = require('detect-port');
|
||||
var clearConsole = require('react-dev-utils/clearConsole');
|
||||
var checkRequiredFiles = require('react-dev-utils/checkRequiredFiles');
|
||||
var formatWebpackMessages = require('react-dev-utils/formatWebpackMessages');
|
||||
var getProcessForPort = require('react-dev-utils/getProcessForPort');
|
||||
var openBrowser = require('react-dev-utils/openBrowser');
|
||||
var prompt = require('react-dev-utils/prompt');
|
||||
var pathExists = require('path-exists');
|
||||
var config = require('../config/webpack.config.dev');
|
||||
var paths = require('../config/paths');
|
||||
|
||||
var useYarn = pathExists.sync(paths.yarnLockFile);
|
||||
var cli = useYarn ? 'yarn' : 'npm';
|
||||
var isInteractive = process.stdout.isTTY;
|
||||
|
||||
// Warn and crash if required files are missing
|
||||
if (!checkRequiredFiles([paths.appHtml, paths.appIndexJs])) {
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
// Tools like Cloud9 rely on this.
|
||||
var DEFAULT_PORT = process.env.PORT || 3000;
|
||||
var compiler;
|
||||
var handleCompile;
|
||||
|
||||
// You can safely remove this after ejecting.
|
||||
// We only use this block for testing of Create React App itself:
|
||||
var isSmokeTest = process.argv.some(arg => arg.indexOf('--smoke-test') > -1);
|
||||
if (isSmokeTest) {
|
||||
handleCompile = function (err, stats) {
|
||||
if (err || stats.hasErrors() || stats.hasWarnings()) {
|
||||
process.exit(1);
|
||||
} else {
|
||||
process.exit(0);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function setupCompiler(host, port, protocol) {
|
||||
// "Compiler" is a low-level interface to Webpack.
|
||||
// It lets us listen to some events and provide our own custom messages.
|
||||
compiler = webpack(config, handleCompile);
|
||||
|
||||
// "invalid" event fires when you have changed a file, and Webpack is
|
||||
// recompiling a bundle. WebpackDevServer takes care to pause serving the
|
||||
// bundle, so if you refresh, it'll wait instead of serving the old one.
|
||||
// "invalid" is short for "bundle invalidated", it doesn't imply any errors.
|
||||
compiler.plugin('invalid', function() {
|
||||
if (isInteractive) {
|
||||
clearConsole();
|
||||
}
|
||||
console.log('Compiling...');
|
||||
});
|
||||
|
||||
var isFirstCompile = true;
|
||||
|
||||
// "done" event fires when Webpack has finished recompiling the bundle.
|
||||
// Whether or not you have warnings or errors, you will get this event.
|
||||
compiler.plugin('done', function(stats) {
|
||||
if (isInteractive) {
|
||||
clearConsole();
|
||||
}
|
||||
|
||||
// We have switched off the default Webpack output in WebpackDevServer
|
||||
// options so we are going to "massage" the warnings and errors and present
|
||||
// them in a readable focused way.
|
||||
var messages = formatWebpackMessages(stats.toJson({}, true));
|
||||
var isSuccessful = !messages.errors.length && !messages.warnings.length;
|
||||
var showInstructions = isSuccessful && (isInteractive || isFirstCompile);
|
||||
|
||||
if (isSuccessful) {
|
||||
console.log(chalk.green('Compiled successfully!'));
|
||||
}
|
||||
|
||||
if (showInstructions) {
|
||||
console.log();
|
||||
console.log('The app is running at:');
|
||||
console.log();
|
||||
console.log(' ' + chalk.cyan(protocol + '://' + host + ':' + port + '/'));
|
||||
console.log();
|
||||
console.log('Note that the development build is not optimized.');
|
||||
console.log('To create a production build, use ' + chalk.cyan(cli + ' run build') + '.');
|
||||
console.log();
|
||||
isFirstCompile = false;
|
||||
}
|
||||
|
||||
// If errors exist, only show errors.
|
||||
if (messages.errors.length) {
|
||||
console.log(chalk.red('Failed to compile.'));
|
||||
console.log();
|
||||
messages.errors.forEach(message => {
|
||||
console.log(message);
|
||||
console.log();
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
// Show warnings if no errors were found.
|
||||
if (messages.warnings.length) {
|
||||
console.log(chalk.yellow('Compiled with warnings.'));
|
||||
console.log();
|
||||
messages.warnings.forEach(message => {
|
||||
console.log(message);
|
||||
console.log();
|
||||
});
|
||||
// Teach some ESLint tricks.
|
||||
console.log('You may use special comments to disable some warnings.');
|
||||
console.log('Use ' + chalk.yellow('// eslint-disable-next-line') + ' to ignore the next line.');
|
||||
console.log('Use ' + chalk.yellow('/* eslint-disable */') + ' to ignore all warnings in a file.');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// We need to provide a custom onError function for httpProxyMiddleware.
|
||||
// It allows us to log custom error messages on the console.
|
||||
function onProxyError(proxy) {
|
||||
return function(err, req, res){
|
||||
var host = req.headers && req.headers.host;
|
||||
console.log(
|
||||
chalk.red('Proxy error:') + ' Could not proxy request ' + chalk.cyan(req.url) +
|
||||
' from ' + chalk.cyan(host) + ' to ' + chalk.cyan(proxy) + '.'
|
||||
);
|
||||
console.log(
|
||||
'See https://nodejs.org/api/errors.html#errors_common_system_errors for more information (' +
|
||||
chalk.cyan(err.code) + ').'
|
||||
);
|
||||
console.log();
|
||||
|
||||
// And immediately send the proper error response to the client.
|
||||
// Otherwise, the request will eventually timeout with ERR_EMPTY_RESPONSE on the client side.
|
||||
if (res.writeHead && !res.headersSent) {
|
||||
res.writeHead(500);
|
||||
}
|
||||
res.end('Proxy error: Could not proxy request ' + req.url + ' from ' +
|
||||
host + ' to ' + proxy + ' (' + err.code + ').'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function addMiddleware(devServer) {
|
||||
// `proxy` lets you to specify a fallback server during development.
|
||||
// Every unrecognized request will be forwarded to it.
|
||||
var proxy = require(paths.appPackageJson).proxy;
|
||||
devServer.use(historyApiFallback({
|
||||
// Paths with dots should still use the history fallback.
|
||||
// See https://github.com/facebookincubator/create-react-app/issues/387.
|
||||
disableDotRule: true,
|
||||
// For single page apps, we generally want to fallback to /index.html.
|
||||
// However we also want to respect `proxy` for API calls.
|
||||
// So if `proxy` is specified, we need to decide which fallback to use.
|
||||
// We use a heuristic: if request `accept`s text/html, we pick /index.html.
|
||||
// Modern browsers include text/html into `accept` header when navigating.
|
||||
// However API calls like `fetch()` won’t generally accept text/html.
|
||||
// If this heuristic doesn’t work well for you, don’t use `proxy`.
|
||||
htmlAcceptHeaders: proxy ?
|
||||
['text/html'] :
|
||||
['text/html', '*/*']
|
||||
}));
|
||||
if (proxy) {
|
||||
if (typeof proxy !== 'string') {
|
||||
console.log(chalk.red('When specified, "proxy" in package.json must be a string.'));
|
||||
console.log(chalk.red('Instead, the type of "proxy" was "' + typeof proxy + '".'));
|
||||
console.log(chalk.red('Either remove "proxy" from package.json, or make it a string.'));
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
// Otherwise, if proxy is specified, we will let it handle any request.
|
||||
// There are a few exceptions which we won't send to the proxy:
|
||||
// - /index.html (served as HTML5 history API fallback)
|
||||
// - /*.hot-update.json (WebpackDevServer uses this too for hot reloading)
|
||||
// - /sockjs-node/* (WebpackDevServer uses this for hot reloading)
|
||||
// Tip: use https://jex.im/regulex/ to visualize the regex
|
||||
var mayProxy = /^(?!\/(index\.html$|.*\.hot-update\.json$|sockjs-node\/)).*$/;
|
||||
|
||||
// Pass the scope regex both to Express and to the middleware for proxying
|
||||
// of both HTTP and WebSockets to work without false positives.
|
||||
var hpm = httpProxyMiddleware(pathname => mayProxy.test(pathname), {
|
||||
target: proxy,
|
||||
logLevel: 'silent',
|
||||
onProxyReq: function(proxyReq, req, res) {
|
||||
// Browers may send Origin headers even with same-origin
|
||||
// requests. To prevent CORS issues, we have to change
|
||||
// the Origin to match the target URL.
|
||||
if (proxyReq.getHeader('origin')) {
|
||||
proxyReq.setHeader('origin', proxy);
|
||||
}
|
||||
},
|
||||
onError: onProxyError(proxy),
|
||||
secure: false,
|
||||
changeOrigin: true,
|
||||
ws: true
|
||||
});
|
||||
devServer.use(mayProxy, hpm);
|
||||
|
||||
// Listen for the websocket 'upgrade' event and upgrade the connection.
|
||||
// If this is not done, httpProxyMiddleware will not try to upgrade until
|
||||
// an initial plain HTTP request is made.
|
||||
devServer.listeningApp.on('upgrade', hpm.upgrade);
|
||||
}
|
||||
|
||||
// Finally, by now we have certainly resolved the URL.
|
||||
// It may be /index.html, so let the dev server try serving it again.
|
||||
devServer.use(devServer.middleware);
|
||||
}
|
||||
|
||||
function runDevServer(host, port, protocol) {
|
||||
var devServer = new WebpackDevServer(compiler, {
|
||||
// Enable gzip compression of generated files.
|
||||
compress: true,
|
||||
// Silence WebpackDevServer's own logs since they're generally not useful.
|
||||
// It will still show compile warnings and errors with this setting.
|
||||
clientLogLevel: 'none',
|
||||
// By default WebpackDevServer serves physical files from current directory
|
||||
// in addition to all the virtual build products that it serves from memory.
|
||||
// This is confusing because those files won’t automatically be available in
|
||||
// production build folder unless we copy them. However, copying the whole
|
||||
// project directory is dangerous because we may expose sensitive files.
|
||||
// Instead, we establish a convention that only files in `public` directory
|
||||
// get served. Our build script will copy `public` into the `build` folder.
|
||||
// In `index.html`, you can get URL of `public` folder with %PUBLIC_PATH%:
|
||||
// <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
|
||||
// In JavaScript code, you can access it with `process.env.PUBLIC_URL`.
|
||||
// Note that we only recommend to use `public` folder as an escape hatch
|
||||
// for files like `favicon.ico`, `manifest.json`, and libraries that are
|
||||
// for some reason broken when imported through Webpack. If you just want to
|
||||
// use an image, put it in `src` and `import` it from JavaScript instead.
|
||||
contentBase: paths.appPublic,
|
||||
// Enable hot reloading server. It will provide /sockjs-node/ endpoint
|
||||
// for the WebpackDevServer client so it can learn when the files were
|
||||
// updated. The WebpackDevServer client is included as an entry point
|
||||
// in the Webpack development configuration. Note that only changes
|
||||
// to CSS are currently hot reloaded. JS changes will refresh the browser.
|
||||
hot: true,
|
||||
// It is important to tell WebpackDevServer to use the same "root" path
|
||||
// as we specified in the config. In development, we always serve from /.
|
||||
publicPath: config.output.publicPath,
|
||||
// WebpackDevServer is noisy by default so we emit custom message instead
|
||||
// by listening to the compiler events with `compiler.plugin` calls above.
|
||||
quiet: true,
|
||||
// Reportedly, this avoids CPU overload on some systems.
|
||||
// https://github.com/facebookincubator/create-react-app/issues/293
|
||||
watchOptions: {
|
||||
ignored: /node_modules/
|
||||
},
|
||||
// Enable HTTPS if the HTTPS environment variable is set to 'true'
|
||||
https: protocol === "https",
|
||||
host: host
|
||||
});
|
||||
|
||||
// Our custom middleware proxies requests to /index.html or a remote API.
|
||||
addMiddleware(devServer);
|
||||
|
||||
// Launch WebpackDevServer.
|
||||
devServer.listen(port, (err, result) => {
|
||||
if (err) {
|
||||
return console.log(err);
|
||||
}
|
||||
|
||||
if (isInteractive) {
|
||||
clearConsole();
|
||||
}
|
||||
console.log(chalk.cyan('Starting the development server...'));
|
||||
console.log();
|
||||
|
||||
if (isInteractive) {
|
||||
openBrowser(protocol + '://' + host + ':' + port + '/');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function run(port) {
|
||||
var protocol = process.env.HTTPS === 'true' ? "https" : "http";
|
||||
var host = process.env.HOST || 'localhost';
|
||||
setupCompiler(host, port, protocol);
|
||||
runDevServer(host, port, protocol);
|
||||
}
|
||||
|
||||
// We attempt to use the default port but if it is busy, we offer the user to
|
||||
// run on a different port. `detect()` Promise resolves to the next free port.
|
||||
detect(DEFAULT_PORT).then(port => {
|
||||
if (port === DEFAULT_PORT) {
|
||||
run(port);
|
||||
return;
|
||||
}
|
||||
|
||||
if (isInteractive) {
|
||||
clearConsole();
|
||||
var existingProcess = getProcessForPort(DEFAULT_PORT);
|
||||
var question =
|
||||
chalk.yellow('Something is already running on port ' + DEFAULT_PORT + '.' +
|
||||
((existingProcess) ? ' Probably:\n ' + existingProcess : '')) +
|
||||
'\n\nWould you like to run the app on another port instead?';
|
||||
|
||||
prompt(question, true).then(shouldChangePort => {
|
||||
if (shouldChangePort) {
|
||||
run(port);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
console.log(chalk.red('Something is already running on port ' + DEFAULT_PORT + '.'));
|
||||
}
|
||||
});
|
|
@ -0,0 +1,31 @@
|
|||
process.env.NODE_ENV = 'test';
|
||||
process.env.PUBLIC_URL = '';
|
||||
|
||||
// Load environment variables from .env file. Suppress warnings using silent
|
||||
// if this file is missing. dotenv will never modify any environment variables
|
||||
// that have already been set.
|
||||
// https://github.com/motdotla/dotenv
|
||||
require('dotenv').config({silent: true});
|
||||
|
||||
const jest = require('jest');
|
||||
const argv = process.argv.slice(2);
|
||||
|
||||
// Watch unless on CI or in coverage mode
|
||||
if (!process.env.CI && argv.indexOf('--coverage') < 0) {
|
||||
argv.push('--watch');
|
||||
}
|
||||
|
||||
// A temporary hack to clear terminal correctly.
|
||||
// You can remove this after updating to Jest 18 when it's out.
|
||||
// https://github.com/facebook/jest/pull/2230
|
||||
var realWrite = process.stdout.write;
|
||||
var CLEAR = process.platform === 'win32' ? '\x1Bc' : '\x1B[2J\x1B[3J\x1B[H';
|
||||
process.stdout.write = function(chunk, encoding, callback) {
|
||||
if (chunk === '\x1B[2J\x1B[H') {
|
||||
chunk = CLEAR;
|
||||
}
|
||||
return realWrite.call(this, chunk, encoding, callback);
|
||||
};
|
||||
|
||||
|
||||
jest.run(argv);
|
Loading…
Reference in New Issue