![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
tt-ide-cli
Advanced tools
tma
是字节跳动小程序官方提供的命令行工具
建议在全局安装 tma
npm install -g tt-ide-cli
主要用于配置工具的全局代理
命令行使用
Usage: tma set-config [options]
Set tt-ide-cli config
Options:
--proxy <proxy> Set global proxy(配置全局代理)
--default Use default(恢复为默认配置)
代码调用
const tma = require('tt-ide-cli');
await tma.setConfig({
proxy: 'http://127.0.0.1:8899';
});
在当前目录下,以给定的项目名字创建一个空白的小程序项目。
命令行使用
Usage: tma create [options] <project-name>
Create a new project with given name in current folder
Options:
-f, --force Overwrite target directory if it exists
代码调用
const tma = require('tt-ide-cli');
await tma.create({
projectName: 'projectName',
force: false, // 是否覆盖目标文件夹
template: 'rich', // 'rich' | 'empty'
// rich 为小程序能力展示 DEMO
// empty 为小程序空项目
targetDir: 'targetDir',
});
在小程序开发者工具中打开给定目录的项目。 如果给定的目录不存在,则仅打开开发者工具。
命令行使用
Usage: tma open <project-path>
Open target project by path
代码调用
const tma = require('tt-ide-cli');
await tma.open({
project: {
path: 'projectPath',
},
});
登录到开发者平台。
命令行使用
Usage: tma login [options]
Login to the developer platform
Options:
-m, --mobile Login by mobile
-e, --email Login by email
-p, --proxy <proxy> Login with proxy
-h, --help output usage information
命令行使用
Usage: login-e [email] [password]
Login to the developer platform by E-mail
Options:
-p, --proxy <proxy> Login with proxy
-h, --help Output usage information
代码调用
const tma = require('tt-ide-cli');
await tma.loginByEmail({
email: 'email',
password: 'password',
});
将项目上传后,扫码二维码来预览小程序。
命令行使用
Usage: cli preview [options] [entry]
Preview project by remote
Options:
--disable-cache Preview project without local cache
-s, --small Use small QR Code, it may fail in some environments
-c, --copy Copy remote url to clipboard
-p, --proxy <proxy> Preview with proxy
--miniapp-path <path> Miniapp path
--miniapp-query <query> Miniapp query
--miniapp-scene <scene> Miniapp scene
--miniapp-launch-from <launchFrom> Miniapp launchFrom
--miniapp-location <location> Miniapp location
--qrcode-output <qrcodeOutputPath> Qrcode output path
代码调用
const tma = require('tt-ide-cli');
// previewResult 返回值
interface ProjectQRCode {
expireTime: number; // 二维码过期时间
shortUrl: string; // 二维码短链
originSchema: string; // 二维码 schema
qrcodeSVG?: string; // 二维码 SVG
qrcodeFilePath?: string; // 二维码存储路径
useCache: boolean; // 是否命中并使用缓存
}
const previewResult: ProjectQRCode = await tma.preview({
project: {
path: 'projectPath', // 项目地址
},
page: {
path: '', // 小程序打开页面
query: '', // 小程序打开 query
scene: '', // 小程序打开场景值
launchFrom: '', // 小程序打开场景(未知可填空字符串)
location: '', // 小程序打开位置(未知可填空字符串)
},
qrcode: {
format: 'imageSVG', // imageSVG | imageFile | null | terminal
// imageSVG 用于产出二维码 SVG
// imageFile 用于将二维码存储到某个路径
// terminal 用于将二维码在控制台输出
// null 则不产出二维码
output: '', // 只在 imageFile 生效,填写图片输出绝对路径
options: {
small: false, // 使用小二维码,主要用于 terminal
},
},
cache: true, // 是否使用缓存
copyToClipboard: true, // 是否将产出的二维码链接复制到剪切板
});
把项目上传到开发者平台进行发布。
命令行使用
Usage: tma upload [options] [entry]
Upload project to the developer platform
Options:
--app-version <appVersion> App version (eg: [major].[minor].[patch])
--app-changelog <appChangelog> Changelog for this version
-p, --proxy <proxy> Update request proxy
-cp, --copy Copy remote url to clipboard
--qrcode-output <qrcodeOutputPath> Qrcode output path
代码调用
const tma = require('tt-ide-cli');
// uploadResult 返回值
interface ProjectQRCode {
expireTime: number; // 二维码过期时间
shortUrl: string; // 二维码短链
originSchema: string; // 二维码 schema
qrcodeSVG?: string; // 二维码 SVG
qrcodeFilePath?: string; // 二维码存储路径
useCache: boolean; // 是否命中并使用缓存
}
const uploadResult: ProjectQRCode = await tma.upload({
project: {
path: 'projectPath', // 项目地址
},
qrcode: {
format: 'imageSVG', // imageSVG | imageFile | null | terminal
// imageSVG 用于产出二维码 SVG
// imageFile 用于将二维码存储到某个路径
// terminal 用于将二维码在控制台输出
// null 则不产出二维码
output: '', // 只在 imageFile 生效,填写图片输出绝对路径
options: {
small: false, // 使用小二维码,主要用于 terminal
},
},
copyToClipboard: true, // 是否将产出的二维码链接复制到剪切板
changeLog: 'changelog', // 本次更新日志
version: '1.0.0', // 本次更新版本
needUploadSourcemap: true, // 是否上传后生成 sourcemap,推荐使用 true,否则开发者后台解析错误时将不能展示原始代码
});
小程序提审(复用前一次提审图片)
命令行使用
Usage: tma audit [options] [appid]
Audit project in the developer platform
Options:
--host <hosts> Host Apps(eg: douyin,toutiao,tt_lite)
--auto-publish <boolean> Auto Publish After Audit
# 使用示范
tma audit --host douyin,toutiao,tt_lite tt07e3715e98c9xxxx
代码调用
const tma = require('tt-ide-cli');
// 提审
await tma.audit({
appid: '',
host: [], // douyin,toutiao,tt_lite
autoPublish: true, // 是否审核通过后自动发布
});
命令行使用
Usage: tma get-meta [options] [appid]
Get appid meta
代码调用
const tma = require('tt-ide-cli');
// metaResult 返回值
interface MiniappMetaInfo {
version: String; // 线上小程序版本号
}
const metaResult: MiniappMetaInfo = await tma.getMeta({
appid: 'appid',
});
https://microapp.bytedance.com/docs/zh-CN/mini-app/develop/framework/npm/
命令行使用
Usage: tma build-npm [options]
Build npm
Options:
--project-path Project path
代码调用
const tma = require('tt-ide-cli');
await tma.buildNpm({
project: {
path: 'projectPath',
},
});
FAQs
Command line interface for micro app development
We found that tt-ide-cli demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
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.