This is an automated email from the ASF dual-hosted git repository.

wangzx pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/echarts-doc.git


The following commit(s) were added to refs/heads/master by this push:
     new a5d803b3 tweak extractOptionKeys tool
a5d803b3 is described below

commit a5d803b3b5f65d3849c6deeafd832f3527c74719
Author: plainheart <[email protected]>
AuthorDate: Wed Apr 24 12:50:16 2024 +0800

    tweak extractOptionKeys tool
---
 tool/extractOptionKeys.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tool/extractOptionKeys.js b/tool/extractOptionKeys.js
index 1a4d6da5..7d37effb 100644
--- a/tool/extractOptionKeys.js
+++ b/tool/extractOptionKeys.js
@@ -3,4 +3,7 @@ const path = require('node:path');
 const { extractOptionKeys } = require('./schemaHelper');
 
 const schema = JSON.parse(fs.readFileSync(path.resolve(__dirname, 
'../public/zh/documents/option.json'), 'utf-8'));
-console.log(JSON.stringify(extractOptionKeys(schema)));
\ No newline at end of file
+
+const header = `// THIS FILE IS GENERATED, DON'T MODIFY\n/* eslint-disable */`;
+
+fs.writeFileSync(`./option-keywords.js`, `${header}\nexport const keywords = 
${JSON.stringify(extractOptionKeys(schema))};`);
\ No newline at end of file


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to