-
-
Notifications
You must be signed in to change notification settings - Fork 297
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into Moved-npm-publish-to-common-workflow
- Loading branch information
Showing
8 changed files
with
310 additions
and
3,157 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,5 +3,6 @@ dev/ | |
src/ | ||
.babelrc | ||
.eslintrc | ||
webpack.config.js | ||
vite.config.js | ||
postcss.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 |
---|---|---|
|
@@ -24,12 +24,10 @@ This Tool is also capable of uploading & displaying video files using the `<vide | |
|
||
## Installation | ||
|
||
### Install via NPM | ||
|
||
Get the package | ||
|
||
```shell | ||
npm i --save-dev @editorjs/image | ||
yarn add @editorjs/image | ||
``` | ||
|
||
Include module at your application | ||
|
@@ -38,20 +36,7 @@ Include module at your application | |
import ImageTool from '@editorjs/image'; | ||
``` | ||
|
||
### Other methods | ||
|
||
#### Manual downloading and connecting | ||
|
||
1. Upload folder `dist` from repository | ||
2. Add `dist/bundle.js` file to your page. | ||
|
||
#### Loading from CDN | ||
|
||
You can load a specific version of package from [jsDelivr CDN](https://www.jsdelivr.com/package/npm/@editorjs/image). | ||
|
||
`https://cdn.jsdelivr.net/npm/@editorjs/[email protected]` | ||
|
||
Then require this script on page with Editor.js through the `<script src=""></script>` tag. | ||
Optionally, you can load this tool from [JsDelivr CDN](https://cdn.jsdelivr.net/npm/@editorjs/image@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,20 +1,29 @@ | ||
{ | ||
"name": "@editorjs/image", | ||
"version": "2.8.2", | ||
"version": "2.9.0", | ||
"keywords": [ | ||
"codex editor", | ||
"tool", | ||
"image", | ||
"editor.js", | ||
"editorjs" | ||
], | ||
"description": "Image Tool for Editor.js", | ||
"license": "MIT", | ||
"repository": "https://github.com/editor-js/image", | ||
"main": "./dist/bundle.js", | ||
"files": [ | ||
"dist" | ||
], | ||
"main": "./dist/image.umd.js", | ||
"module": "./dist/image.mjs", | ||
"exports": { | ||
".": { | ||
"import": "./dist/image.mjs", | ||
"require": "./dist/image.umd.js" | ||
} | ||
}, | ||
"scripts": { | ||
"build": "webpack --mode production", | ||
"build:dev": "webpack --mode development --watch", | ||
"dev": "vite", | ||
"build": "vite build", | ||
"lint": "eslint src/ --ext .js", | ||
"lint:errors": "eslint src/ --ext .js --quiet", | ||
"lint:fix": "eslint src/ --ext .js --fix" | ||
|
@@ -24,27 +33,18 @@ | |
"email": "[email protected]" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.3.4", | ||
"@babel/plugin-transform-runtime": "^7.2.0", | ||
"@babel/preset-env": "^7.3.4", | ||
"@babel/runtime": "^7.2.0", | ||
"@codexteam/ajax": "^4.2.0", | ||
"babel-loader": "^8.0.5", | ||
"css-loader": "^3.5.2", | ||
"eslint": "^6.8.0", | ||
"eslint-config-codex": "^1.3.3", | ||
"eslint-loader": "^4.0.0", | ||
"formidable": "^1.2.1", | ||
"postcss-loader": "^3.0.0", | ||
"postcss-nested": "^4.1.0", | ||
"postcss-nested-ancestors": "^2.0.0", | ||
"request": "^2.88.0", | ||
"style-loader": "^1.1.4", | ||
"svg-inline-loader": "^0.8.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.6" | ||
} | ||
} | ||
} |
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,7 @@ | ||
module.exports = { | ||
plugins: [ | ||
require('postcss-nested-ancestors'), | ||
require('postcss-nested'), | ||
], | ||
}; | ||
|
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: "ImageTool", | ||
fileName: "image", | ||
}, | ||
}, | ||
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.