fix: turotial
6 files changed
tree: 046706fe566684049f58d93ce3aab550b91e029b
  1. .gitignore
  2. .htaccess
  3. 404.html
  4. README.md
  5. about.html
  6. api.html
  7. asset/
  8. builder.html
  9. builder/
  10. builder3.html
  11. changelog.html
  12. cheat-sheet.html
  13. coding-standard.html
  14. committer.html
  15. css/
  16. demo.html
  17. dist/
  18. documents/
  19. download-extension.html
  20. download-map.html
  21. download-theme.html
  22. download.html
  23. download3.html
  24. en/
  25. examples.html
  26. examples/
  27. faq.html
  28. feature.html
  29. images/
  30. index.html
  31. js/
  32. maillist.html
  33. option-gl.html
  34. option.html
  35. option3.html
  36. spreadsheet.html
  37. tutorial.html
  38. vendors/
  39. video/
  40. zh/
README.md

Incubator ECharts Website

Setup

Clone this project, alone with echarts, echarts-www, echarts-examples, echarts-doc under the same directory.

Debug Locally

Edit echarts-www/config/env.debug.js and echarts-examples/config/env.debug.js. Change host to be the path to local debug server and examples.

For example, if you use http-server to start a server http://127.0.0.1:8080 under incubator-echarts-website directory, host in the two projects should be http://127.0.0.1:8080 and http://127.0.0.1:8080/examples accordingly.

  1. Run gulp release --dev under echarts-examples.

  2. Run sh release.sh under echarts-doc.

  3. Run gulp release --dev under echarts-www.

  4. Run a server under incubator-echarts-website directory and test.

Build Release

Execute the following (optional) steps sequentially.

Prepare

export ECHARTS_BASE="/your/local/base/dir/path/of/these/projects"

If the built-in echarts dist needs to be upated

Prepare echarts source code

cd ${ECHARTS_BASE}/echarts
git checkout release # Make sure in `release branch`
git pull
git status # Make sure there is no modification in `src`.

Copy echarts dist files and source code for custom builder:

# Copy dist files:
cp -r ${ECHARTS_BASE}/echarts/dist/* ${ECHARTS_BASE}/echarts-www/dist
ls -alF ${ECHARTS_BASE}/echarts-www/dist
# Copy source code:
rm -r ${ECHARTS_BASE}/echarts-www/builder/src/echarts
rm -r ${ECHARTS_BASE}/echarts-www/builder/src/zrender
cp -r ${ECHARTS_BASE}/echarts/src ${ECHARTS_BASE}/echarts-www/builder/src/echarts
cp -r ${ECHARTS_BASE}/zrender/src ${ECHARTS_BASE}/echarts-www/builder/src/zrender
cat ${ECHARTS_BASE}/echarts-www/builder/src/echarts/echarts.js | grep version
cat ${ECHARTS_BASE}/echarts-www/builder/src/zrender/zrender.js | grep version
${ECHARTS_BASE}/echarts-www/builder/pre/removeDEV.js # remove __DEV__

If the release download list needs to be updated

code ${ECHARTS_BASE}/echarts-www/js/download.js
# Add the new release to the download list manually.

If echarts-examples needs to be updated

If any of the thumbnails need to be updated

cd ${ECHARTS_BASE}/echarts-examples/tool
node build-example.js

If the built-in echarts needs to be updated

cd ${ECHARTS_BASE}/echarts-examples
sh update-echarts.sh --only-copy-dist

If incubator-echarts-website needs to be built and published

Clear

rm -r ${ECHARTS_BASE}/echarts-www/release
rm ${ECHARTS_BASE}/echarts-www/echarts-www.zip

Build echarts-examples

sh ${ECHARTS_BASE}/echarts-examples/release.sh --env asf
# sh ${ECHARTS_BASE}/echarts-examples/release.sh --env echartsjs

Build echarts-doc Ensure “echarts-doc” is on the correct git branch (relase branch).

sh ${ECHARTS_BASE}/echarts-doc/release.sh --env asf
# sh ${ECHARTS_BASE}/echarts-doc/release.sh --env echartsjs
ls -alF ${ECHARTS_BASE}/echarts-www/documents/cn
ls -alF ${ECHARTS_BASE}/echarts-www/documents/en
ls -alF ${ECHARTS_BASE}/echarts-www/documents/asset/

Build echarts-www

sh ${ECHARTS_BASE}/echarts-www/release.sh --env asf
# sh ${ECHARTS_BASE}/echarts-www/release.sh --env echartsjs

Clear

rm -r ${ECHARTS_BASE}/echarts-www/release
rm ${ECHARTS_BASE}/echarts-www/echarts-www.zip

Then commit and push to asf-site branch.

Then initiate a building job at https://gitbox.apache.org/setup/resync.cgi by searching incubator-echarts-website.

Then wait for several minutes and Website should be generated at https://echarts.apache.org/.