支持web components的、使用ES6、rollup的Cesium三维数字地球配置方案。支持开发环境模块热加载、浏览器调试Cesium源码。
2022年3月5日 当前只是初始化三维地球,暂无计划做更多功能。
使用open-wc 初始化的特性
-
集成
lit(web组件)Lit is a simple library for building fast, lightweight web components.
-
使用
rollupRollup is a module bundler for JavaScript which compiles small pieces of code into something larger and more complex, such as a library or application.
-
使用
web-dev-server,配置支持热加载,支持ES6代码在浏览器环境运行调试Node.js simple http server for common development or training purposes.
-
支持
storybook和测试(我删掉了)Storybook is an open source tool for building UI components and pages in isolation. It streamlines UI development, testing, and documentation.
-
使用
husky配置git提交前任务,执行eslint和prettier代码格式化 -
editorconfig配置等等
An open-source JavaScript library for world-class 3D globes and maps
Cesium库本身依赖众多资源文件和内部众多worker.js 。所以支持开发环境和打包的配置有一点点复杂,其中Cesium提供了一个cesium-webpack-example的应用示例可以参考。
使用open-wc,删除了storybook和测试相关文件,调整配置Cesium。该示例启动时加载提示,初始化完地球以后飞行到指定视角。
npm install
npm run start
npm run lint
npm run format
npm run build
npm run start:build
