Browse Source

Build and deploy via yarn deploy

hazam 5 năm trước cách đây
mục cha
commit
b36110ef03
3 tập tin đã thay đổi với 8 bổ sung48 xóa
  1. 6 0
      .gitignore
  2. 0 47
      docs/index.html
  3. 2 1
      package.json

+ 6 - 0
.gitignore

@@ -5,6 +5,12 @@ npm-debug.log*
 yarn-debug.log*
 yarn-error.log*
 
+# Build artifacts
+build
+
 # Dependency directories
 node_modules/
+
+# Editors
 .vscode/
+

+ 0 - 47
docs/index.html

@@ -1,47 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-  <head>
-    <meta charset="UTF-8" />
-    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
-    <title>Excalidraw</title>
-    <style>
-      :root {
-        --bg-color: #eee;
-        --text-color: black;
-      }
-
-      html {
-        height: 100%;
-        background: var(--bg-color);
-        color: var(--text-color);
-        font-family: sans-serif;
-      }
-
-      body {
-        margin: 0;
-        height: 100%;
-        display: flex;
-        align-items: center;
-        justify-content: center;
-      }
-
-      .title {
-        font-size: 4em;
-        text-transform: uppercase;
-      }
-
-      @media (prefers-color-scheme: dark) {
-        body {
-          --bg-color: #333;
-          --text-color: white;
-        }
-      }
-    </style>
-  </head>
-  <body>
-    <h1 class="title">
-      excalidraw
-    </h1>
-  </body>
-</html>

+ 2 - 1
package.json

@@ -1,5 +1,6 @@
 {
   "name": "react",
+  "homepage": "https://www.excalidraw.com",
   "version": "1.0.0",
   "description": "",
   "keywords": [],
@@ -25,7 +26,7 @@
     "build": "react-scripts build",
     "test": "react-scripts test --env=jsdom",
     "eject": "react-scripts eject",
-    "deploy": "gh-pages -d docs"
+    "deploy": "react-scripts build && gh-pages -d build"
   },
   "browserslist": [
     ">0.2%",