reorg dir structure:

- keep shared and electron build at root
- move static files for replayweb.page and Jekyll config to docs/
- move Jekyll markdown to docs/docs/
This commit is contained in:
Ilya Kreymer
2020-05-20 17:28:03 -07:00
parent 0b21581836
commit da1e5c03df
26 changed files with 48 additions and 40 deletions
+5 -8
View File
@@ -1,15 +1,12 @@
*.har
*.warc
*.warc.gz
!examples/*.warc
dist/sw.js
!docs/examples/*.warc
**/node_modules
yarn-error.log
coverage/
local-examples/
.DS_Store
.sass-cache/
_site/
**/local-examples/
**/.DS_Store
**/.sass-cache/
docs/_site/
dist/
!dist/frontend.js
!dist/embed.js
+7
View File
@@ -6,6 +6,13 @@ exports.default = async function notarizing(context) {
return;
}
if (process.env.CSC_IDENTITY_AUTO_DISCOVERY === "false") {
console.log('Skipped signing and notarizing');
return;
}
console.log('Notarizing...');
const appName = context.packager.appInfo.productFilename;
const password = `@keychain:WR Notarize`;
+11
View File
@@ -0,0 +1,11 @@
<!doctype html>
<html class="no-overflow">
<head>
</head>
<body>
Loading SW, Please wait...
<script>
navigator.serviceWorker.register("/swonly.js?replayPrefix=wabac&stats=true", {scope: window.location.origin + "/"}).then(() => window.location.reload());
</script>
</body>
</html>
View File
View File
View File
View File
+1 -1
View File
@@ -1,4 +1,4 @@
!function(t,e){for(var s in e)t[s]=e[s]}(self,function(t){var e={};function s(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,s),r.l=!0,r.exports}return s.m=t,s.c=e,s.d=function(t,e,n){s.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},s.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},s.t=function(t,e){if(1&e&&(t=s(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(s.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)s.d(n,r,function(e){return t[e]}.bind(null,r));return n},s.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return s.d(e,"a",e),e},s.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},s.p="/dist/",s(s.s=108)}({0:function(t,e,s){"use strict";s.d(e,"c",(function(){return d.e})),s.d(e,"d",(function(){return N})),s.d(e,"b",(function(){return C})),s.d(e,"a",(function(){return E}));var n=s(5),r=s(1);function i(t,e){const{element:{content:s},parts:n}=t,r=document.createTreeWalker(s,133,null,!1);let i=a(n),o=n[i],c=-1,l=0;const u=[];let d=null;for(;r.nextNode();){c++;const t=r.currentNode;for(t.previousSibling===d&&(d=null),e.has(t)&&(u.push(t),null===d&&(d=t)),null!==d&&l++;void 0!==o&&o.index===c;)o.index=null!==d?-1:o.index-l,i=a(n,i),o=n[i]}u.forEach(t=>t.parentNode.removeChild(t))}const o=t=>{let e=11===t.nodeType?0:1;const s=document.createTreeWalker(t,133,null,!1);for(;s.nextNode();)e++;return e},a=(t,e=-1)=>{for(let s=e+1;s<t.length;s++){const e=t[s];if(Object(r.d)(e))return s}return-1};var c=s(9),l=s(8),u=s(13),d=s(6);
!function(t,e){for(var s in e)t[s]=e[s]}(self,function(t){var e={};function s(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,s),r.l=!0,r.exports}return s.m=t,s.c=e,s.d=function(t,e,n){s.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},s.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},s.t=function(t,e){if(1&e&&(t=s(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(s.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)s.d(n,r,function(e){return t[e]}.bind(null,r));return n},s.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return s.d(e,"a",e),e},s.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},s.p="/",s(s.s=108)}({0:function(t,e,s){"use strict";s.d(e,"c",(function(){return d.e})),s.d(e,"d",(function(){return N})),s.d(e,"b",(function(){return C})),s.d(e,"a",(function(){return E}));var n=s(5),r=s(1);function i(t,e){const{element:{content:s},parts:n}=t,r=document.createTreeWalker(s,133,null,!1);let i=a(n),o=n[i],c=-1,l=0;const u=[];let d=null;for(;r.nextNode();){c++;const t=r.currentNode;for(t.previousSibling===d&&(d=null),e.has(t)&&(u.push(t),null===d&&(d=t)),null!==d&&l++;void 0!==o&&o.index===c;)o.index=null!==d?-1:o.index-l,i=a(n,i),o=n[i]}u.forEach(t=>t.parentNode.removeChild(t))}const o=t=>{let e=11===t.nodeType?0:1;const s=document.createTreeWalker(t,133,null,!1);for(;s.nextNode();)e++;return e},a=(t,e=-1)=>{for(let s=e+1;s<t.length;s++){const e=t[s];if(Object(r.d)(e))return s}return-1};var c=s(9),l=s(8),u=s(13),d=s(6);
/**
* @license
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
+1 -1
View File
@@ -1,4 +1,4 @@
!function(e,t){for(var i in t)e[i]=t[i]}(self,function(e){var t={};function i(a){if(t[a])return t[a].exports;var o=t[a]={i:a,l:!1,exports:{}};return e[a].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=e,i.c=t,i.d=function(e,t,a){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(i.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)i.d(a,o,function(t){return e[t]}.bind(null,o));return a},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="/dist/",i(i.s=203)}({0:function(e,t,i){"use strict";i.d(t,"c",(function(){return b.e})),i.d(t,"d",(function(){return _})),i.d(t,"b",(function(){return $})),i.d(t,"a",(function(){return T}));var a=i(5),o=i(1);function r(e,t){const{element:{content:i},parts:a}=e,o=document.createTreeWalker(i,133,null,!1);let r=s(a),n=a[r],l=-1,c=0;const d=[];let b=null;for(;o.nextNode();){l++;const e=o.currentNode;for(e.previousSibling===b&&(b=null),t.has(e)&&(d.push(e),null===b&&(b=e)),null!==b&&c++;void 0!==n&&n.index===l;)n.index=null!==b?-1:n.index-c,r=s(a,r),n=a[r]}d.forEach(e=>e.parentNode.removeChild(e))}const n=e=>{let t=11===e.nodeType?0:1;const i=document.createTreeWalker(e,133,null,!1);for(;i.nextNode();)t++;return t},s=(e,t=-1)=>{for(let i=t+1;i<e.length;i++){const t=e[i];if(Object(o.d)(t))return i}return-1};var l=i(9),c=i(8),d=i(13),b=i(6);
!function(e,t){for(var i in t)e[i]=t[i]}(self,function(e){var t={};function i(a){if(t[a])return t[a].exports;var o=t[a]={i:a,l:!1,exports:{}};return e[a].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=e,i.c=t,i.d=function(e,t,a){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(i.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)i.d(a,o,function(t){return e[t]}.bind(null,o));return a},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="/",i(i.s=203)}({0:function(e,t,i){"use strict";i.d(t,"c",(function(){return b.e})),i.d(t,"d",(function(){return _})),i.d(t,"b",(function(){return $})),i.d(t,"a",(function(){return T}));var a=i(5),o=i(1);function r(e,t){const{element:{content:i},parts:a}=e,o=document.createTreeWalker(i,133,null,!1);let r=s(a),n=a[r],l=-1,c=0;const d=[];let b=null;for(;o.nextNode();){l++;const e=o.currentNode;for(e.previousSibling===b&&(b=null),t.has(e)&&(d.push(e),null===b&&(b=e)),null!==b&&c++;void 0!==n&&n.index===l;)n.index=null!==b?-1:n.index-c,r=s(a,r),n=a[r]}d.forEach(e=>e.parentNode.removeChild(e))}const n=e=>{let t=11===e.nodeType?0:1;const i=document.createTreeWalker(e,133,null,!1);for(;i.nextNode();)t++;return t},s=(e,t=-1)=>{for(let i=t+1;i<e.length;i++){const t=e[i];if(Object(o.d)(t))return i}return-1};var l=i(9),c=i(8),d=i(13),b=i(6);
/**
* @license
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
+1 -1
View File
@@ -1,7 +1,7 @@
<!doctype html>
<html class="no-overflow">
<head>
<script src="./dist/frontend.js"></script>
<script src="./frontend.js"></script>
<!--<link href="./dist/frontend.css" rel="stylesheet"/>-->
</head>
<body>
Executable
+4
View File
@@ -0,0 +1,4 @@
#!/bin/bash
export PATH=/usr/local/opt/ruby/bin:$PATH
bundle update
bundle exec jekyll serve --trace
+1 -1
View File
File diff suppressed because one or more lines are too long
-3
View File
@@ -1,3 +0,0 @@
import './src/frontend';
+5 -4
View File
@@ -42,17 +42,18 @@
"build-electron": "yarn run build && yarn run pack"
},
"build": {
"afterSign": "notarize.js",
"afterSign": "build/notarize.js",
"productName": "ReplayWeb.page",
"asar": true,
"appId": "net.webrecorder.replaywebpage",
"artifactName": "${name}-${version}.${ext}",
"files": [
"!**/*",
"!**/node_modules/**/*",
"package.json",
"dist/*.js",
"index.html",
"sw.js",
"package.json"
"docs/*.js",
"docs/index.html"
],
"extraResources": [
"plugins"
+6 -3
View File
@@ -19,19 +19,22 @@ const REPLAY_PREFIX = STATIC_PREFIX + "wabac/";
const STATIC_PATHS = {
'index.html': 'text/html',
'dist/frontend.js': 'application/javascript',
'dist/sw.js': 'application/javascript',
'frontend.js': 'application/javascript',
'sw.js': 'application/javascript'
};
const URL_RX = /([^\/]+)\/([\d]+)(?:\w\w_)?\/(.*)$/;
const appPath = app.getAppPath();
const projPath = path.join(appPath, "../");
const staticContentPath = path.join(__dirname, "../", "docs");
const pluginPath = path.join(projPath, "plugins", "PepperFlashPlayer.plugin");
console.log('app path', appPath);
console.log('dir name', __dirname);
console.log('proj path', projPath);
console.log('plugin path', pluginPath);
@@ -72,7 +75,7 @@ async function doIntercept(request, callback) {
const type = STATIC_PATHS[filename];
if (type) {
const fullPath = path.join(__dirname, "../", filename);
const fullPath = path.join(staticContentPath, filename);
console.log("fullPath: " + fullPath);
+6 -18
View File
@@ -63,23 +63,11 @@ const browserConfig = (env, argv) => {
},
output: {
path: path.join(__dirname, 'dist'),
filename: (chunkData) => {
switch (chunkData.chunk.name) {
case 'sw':
return !IS_DEV_SERVER ? '../[name].js': '[name].js';
case 'wombat':
return '../static/[name].js';
case 'frontend':
default:
return '[name].js';
}
},
path: path.join(__dirname, 'docs'),
filename: '[name].js',
libraryTarget: 'self',
globalObject: 'self',
publicPath: '/dist/'
publicPath: '/'
},
externals: {
@@ -89,15 +77,15 @@ const browserConfig = (env, argv) => {
devServer: {
compress: true,
port: 9990,
headers: {'Service-Worker-Allowed': '/'},
open: false,
publicPath: '/dist/'
contentBase: path.join(__dirname, 'docs'),
publicPath: '/'
},
plugins: [
new MiniCssExtractPlugin(),
new webpack.DefinePlugin({
__SW_PATH__: JSON.stringify(!IS_DEV_SERVER ? './sw.js' : './dist/sw.js'),
__SW_PATH__: JSON.stringify('./sw.js'),
__APP_FILE_SERVE_PREFIX__ : JSON.stringify(APP_FILE_SERVE_PREFIX),
}),
],