Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/editor-js/create-tool
Single command Editor.js Tool generator
https://github.com/editor-js/create-tool
Last synced: about 1 month ago
JSON representation
Single command Editor.js Tool generator
- Host: GitHub
- URL: https://github.com/editor-js/create-tool
- Owner: editor-js
- License: mit
- Created: 2022-11-05T17:21:35.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-05-10T22:13:29.000Z (over 1 year ago)
- Last Synced: 2024-08-07T21:45:23.559Z (5 months ago)
- Language: TypeScript
- Homepage:
- Size: 46.9 KB
- Stars: 25
- Watchers: 1
- Forks: 2
- Open Issues: 19
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
🚧 Development in progress 🚧
# Editor.js Tool — starter kit package
Single command helper to generate a Tool template.
## Usage
Use `create` command to generate Tool's starter kit.
```
npm create @editorjs/tool
yarn create @editorjs/tool
```## Development
New project files will be used from `template` folder. You can work in this folder as in generated project: upgrade dependencies, add new files, run build and dev commands.
In templates there is a variable that will be replaced with user's input:
- `VAR_TOOL_NAME` — tool name
### Local testing
To test the package locally, you have to create a symlink to the global `node_modules` folder. Use the package to generate a new tool. And then you need to unlink local package.
#### Linking
Run the following command in the root of this package repository:
```
npm link
yarn link
```In the folder where you want to create a new tool, link the local package:
```
npm link @editorjs/create-tool
yarn link @editorjs/create-tool
```#### Usage
Use this tool as usual:
```
npm create @editorjs/tool
yarn create @editorjs/tool
```#### Unlinking
To unlink the local package run the following in tool's parent folder where I had to link it earlier:
```
npm unlink @editorjs/create-tool
yarn unlink @editorjs/create-tool
```And then unlink the package in the root of this package repository:
```
npm unlink @editorjs/create-tool
yarn unlink @editorjs/create-tool
```