xgqfrms / Gatsby-Tutorials-All-In-One

Gatsby-Tutorials-All-In-One
https://gatsby-react-app.xgqfrms.xyz
MIT License
1 stars 0 forks source link

copy readme.md error #3

Open xgqfrms opened 1 year ago

xgqfrms commented 1 year ago

copy readme.md error

  "scripts": {
    "copy": "cp ./README.md ./static/",
    "deploy": "npm run copy && gatsby build && gh-pages -d public master",
    "deploy-prefix": "gatsby build --prefix-paths && gh-pages -d public master",
    "app": "gatsby build && gh-pages -d public main",
    "dev": "gatsby develop",
    "start": "gatsby develop",
    "build": "gatsby build",
    "serve": "gatsby serve",
    "clean": "gatsby clean",
    "type-check": "tsc --noEmit"
  },

https://github.com/xgqfrms/Gatsby-Tutorials-All-In-One/tree/gh-pages

xgqfrms commented 1 year ago

https://github.com/xgqfrms/Gatsby-Tutorials-All-In-One/tree/master/.github/workflows

https://github.com/xgqfrms/Gatsby-Tutorials-All-In-One/actions/workflows/auto-depoly.yml

xgqfrms commented 1 year ago

https://www.gatsbyjs.com/docs/telemetry/

npm scripts 设置环境变量方法

image

https://remarkablemark.org/blog/2020/06/07/npm-environment-variables/

xgqfrms commented 1 year ago

禁用 gatsby telemetry

 Gatsby collects anonymous usage analytics                            ║
║   to help improve Gatsby for all users.                                ║
║                                                                        ║
║   If you'd like to opt-out, you can use `gatsby telemetry --disable`   ║
║   To learn more, checkout https://gatsby.dev/telemetry

https://gatsby.dev/telemetry

  "scripts": {
-   "dev": "gatsby develop",
+   "dev": "gatsby telemetry --disable && gatsby develop",
  },

image

macOS version

  "scripts": {
-   "dev": "gatsby develop",
+   "dev": "GATSBY_TELEMETRY_DISABLED=1 && gatsby develop",
  },

image

xgqfrms commented 1 year ago

手动构建 public

image