![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
这是一个 GIS 编辑器的项目
可选
该项目脚手架使用 Nx 创建,Nx 是智能,快速,可扩展的构建系统,具有开箱即用的 monorepo 管理能力。其详细的介绍和使用说明请参阅官网相关文档。
常用命令说明
pnpm nx g @nrwl/react:app <应用名称>
来添加新的 React 应用到应用目录中pnpm nx g @nrwl/react:lib <公共库名称>
来添加新的 React 库到公共库目录中pnpm nx g @nrwl/js:lib <公共库名称>
来添加新的库到公共库目录中该项目以 PNPM 为包管理工具,其作为 NPM 的替代品,具有高性能,低磁盘占用及更合理的依赖管理方式等特性。其详细的介绍和使用说明请参阅官网相关文档。
常用命令说明
pnpm install
来安装项目所需的所有依赖,并确保安装成功pnpm add <...依赖名称>
来安装指定的依赖pnpm add <...依赖名称> --save-dev
来安装指定的开发依赖pnpm remove <...依赖名称>
来删除指定的依赖pnpm <脚本名称>
来执行 package.json
中 scripts
字段内的脚本命令pnpm <可执行文件>
来执行项目中安装的可执行文件apps
目录下,公共库放置于 libs
目录下pnpm cz
替代 git commit
来交互式的编写提交信息kebab-case
的命名风格,例如 my-app
,my-lib
,some-service
等,避免使用 myApp
,MyApp
等形式功能.类型.文件扩展名
的命名格式,功能
部分的名称采用 kebab-case
的命名风格,类型
部分有且只有一个单词,且为单数形式,例如,project.hook.ts
,http.service.ts
,等等类型
部分不得使用任何形式的简写,例如,http.srv.ts
,可采用常见的名称缩写,scene.dto.ts
class
interface
type
enum
类型应采用 PascalCase
的命名风格,例如 MyClass
, MyInterface
,MyType
enum
的名称避免使用复数形式,例如 MyTypes
CONSTANT_CASE
的命名风格,例如 BASE_HREF
on
开头,例如 onClick
/ onChange
,避免使用 handleXx
的命名方式,保持回调参数名称和回调函数名称保持一致onSomeThingChange
的方式命名,即 on
+ 名词
+ 动词
的形式,例如 onItemClick
,onNameChange
等等<Input onChange={onChange} />
,这样在做回调函数透传的时候可以保持名称一致,例如 <Input onChange={props.onChange} />
apps/
目录用于放置应用相关的项目,libs/
目录用于放置公共库相关的项目,例如 apps/my-app/
或 libs/my-lib/
src/app
目录下的子文件夹视为应用中的顶级模块,顶级模块下的子文件夹可以作为顶级模块的子模块,子模块不应再包含子模块。顶级模块及其子模块可以通过别名的方式在项目中的任意位置引用到。除此之外不允许通过别名方式引用其他模块。顶级模块的子模块不应再从顶级模块导出,而是直接通过子模块的别名进行引用。
所有文件夹中的公共模块应通过 index.ts
文件层层导出供文件夹外部的模块使用。
例如下列目录结构
common
constants
core
三个顶级模块,可以在其他模块中直接通过 @gis/common
@gis/constants
@gis/core
导入使用,http
模块作为次顶级模块可以通过 @gis/common/http
导入到模块中使用,但是需要注意的是,common
模块不应该包含 http
模块的公共接口,即 http
模块的公共接口只能从 @gis/common/http
导入。common
模块下的 utils
模块作为内部模块,不应该通过 @gis/common/utils
来引用,应该在 src/app/common/index.ts
文件中将其导出,并通过 @gis/common
来导入其公共接口
└── src/
└── app/
├── common/ # 公共模块,顶级模块,通过 @gis/common 引用
│ ├── index.ts # 公共模块的导出文件,所有非子模块的公共的接口应通过该文件导出
│ ├── http/ # HTTP 模块,作为顶级模块的子模块,通过 @gis/common/http 引用
│ │ ├── index.ts # HTTP 模块的导出文件,所有公共的接口通过该文件导出
│ │ └── http.ts # HTTP 相关的功能,通过 index.ts 导出
│ └── utils/ # 工具模块,内部模块,应在 src/app/common/index.ts 中导出供外部使用
├── constants/
└── core/
详细的编码风格指南请参照 CODING_STYLE_GUIDE
应用的详细说明请参阅应用各自的说明文档
FAQs
Unknown package
The npm package hc-gis receives a total of 0 weekly downloads. As such, hc-gis popularity was classified as not popular.
We found that hc-gis demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.