markdown-it-icons
Advanced tools
Comparing version 0.3.2 to 0.4.0
{ | ||
"name": "markdown-it-icons", | ||
"version": "0.3.2", | ||
"version": "0.4.0", | ||
"description": "Plugin for markdown-it, supports emoji icons and font-awesome icons.", | ||
"main": "src/index.js", | ||
"main": "dist/index.js", | ||
"scripts": { | ||
"build": "cp node_modules/emojione/assets/css/emojione-awesome.css src/ && sed -i '' 's%//cdn.jsdelivr.net/emojione/assets/svg/%https://cdn.jsdelivr.net/emojione/assets/svg/%g' src/emojione-awesome.css && cp node_modules/font-awesome/css/font-awesome.css src/ && sed -i '' 's%../fonts/%https://cdn.jsdelivr.net/fontawesome/latest/fonts/%g' src/font-awesome.css", | ||
"test": "node -r babel-register -r ignore-styles test/index.js", | ||
"upgrade": "ncu -ua && yarn upgrade" | ||
"build": "webpack --progress --color", | ||
"build:watch": "yarn build --watch", | ||
"test": "node -r babel-register test/index.js", | ||
"upgrade": "yarn-upgrade-all && cp node_modules/font-awesome/css/font-awesome.css src/ && sed -i '' 's%../fonts/%https://cdn.jsdelivr.net/fontawesome/latest/fonts/%g' src/font-awesome.css" | ||
}, | ||
@@ -15,15 +16,20 @@ "repository": "git@github.com:tylingsoft/markdown-it-icons.git", | ||
"devDependencies": { | ||
"babel-preset-env": "^1.3.2", | ||
"babel-register": "^6.24.0", | ||
"babel-core": "^6.26.0", | ||
"babel-loader": "^7.1.2", | ||
"babel-preset-env": "^1.6.1", | ||
"css-loader": "^0.28.7", | ||
"extract-text-webpack-plugin": "^3.0.2", | ||
"font-awesome": "^4.7.0", | ||
"ignore-styles": "^5.0.1", | ||
"markdown-it": "^8.3.1", | ||
"npm-check-updates": "^2.10.5", | ||
"standard": "^10.0.1" | ||
"markdown-it": "^8.4.0", | ||
"standard": "^10.0.3", | ||
"style-loader": "^0.19.1", | ||
"webpack": "^3.10.0", | ||
"webpack-node-externals": "^1.6.0", | ||
"yarn-upgrade-all": "^0.2.0" | ||
}, | ||
"dependencies": { | ||
"emojione": "^2.2.7", | ||
"font-awesome-icon-chars": "^1.2.2", | ||
"emojione": "^3.1.2", | ||
"font-awesome-icon-chars": "^1.3.0", | ||
"markdown-it-regex": "^0.1.4" | ||
} | ||
} |
@@ -15,3 +15,5 @@ # markdown-it-icons | ||
```javascript | ||
### for node.js | ||
```js | ||
import markdownIt from 'markdown-it' | ||
@@ -26,3 +28,13 @@ import markdownItIcons from 'markdown-it-icons' | ||
### for browser | ||
You also need to import the css: | ||
```js | ||
import 'markdown-it-icons/dist/index.css' | ||
``` | ||
Or you can add the css to the web page directly. | ||
## Development | ||
@@ -33,3 +45,3 @@ | ||
``` | ||
yarn run build | ||
yarn build:watch | ||
``` | ||
@@ -42,1 +54,4 @@ | ||
``` | ||
## Todo |
@@ -1,2 +0,2 @@ | ||
import './emojione-awesome.css' | ||
import 'emojione/extras/css/emojione-awesome.css' | ||
import './font-awesome.css' | ||
@@ -13,4 +13,4 @@ | ||
let emojis = [] | ||
Object.keys(emoji).forEach((name) => { | ||
emojis = emojis.concat(name).concat(emoji[name].aliases.map((item) => item.slice(1, -1))) | ||
Object.keys(emoji).forEach((key) => { | ||
emojis = emojis.concat(emoji[key].shortname.slice(1, -1)).concat(emoji[key].shortname_alternates.map((item) => item.slice(1, -1))) | ||
}) | ||
@@ -17,0 +17,0 @@ const emojiRegex = new RegExp(`(:(?:${emojis.join('|').replace(/\+/g, '\\+')}):)`) |
import assert from 'assert' | ||
import markdownIt from 'markdown-it' | ||
import markdownItIcons from '../src/index' | ||
import markdownItIcons from '../dist/index' | ||
@@ -5,0 +5,0 @@ const mdi = markdownIt() |
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 not supported yet
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
559564
14
10288
54
12
1
+ Addedemojione@3.1.7(transitive)
- Removedemojione@2.2.7(transitive)
Updatedemojione@^3.1.2