@samitouri / QOS-React / commits / 9b96b1f809

Updated deploy scripts and pre-release template

Brian Vaughn committed Feb 23, 2019 at 08:59 UTC 9b96b1f809f939eee258ae5992ea2692647a612a
5 files changed +97 -15
shells/browser/shared/deploy.chrome.html new
+8
@@ -0,0 +1,8 @@
1 +<ol>
2 + <li><a href="packed.zip">download extension</a></li>
3 + <li>Double-click to extract</li>
4 + <li>Visit <code>chrome://extensions</code></li>
5 + <li>Ensure "Developer Mode" is enabled</li>
6 + <li>Click "LOAD UNPACKED"</li>
7 + <li>Select extension</li>
8 +</ol>
\ No newline at end of file
shells/browser/shared/deploy.firefox.html new
+6
@@ -0,0 +1,6 @@
1 +<ol>
2 + <li><a href="packed.zip">download extension</a></li>
3 + <li>Visit <code>about:debugging</code></li>
4 + <li>Click "Load Temporary Add-on"</li>
5 + <li>Select extension</li>
6 +</ol>
\ No newline at end of file
shells/browser/shared/deploy.html new
+46
@@ -0,0 +1,46 @@
1 +<html>
2 +<head>
3 + <meta charset="utf8">
4 + <title>React DevTools pre-release</title>
5 + <meta name="viewport" content="width=device-width, initial-scale=1">
6 + <style>
7 + body {
8 + font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial,
9 + sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol;
10 + font-size: 14px;
11 + }
12 + </style>
13 +</head>
14 +<body>
15 + <h1>
16 + React DevTools pre-release
17 + </h1>
18 +
19 + <h3>
20 + Created on <strong>%date%</strong> from
21 + <a href="http://github.com/bvaughn/react-devtools-experimental/commit/%commit%"><code>%commit%</code></a>
22 + </h3>
23 +
24 + <p>
25 + This is a preview build of an <a href="https://github.com/bvaughn/react-devtools-experimental">unreleased DevTools extension</a>.
26 + It has no developer support.
27 + </p>
28 +
29 + <h2>Installation instructions</h2>
30 + %installation%
31 + <p>
32 + If you already have the React DevTools extension installed, you will need to temporarily disable or remove it in order to install this prerelease build.
33 + </p>
34 +
35 + <h2>Bug reports</h2>
36 + <p>
37 + Please report bugs as <a href="https://github.com/bvaughn/react-devtools-experimental/issues/new?labels=bug">GitHub issues</a>.
38 + Please include all of the info required to reproduce the bug (e.g. links, code, instructions).
39 + </p>
40 +
41 + <h2>Feature requests</h2>
42 + <p>
43 + Feature requests are not being accepted at this time.
44 + </p>
45 +</body>
46 +</html>
shells/browser/shared/deploy.js
+15 -14
@@ -23,20 +23,21 @@ const main = async buildId => {
23 .toString()
24 .trim()
25 .substr(0, 7);
26 - const date = new Date();
27 -
28 - writeFileSync(
29 - join(buildPath, 'index.html'),
30 - `
31 - <html>
32 - <body>
33 - <h1>${date.toLocaleDateString()} – ${date.toLocaleTimeString()}</h1>
34 - <h2>Source <a href="http://github.com/bvaughn/react-devtools-experimental/commit/${commit}">${commit}</a></h2>
35 - <a href="packed.zip">packed.zip</a>
36 - </body>
37 - </html>
38 - `
39 - );
26 +
27 + let date = new Date();
28 + date = `${date.toLocaleDateString()} – ${date.toLocaleTimeString()}`;
29 +
30 + const installationInstructions =
31 + buildId === 'chrome'
32 + ? readFileSync(join(__dirname, 'deploy.chrome.html'))
33 + : readFileSync(join(__dirname, 'deploy.firefox.html'));
34 +
35 + let html = readFileSync(join(__dirname, 'deploy.html')).toString();
36 + html = html.replace(/%commit%/g, commit);
37 + html = html.replace(/%date%/g, date);
38 + html = html.replace(/%installation%/, installationInstructions);
39 +
40 + writeFileSync(join(buildPath, 'index.html'), html);
41
42 await exec(`now deploy && now alias ${alias}`, {
43 cwd: buildPath,
shells/dev/index.html
+22 -1
@@ -24,11 +24,32 @@
24 bottom: 0;
25 margin: 0;
26 padding: 0;
27 + font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial,
28 + sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol;
29 + font-size: 12px;
30 + line-height: 1.5;
31 + }
32 + .optionsRow {
33 + width: 100%;
34 + display: flex;
35 + padding: 0.25rem;
36 + background: aliceblue;
37 + border-bottom: 1px solid lightblue;
38 + }
39 + .optionsRowSpacer {
40 + flex: 1;
41 }
42 </style>
43 </head>
44 <body>
31 - <button id="mountButton">Unmount test app</button>
45 + <div class="optionsRow">
46 + <button id="mountButton">Unmount test app</button>
47 + <div class="optionsRowSpacer">&nbsp;</div>
48 + <span>
49 + <a href="https://react-devtools-experimental-chrome.now.sh/">Chrome extension</a>
50 + <a href="https://react-devtools-experimental-firefox.now.sh/">Firefox extension</a>
51 + </span>
52 + </div>
53
54 <!-- React test app (shells/dev/app) is injected here -->
55 <!-- DevTools backend (shells/dev/src) is injected here -->