init
This commit is contained in:
parent
eab01e3674
commit
17e5758155
56
README.md
56
README.md
@ -1,3 +1,59 @@
|
|||||||
|
## Office Table 转 HTML Table
|
||||||
|
|
||||||
|
Office Table 转 HTML Table。
|
||||||
|
|
||||||
|
在线体验:[https://table.yige.ink](https://table.yige.ink)
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
参考过一些开源项目的思路,时间太久,忘了。
|
||||||
|
|
||||||
|
在线测试
|
||||||
|
|
||||||
|
## html-minifier-service
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"name": "html-minifier-service",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"main": "index.js",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"body-parser": "^1.19.0",
|
||||||
|
"express": "^4.17.1",
|
||||||
|
"html-minifier": "^4.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
const app = require('express')()
|
||||||
|
const minify = require('html-minifier').minify
|
||||||
|
const port = 3567
|
||||||
|
const bodyParser = require('body-parser')
|
||||||
|
|
||||||
|
app.use(bodyParser.json({ limit: '50mb', extended: true }))
|
||||||
|
|
||||||
|
// respond with "hello world" when a GET request is made to the homepage
|
||||||
|
app.post('/', function(req, res) {
|
||||||
|
const result = minify(req.body.code, {
|
||||||
|
html5: true,
|
||||||
|
collapseInlineTagWhitespace: true,
|
||||||
|
collapseWhitespace: true,
|
||||||
|
removeAttributeQuotes: false,
|
||||||
|
minifyCSS: true,
|
||||||
|
minifyJS: true
|
||||||
|
})
|
||||||
|
|
||||||
|
res.json({
|
||||||
|
status: 1,
|
||||||
|
result
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
app.listen(port, () => console.log(`Example app listening on port ${port}!`))
|
||||||
|
```
|
||||||
|
|
||||||
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
|
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
|
||||||
|
|
||||||
## Available Scripts
|
## Available Scripts
|
||||||
|
BIN
preview.png
Normal file
BIN
preview.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 382 KiB |
Loading…
Reference in New Issue
Block a user