-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #39 from editor-js/migrate/vite
Migrate to vite
- Loading branch information
Showing
7 changed files
with
227 additions
and
3,488 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
.idea/ | ||
assets/ | ||
src/ | ||
webpack.config.js | ||
vite.config.js | ||
yarn.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,36 +8,19 @@ Inline Tool for marking code-fragments for the [Editor.js](https://ifmo.su/edito | |
|
||
## Installation | ||
|
||
### Install via NPM | ||
|
||
Get the package | ||
|
||
```shell | ||
npm i --save-dev @editorjs/inline-code | ||
yarn add @editorjs/inline-code | ||
``` | ||
|
||
Include module at your application | ||
|
||
```javascript | ||
const InlineCode = require('@editorjs/inline-code'); | ||
import InlineCode from '@editorjs/inline-code'; | ||
``` | ||
|
||
### 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/inline-code). | ||
|
||
`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/inline-code@latest) | ||
|
||
## Usage | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,38 @@ | ||
{ | ||
"name": "@editorjs/inline-code", | ||
"version": "1.4.0", | ||
"version": "1.5.0", | ||
"keywords": [ | ||
"codex editor", | ||
"inline", | ||
"code", | ||
"tool", | ||
"editor.js", | ||
"editorjs" | ||
], | ||
"description": "InlineCode Tool for Editor.js", | ||
"license": "MIT", | ||
"repository": "https://github.com/editor-js/inline-code", | ||
"main": "./dist/bundle.js", | ||
"files": [ | ||
"dist" | ||
], | ||
"main": "./dist/inline-code.umd.js", | ||
"module": "./dist/inline-code.mjs", | ||
"exports": { | ||
".": { | ||
"import": "./dist/inline-code.mjs", | ||
"require": "./dist/inline-code.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-loader": "^8.0.5", | ||
"css-loader": "^1.0.0", | ||
"raw-loader": "^3.1.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" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: "InlineCode", | ||
fileName: "inline-code", | ||
}, | ||
}, | ||
define: { | ||
NODE_ENV: JSON.stringify(NODE_ENV), | ||
VERSION: JSON.stringify(VERSION), | ||
}, | ||
|
||
plugins: [cssInjectedByJsPlugin()], | ||
}; |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.