Skip to content

Commit

Permalink
update branch
Browse files Browse the repository at this point in the history
  • Loading branch information
neSpecc committed Aug 17, 2024
2 parents 86d6032 + 4ca1c1c commit 0991f0f
Show file tree
Hide file tree
Showing 7 changed files with 232 additions and 4,006 deletions.
33 changes: 5 additions & 28 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,8 @@ on:
- master

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- run: yarn
- run: yarn build
- run: yarn publish --access=public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
notify:
needs: publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get package info
id: package
uses: codex-team/action-nodejs-package-info@v1
- name: Send a message
uses: codex-team/action-codexbot-notify@v1
with:
webhook: ${{ secrets.CODEX_BOT_NOTIFY_EDITORJS_PUBLIC_CHAT }}
message: '📦 [${{ steps.package.outputs.name }}](${{ steps.package.outputs.npmjs-link }}) ${{ steps.package.outputs.version }} was published'
parse_mode: 'markdown'
disable_web_page_preview: true
publish-and-notify:
uses: codex-team/github-workflows/.github/workflows/npm-publish-and-notify-reusable.yml@main
secrets:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
CODEX_BOT_NOTIFY_EDITORJS_PUBLIC_CHAT: ${{ secrets.CODEX_BOT_NOTIFY_EDITORJS_PUBLIC_CHAT }}
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.idea/
src/
webpack.config.js
vite.config.js
yarn.lock
23 changes: 3 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,19 @@ Delimiter Tool for the [Editor.js](https://editorjs.io).

## Installation

### Install via NPM

Get the package

```shell
npm i --save-dev @editorjs/delimiter
yarn add @editorjs/delimiter
```

Include module at your application

```javascript
const Delimiter = require('@editorjs/delimiter');
import Delimiter from '@editorjs/delimiter';
```

### Download to your project's source dir

1. Upload folder `dist` from repository
2. Add `dist/bundle.js` file to your page.

### Load from CDN

You can load specific version of package from [jsDelivr CDN](https://www.jsdelivr.com/package/npm/@editorjs/delimiter).

`https://cdn.jsdelivr.net/npm/@editorjs/[email protected]`

Require this script on a page with Editor.js.

```html
<script src="..."></script>
```
Optionally, you can load this tool from CDN [JsDelivr CDN](https://cdn.jsdelivr.net/npm/@editorjs/delimiter@latest)

## Usage

Expand Down
30 changes: 16 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,35 +1,37 @@
{
"name": "@editorjs/delimiter",
"version": "1.3.1",
"version": "1.4.1",
"keywords": [
"codex editor",
"delimiter",
"tool",
"editor.js",
"editorjs"
],
"description": "Delimiter Tool for Editor.js",
"license": "MIT",
"repository": "https://github.com/editor-js/delimiter",
"main": "./dist/bundle.js",
"files": [
"dist"
],
"main": "./dist/delimiter.umd.js",
"module": "./dist/delimiter.mjs",
"exports": {
".": {
"import": "./dist/delimiter.mjs",
"require": "./dist/delimiter.umd.js"
}
},
"scripts": {
"build": "webpack --mode production",
"build:dev": "webpack --mode development --watch"
"dev": "vite",
"build": "vite build"
},
"author": {
"name": "CodeX Team",
"email": "[email protected]"
},
"devDependencies": {
"@babel/core": "^7.3.4",
"@babel/preset-env": "^7.3.4",
"babel-core": "^6.26.3",
"babel-loader": "^8.0.5",
"babel-preset-env": "^1.7.0",
"css-loader": "^1.0.0",
"style-loader": "^0.21.0",
"webpack": "^4.29.5",
"webpack-cli": "^3.2.3"
"vite": "^4.5.0",
"vite-plugin-css-injected-by-js": "^3.3.0"
},
"dependencies": {
"@codexteam/icons": "^0.0.5"
Expand Down
23 changes: 23 additions & 0 deletions vite.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import path from "path";
import cssInjectedByJsPlugin from "vite-plugin-css-injected-by-js";
import * as pkg from "./package.json";

const NODE_ENV = process.argv.mode || "development";
const VERSION = pkg.version;

export default {
build: {
copyPublicDir: false,
lib: {
entry: path.resolve(__dirname, "src", "index.js"),
name: "Delimiter",
fileName: "delimiter",
},
},
define: {
NODE_ENV: JSON.stringify(NODE_ENV),
VERSION: JSON.stringify(VERSION),
},

plugins: [cssInjectedByJsPlugin()],
};
34 changes: 0 additions & 34 deletions webpack.config.js

This file was deleted.

Loading

0 comments on commit 0991f0f

Please sign in to comment.