-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: use
quote.txt
instead of dist/quote.txt
to avoid errors
- Loading branch information
Showing
2 changed files
with
5 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
var c=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var h=Object.prototype.hasOwnProperty;var p=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of l(e))!h.call(t,n)&&n!==o&&c(t,n,{get:()=>e[n],enumerable:!(r=a(e,n))||r.enumerable});return t};var g=t=>p(c({},"__esModule",{value:!0}),t);var u={};module.exports=g(u);var i=require("path"),s=require("fs/promises");(async()=>{let t=await fetch("https://v0.elegant.tw/all").then(o=>o.json()),e=`${t.sentence} | ||
\u2014\u2014${t.author!==null?t.author:t.cite} | ||
var c=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var h=Object.prototype.hasOwnProperty;var p=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of l(t))!h.call(e,n)&&n!==o&&c(e,n,{get:()=>t[n],enumerable:!(r=a(t,n))||r.enumerable});return e};var g=e=>p(c({},"__esModule",{value:!0}),e);var u={};module.exports=g(u);var i=require("path"),s=require("fs/promises");(async()=>{let e=await fetch("https://v0.elegant.tw/all").then(o=>o.json()),t=`${e.sentence} | ||
\u2014\u2014${e.author!==null?e.author:e.cite} | ||
\u65BC ${new Date().toLocaleString("zh-TW",{timeZone:"Asia/Taipei",hourCycle:"h23"})} \u66F4\u65B0`;console.log(` | ||
${e} | ||
`);try{await(0,s.writeFile)((0,i.join)(process.cwd(),"dist/quote.txt"),e)}catch(o){console.error(`FATAL: ${o}`),process.exit(1)}console.log(`INFO: \u6210\u529F\u5132\u5B58\u3002 | ||
${t} | ||
`);try{await(0,s.writeFile)((0,i.join)(process.cwd(),"quote.txt"),t)}catch(o){console.error(`FATAL: ${o}`),process.exit(1)}console.log(`INFO: \u6210\u529F\u5132\u5B58\u3002 | ||
`)})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters