You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by sh...@apache.org on 2021/08/31 03:11:38 UTC
[echarts-handbook] branch master updated: dont generate app.html
each time
This is an automated email from the ASF dual-hosted git repository.
shenyi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/echarts-handbook.git
The following commit(s) were added to refs/heads/master by this push:
new b3ceb65 dont generate app.html each time
b3ceb65 is described below
commit b3ceb6591e7105b466a5e913bb148d674b095092
Author: pissang <bm...@gmail.com>
AuthorDate: Tue Aug 31 11:11:23 2021 +0800
dont generate app.html each time
---
build/generate.js | 44 --------------------------------------------
1 file changed, 44 deletions(-)
diff --git a/build/generate.js b/build/generate.js
index 2ff2e4c..2d13b50 100644
--- a/build/generate.js
+++ b/build/generate.js
@@ -2,50 +2,6 @@ const fetch = require('node-fetch')
const path = require('path')
const fs = require('fs')
-const config = {
- cdnThirdParty: {
- jquery: 'https://cdn.jsdelivr.net/npm/jquery@2.2.4/dist/jquery.min.js',
- bootstrapCSS:
- 'https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css',
- bootstrapJS:
- 'https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js'
- },
- cdnPayRootMap: 'https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site'
-}
-
-let template = `<!DOCTYPE html>
-<html {{ HTML_ATTRS }}>
- <head {{ HEAD_ATTRS }}>
- <link rel="stylesheet" type="text/css" href="{{ bootstrapCSS }}">
- <link rel="stylesheet" type="text/css" href="{{ cdnPayRootMap }}/zh/css/main.css">
- {{ HEAD }}
- </head>
- <body {{ BODY_ATTRS }}>
- {{ APP }}
- <script src="{{ jquery }}"></script>
- <script src="{{ bootstrapJS }}"></script>
- </body>
-</html>
-`
-template = template.replace(
- new RegExp('{{ bootstrapCSS }}', 'g'),
- config.cdnThirdParty.bootstrapCSS
-)
-template = template.replace(
- new RegExp('{{ jquery }}', 'g'),
- config.cdnThirdParty.jquery
-)
-template = template.replace(
- new RegExp('{{ bootstrapJS }}', 'g'),
- config.cdnThirdParty.bootstrapJS
-)
-template = template.replace(
- new RegExp('{{ cdnPayRootMap }}', 'g'),
- config.cdnPayRootMap
-)
-
-fs.writeFileSync('./app.html', template, 'utf-8')
-
async function updateNav() {
for (let locale of ['zh', 'en']) {
console.log('Fetching...', `http://echarts.apache.org//${locale}/nav.html`)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org