Skip to content

Commit

Permalink
build: release 2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
fengyuanchen committed Jan 1, 2021
1 parent 4893b77 commit 26710c4
Show file tree
Hide file tree
Showing 8 changed files with 6,832 additions and 5,673 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 2.1.0 (Jan 1, 2021)

- Support Vue 3.
- Upgrade to [postcss](https://github.com/postcss/postcss) 8.
- Upgrade to [markdown-it](https://github.com/markdown-it/markdown-it) 12.

## 2.0.0 (Oct 19, 2019)

- Release as a stable version.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

## Features

- Supports Vue 2 and Vue 3.
- Supports to load a markdown file as a Vue component.
- Supports to load code blocks (Vue and HTML by default) as Vue components.
- Supports 10 [options](#options).
Expand All @@ -30,7 +31,6 @@ module: {
rules: [
{
test: /\.md$/,
exclude: /(node_modules|bower_components)/,
use: [
'vue-loader',
{
Expand Down
23 changes: 1 addition & 22 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -1,22 +1 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="markdown-to-vue-loader-ua-compatible" content="ie=edge">
<title>markdown-to-vue-loader</title>
<meta name="description" content="Markdown to Vue component loader for Webpack.">
<meta name="author" content="Chen Fengyuan">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" crossorigin="anonymous">
<link rel="stylesheet" href="https://unpkg.com/github-markdown-css@3.0.1/github-markdown.css" crossorigin="anonymous">
<link rel="stylesheet" href="https://unpkg.com/highlightjs@9.12.0/styles/github.css" crossorigin="anonymous">
</head>
<body>
<div id="app"></div>
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.bundle.min.js" crossorigin="anonymous"></script>
<script src="https://unpkg.com/highlightjs@9.12.0/highlight.pack.js" crossorigin="anonymous"></script>
<script src="https://fengyuanchen.github.io/shared/google-analytics.js" crossorigin="anonymous"></script>
<script>hljs.initHighlightingOnLoad();</script>
<script type="text/javascript" src="main.js"></script></body>
</html>
<!doctype html><html lang="zh-CN"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta http-equiv="markdown-to-vue-loader-ua-compatible" content="ie=edge"><title>markdown-to-vue-loader</title><meta name="description" content="Markdown to Vue component loader for Webpack."><meta name="author" content="Chen Fengyuan"><link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" crossorigin="anonymous"><link rel="stylesheet" href="https://unpkg.com/github-markdown-css@3.0.1/github-markdown.css" crossorigin="anonymous"><link rel="stylesheet" href="https://unpkg.com/highlightjs@9.12.0/styles/github.css" crossorigin="anonymous"></head><body><div id="app"></div><script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" crossorigin="anonymous"></script><script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.bundle.min.js" crossorigin="anonymous"></script><script src="https://unpkg.com/highlightjs@9.12.0/highlight.pack.js" crossorigin="anonymous"></script><script src="https://fengyuanchen.github.io/shared/google-analytics.js" crossorigin="anonymous"></script><script>hljs.initHighlightingOnLoad();</script><script src="main.js"></script></body></html>
8 changes: 4 additions & 4 deletions docs/main.js

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ function normalizeComponent(script, mixin) {
component = {};
}
if (${isVue3}) {
return Object.assign(component, ${mixin});
}
component.mixins = (component.mixins || []).concat([${mixin}]);
return component;
Expand Down Expand Up @@ -134,10 +138,10 @@ module.exports = function markdownToVueLoader(source, map) {
}

const mixin = [];
let template = '';
let component;
let scoped;
let style;
let template;

switch (language) {
case 'vue': {
Expand Down
12,378 changes: 6,774 additions & 5,604 deletions package-lock.json

Large diffs are not rendered by default.

78 changes: 39 additions & 39 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "markdown-to-vue-loader",
"version": "2.0.0",
"version": "2.1.0",
"description": "Markdown to Vue component loader for Webpack.",
"main": "index.js",
"files": [
Expand All @@ -17,7 +17,7 @@
"release": "npm run lint && npm test && npm run release:docs",
"release:docs": "npm run clear:docs && npm run build:docs",
"start": "npm run dev",
"test": "nyc mocha",
"test": "nyc mocha --timeout 10000",
"test:cover": "nyc report --reporter=text-lcov > coverage.lcov && codecov"
},
"repository": {
Expand All @@ -43,53 +43,53 @@
},
"homepage": "https://fengyuanchen.github.io/markdown-to-vue-loader",
"dependencies": {
"cheerio": "^1.0.0-rc.2",
"loader-utils": "^1.2.3",
"markdown-it": "^10.0.0",
"postcss": "^7.0.18"
"cheerio": "1.0.0-rc.3",
"loader-utils": "^2.0.0",
"markdown-it": "^12.0.4",
"postcss": "^8.2.2"
},
"peerDependencies": {
"vue-loader": "^15.0.0",
"vue-loader": ">=15.0.0",
"webpack": "^4.0.0"
},
"devDependencies": {
"@babel/core": "^7.6.4",
"@babel/preset-env": "^7.6.3",
"@commitlint/cli": "^8.2.0",
"@commitlint/config-conventional": "^8.2.0",
"babel-loader": "^8.0.6",
"@babel/core": "^7.12.10",
"@babel/preset-env": "^7.12.11",
"@commitlint/cli": "^11.0.0",
"@commitlint/config-conventional": "^11.0.0",
"babel-loader": "^8.2.2",
"chai": "^4.2.0",
"codecov": "^3.6.1",
"cross-env": "^6.0.3",
"css-loader": "^3.2.0",
"del-cli": "^3.0.0",
"codecov": "^3.8.1",
"cross-env": "^7.0.3",
"css-loader": "^5.0.1",
"del-cli": "^3.0.1",
"eslint": "^6.5.1",
"eslint-config-airbnb-base": "^14.0.0",
"eslint-plugin-html": "^6.0.0",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-vue": "^5.2.3",
"html-webpack-plugin": "^3.2.0",
"husky": "^3.0.9",
"lint-staged": "^9.4.2",
"eslint-config-airbnb-base": "^14.2.1",
"eslint-plugin-html": "^6.1.1",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-vue": "^v6.2.2",
"html-webpack-plugin": "^4.5.0",
"husky": "^4.3.6",
"lint-staged": "^10.5.3",
"memory-fs": "^0.5.0",
"mocha": "^6.2.2",
"nyc": "^14.1.1",
"postcss-cli": "^6.1.3",
"postcss-import": "^12.0.1",
"postcss-loader": "^3.0.0",
"mocha": "^8.2.1",
"nyc": "^15.1.0",
"postcss-cli": "^8.3.1",
"postcss-import": "^14.0.0",
"postcss-loader": "^4.1.0",
"postcss-preset-env": "^6.7.0",
"style-loader": "^1.0.0",
"stylelint": "^11.1.1",
"stylelint-config-standard": "^19.0.0",
"stylelint-order": "^3.1.1",
"vue": "^2.6.10",
"vue-loader": "^15.7.0",
"style-loader": "^2.0.0",
"stylelint": "^13.8.0",
"stylelint-config-standard": "^20.0.0",
"stylelint-order": "^4.1.0",
"vue": "^2.6.12",
"vue-loader": "^15.9.6",
"vue-style-loader": "^4.1.2",
"vue-template-compiler": "^2.6.10",
"webpack": "^4.41.2",
"webpack-cli": "^3.3.9",
"webpack-dev-server": "^3.8.2",
"webpack-merge": "^4.2.2"
"vue-template-compiler": "^2.6.12",
"webpack": "^4.44.2",
"webpack-cli": "^3.3.12",
"webpack-dev-server": "^3.11.1",
"webpack-merge": "^5.7.3"
},
"browserslist": [
"last 2 versions",
Expand Down
4 changes: 2 additions & 2 deletions test/index.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
const path = require('path');
const webpack = require('webpack');
const webpackMerge = require('webpack-merge');
const { merge } = require('webpack-merge');
const VueLoaderPlugin = require('vue-loader/lib/plugin');
const MemoryFS = require('memory-fs');
const { expect } = require('chai');

const mfs = new MemoryFS();

function bundle(options, callback, loaderOptions = {}) {
const config = webpackMerge({
const config = merge({
mode: 'none',
output: {
path: path.resolve(__dirname, './expected'),
Expand Down

0 comments on commit 26710c4

Please sign in to comment.