Git Product home page Git Product logo

amap-js-api-workspace's Introduction

用于编写高德地图TypeScript定义的工作区,通过工作区可以在定义实际发布到DefinitelyTyped/DefinitelyTyped 前代码分模块编写、测试。

目录介绍

|-- pg-dist         用于测试demo的输出目录,用于测试类型定义的接口的返回值与选项。分模块存放
|-- playground      demo的源码
|-- script          存放各个功能脚本
|-- type-dist       类型定义输出目录
|-- type-template   用于新建类型定义的模板
|-- types           类型定义的源码,分模块存放
|-- .env            一些配置变量

新建

yarn create-type name [-D dependencies]

执行新建脚本后会在types目录新建一个新的目录,-D可以添加依赖引用到index.d.ts中。

生成目录中会有一个meta.json文件,用于配置编译结果,结构如下:

{
    "authors": [                // 用于输出index.d.ts头部注释作者行
        {
            "name": "name",
            "github": "url"
        }
    ],
    "project": "project url"    // 用于输出index.d.ts头部注释项目地址
}

测试

yarn lint typeName          # 测试指定的模块

输出

yarn build:pg               # 编译demo并输出
yarn pg                     # 编译demo并更新pg-dist/index.html
yarn build:type typeName    # 编译指定模块并输出

build:type指令输出的文件能直接复制到DefinitelyTyped/DefinitelyTyped项目中, 经过测试即可发布提交PR发布。

清理

yarn clean:pg               # 删除demo输出
yarn clean:dist             # 删除type输出

amap-js-api-workspace's People

Contributors

breeze9527 avatar dependabot[bot] avatar fourcels avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

amap-js-api-workspace's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.