@vkontakte/create-vk-mini-app
Advanced tools
Comparing version 1.10.0 to 2.0.0-alpha.0
{ | ||
"name": "@vkontakte/create-vk-mini-app", | ||
"version": "1.10.0", | ||
"version": "2.0.0-alpha.0", | ||
"description": "VK Mini Apps Boilerplate", | ||
@@ -12,6 +12,11 @@ "repository": "https://github.com/VKCOM/create-vk-mini-app", | ||
"scripts": { | ||
"create": "node ./bin/create-vk-mini-app.js" | ||
"build": "tsc && esbuild src/create-vk-mini-app.ts --bundle --platform=node --target=node18.0 --outfile=bin/create-vk-mini-app.js", | ||
"create": "node ./bin/create-vk-mini-app.js", | ||
"lint:eslint": "eslint ./src --ext=ts", | ||
"eslint:fix": "eslint ./src --ext=ts --fix", | ||
"lint:prettier": "prettier --check --ignore-unknown .", | ||
"prepublishOnly": "yarn build" | ||
}, | ||
"engines": { | ||
"node": ">=12.0.0" | ||
"node": ">=18.0.0" | ||
}, | ||
@@ -23,14 +28,25 @@ "keywords": [], | ||
}, | ||
"contributors": [ | ||
{ | ||
"name": "Gleb Vorontsov", | ||
"email": "vorontsov.gleb@gmail.com", | ||
"url": "https://vk.com/boy" | ||
} | ||
], | ||
"license": "MIT", | ||
"dependencies": { | ||
"chalk": "4.1.0", | ||
"fs-extra": "9.1.0" | ||
"minimist": "^1.2.8", | ||
"prompts": "^2.4.2" | ||
}, | ||
"devDependencies": { | ||
"@types/fs-extra": "^11.0.4", | ||
"@types/minimist": "^1.2.5", | ||
"@types/prompts": "^2.4.9", | ||
"@typescript-eslint/eslint-plugin": "^5.50.0", | ||
"@typescript-eslint/parser": "^5.0.0", | ||
"@vkontakte/eslint-plugin": "^1.1.0", | ||
"@vkontakte/prettier-config": "^0.1.0", | ||
"esbuild": "^0.19.12", | ||
"eslint": "^8.0.0", | ||
"eslint-config-prettier": "^9.1.0", | ||
"eslint-plugin-import": "^2.29.1", | ||
"eslint-plugin-react": "^7.16.0", | ||
"eslint-plugin-react-hooks": "^2.5.1", | ||
"prettier": "^2.7.1", | ||
"typescript": "^5.3.3" | ||
} | ||
} |
118
README.md
@@ -1,71 +0,121 @@ | ||
[<img width="134" src="https://vk.com/images/apps/mini_apps/vk_mini_apps_logo.svg">](https://vk.com/services) | ||
# Create VK Mini App | ||
# Create VK Mini App [![npm][npm]][npm-url] [![deps][deps]][deps-url] | ||
Библиотека create-vk-mini-app — инструмент для быстрого создания и развертывания [мини-приложений](https://dev.vk.com/mini-apps/overview) Вконтакте | ||
## How to use | ||
## Ключевые особенности | ||
### With NPX | ||
- Cборка на [Vite](https://vitejs.dev/guide/). | ||
- Интеграция с [VKUI](https://github.com/VKCOM/VKUI) и [vk-miniapps-router](https://github.com/VKCOM/vk-mini-apps-router). | ||
- Конфигурации шаблонов под различные задачи. | ||
- Поддержка последних версий библиотек + typescript. | ||
- Удобное интерактивное меню для настройки проекта. | ||
- Бесплатный хостинг вашего приложения при помощи [vk-mini-apps-deploy](https://dev.vk.com/ru/mini-apps/development/hosting). | ||
## Установка и использование | ||
### yarn | ||
```bash | ||
npx @vkontakte/create-vk-mini-app@latest [app-directory-name] [options] | ||
yarn create @vkontakte/vk-mini-app [app-directory-name] [options] | ||
``` | ||
[NPX](https://github.com/npm/npx) allows you to always use the **latest** version of the package without a global installation. | ||
### npm | ||
### With installing the package globally | ||
```bash | ||
npm init @vkontakte/vk-mini-app@lastest [app-directory-name] [options] | ||
``` | ||
Install the package globally via yarn | ||
### npx | ||
```bash | ||
yarn global add @vkontakte/create-vk-mini-app | ||
npx @vkontakte/create-vk-mini-app [app-directory-name] [options] | ||
``` | ||
...or npm | ||
### Для Node js < 18.0.0 | ||
Если вы используете Node js < 18.0.0 то вам нужен create-vk-mini-app v1. | ||
```bash | ||
npm install --global @vkontakte/create-vk-mini-app | ||
npx @vkontakte/create-vk-mini-app@1 [app-directory-name] [options] | ||
``` | ||
and use as follows | ||
## Опции | ||
<table> | ||
<tr> | ||
<td width="200px"><strong>--typescript</strong></td> | ||
<td>Выбирает пример на typescript</td> | ||
</tr> | ||
<tr> | ||
<td><strong>--projectName</strong></td> | ||
<td>Выбирает имя, которое будет указано в package.json. Если параметр не передан, по умолчанию будет взято название директории</td> | ||
</tr> | ||
<tr> | ||
<td><strong>--t</strong> или <strong>--template</strong></td> | ||
<td>Выбирает структурный шаблон</td> | ||
</tr> | ||
</table> | ||
### Пример использования дополнительных опций | ||
```bash | ||
create-vk-mini-app [app-directory-name] [options] | ||
yarn create @vkontakte/vk-mini-app mini-app --typescript --template=vkapp-router-bridge-ui | ||
``` | ||
This way is less recommended because you will have to update the package yourself. | ||
создаст папку “mini-app” c примером “vkapp-ui” реализованном на ts | ||
### Options | ||
```bash | ||
yarn create @vkontakte/vk-mini-app . --template=vkapp-bridge-ui | ||
``` | ||
Without `--zeit` and `--surge` options | ||
создаст пример “vkapp-bridge-ui” на js в текущей дериктории | ||
#### `--zeit` | ||
## Виды шаблонов | ||
Vercel (Zeit) deploy | ||
<table> | ||
<tr> | ||
<td width="220px"><strong>vkapp-router-bridge-ui</strong></td> | ||
<td>вариант мини-аппа со встроенным роутером, поддерживающим анимации vkui, подключенной библиотекой vk-bridge и интерфейсом vkui</td> | ||
</tr> | ||
<tr> | ||
<td><strong>vkapp-bridge-ui</strong></td> | ||
<td>вариант мини-аппа со встроенной библиотекой vk bridge и vkui интерфейсом</td> | ||
</tr> | ||
<tr> | ||
<td><strong>vkapp-ui</td> | ||
<td>вариант веб приложения основанном на интерфейсе vkui, не является мини-аппом, так как в нем нет библиотеки vk bridge, отвечающей за связь с платформой</td> | ||
</tr> | ||
</table> | ||
Firstly, you have to create Vercel account and connect it with your GitHub profile on [vercel.com](https://vercel.com) | ||
## Полезные ссылки | ||
#### `--surge <surge-domain>` | ||
- [документация VKUI](https://vkcom.github.io/VKUI/). | ||
Surge deploy | ||
- [документация vk-mini-apps-router](https://dev.vk.com/libraries/router). | ||
Firstly, you have to create Surge account and Surge-domain on [surge.sh](https://surge.sh) | ||
- [Примеры мини приложений](https://dev.vk.com/ru/mini-apps/examples/shop). | ||
#### `--template <templat-type>` | ||
- [VK Mini Apps](https://vk.com/vkappsdev) — сообщество разработчиков мини-приложений ВКонтакте. | ||
Build with specific template (`typescript` or `javascript`) | ||
## Contributing | ||
#### `--help` | ||
Мы очень радуемся, когда пользователи библиотеки работают над её улучшением. Если вы захотите расширить базу примеров или улучшить cli интерфейс, то: | ||
Prints the synopsis and a list of options | ||
1. Сделайте форк репозитория и склонируйте его. | ||
## How to start work with app | ||
2. Установите зависимости -`yarn`. | ||
Go to created folder and run: | ||
`yarn start` or `npm start` to start dev server with hot reload on `localhost:10888`. | ||
3. Внесите изменения. | ||
`yarn run build` or `npm run build` to build production bundle, with tree-shaking, uglify and all this modern fancy stuff. | ||
4. Соберите - `yarn run build`. | ||
[npm]: https://img.shields.io/npm/v/@vkontakte/create-vk-mini-app.svg | ||
[npm-url]: https://npmjs.com/package/@vkontakte/create-vk-mini-app | ||
[deps]: https://img.shields.io/david/vkcom/create-vk-mini-app.svg | ||
[deps-url]: https://david-dm.org/vkcom/create-vk-mini-app | ||
5. Установите изменный пакет себе - `yarn link`. | ||
6. И запустите, чтобы протестировать изменения - `create-vk-mini-app`. | ||
7. Отправьте мр нам на проверку. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
NPM Shrinkwrap
Supply chain riskPackage contains a shrinkwrap file. This may allow the package to bypass normal install procedures.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
128
122
0
3
1
391020
3
15
8608
1
+ Addedminimist@^1.2.8
+ Addedprompts@^2.4.2
+ Addedansi-styles@4.3.0(transitive)
+ Addedkleur@3.0.3(transitive)
+ Addedminimist@1.2.8(transitive)
+ Addedprompts@2.4.2(transitive)
+ Addedsisteransi@1.0.5(transitive)
+ Addedsupports-color@7.2.0(transitive)
- Removedfs-extra@9.1.0
- Removed@types/color-name@1.1.1(transitive)
- Removed@vkontakte/create-vk-mini-app@1.9.0(transitive)
- Removedansi-styles@4.2.1(transitive)
- Removedat-least-node@1.0.0(transitive)
- Removedfs-extra@9.1.0(transitive)
- Removedgraceful-fs@4.2.4(transitive)
- Removedjsonfile@6.1.0(transitive)
- Removedsupports-color@7.1.0(transitive)
- Removeduniversalify@2.0.0(transitive)