https://github.com/jyoketsu/treasure
https://github.com/jyoketsu/treasure
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/jyoketsu/treasure
- Owner: jyoketsu
- Created: 2019-11-14T01:33:44.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-05-07T06:52:31.000Z (about 2 years ago)
- Last Synced: 2025-02-10T13:15:53.813Z (3 months ago)
- Language: JavaScript
- Size: 10.5 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
```
_________ ________ _______ ________ ________ ___ ___ ________ _______
|\___ ___\\ __ \|\ ___ \ |\ __ \|\ ____\|\ \|\ \|\ __ \|\ ___ \
\|___ \ \_\ \ \|\ \ \ __/|\ \ \|\ \ \ \___|\ \ \\\ \ \ \|\ \ \ __/|
\ \ \ \ \ _ _\ \ \_|/_\ \ __ \ \_____ \ \ \\\ \ \ _ _\ \ \_|/__
\ \ \ \ \ \\ \\ \ \_|\ \ \ \ \ \|____|\ \ \ \\\ \ \ \\ \\ \ \_|\ \
\ \__\ \ \__\\ _\\ \_______\ \__\ \__\____\_\ \ \_______\ \__\\ _\\ \_______\
\|__| \|__|\|__|\|_______|\|__|\|__|\_________\|_______|\|__|\|__|\|_______|
\|_________|```
# 时光宝库
### 启动
```
npm start
```### 编译&发布
```
npm run publish
```### git 提交代码
```
sh commit.sh "提交说明"
```### npm install 出错
尝试执行以下命令
删除 package-lock.json```
sudo chown -R $USER:$GROUP ~/.npm
sudo chown -R $USER:$GROUP ~/.config
npm cache clean --force
```## 自动登录
```
`https://baoku.qingtime.cn/account/login?token=${token}&redirect_uri=/${domain}/home`
```## query 说明
- `onlyContent` 仅显示文章内容
- `hidePostButton` 隐藏投稿按钮
- `hide-head` 隐藏头部## 在 create-react-app 中 build 禁止生成源映射
create-react-app 会默认的在构建期间缩小代码并生成源映射,这样的话会在 build 文件夹的 js 目录生成.js 与.map 文件
.map 文件会随着我们打开 Developer Tools 时按需加载,我们就能看到构建前的原始代码
如果想要禁止 cli 生成源映射文件(.map),那么我们只需要修改根目录中 node_modules/react-scripts/config/webpack.config.prod.js 文件,将
```
devtool: isEnvProduction
? shouldUseSourceMap
? 'source-map'
: false
: isEnvDevelopment && 'cheap-module-source-map',
```修改为
```
devtool: false,
```### get a file or blob from an blob url
```
let blob = await fetch(blobUrl).then(r => r.blob());
```