fix compile config

pull/9/head
tjz 2018-03-19 21:23:38 +08:00
parent f7e163f7bc
commit e7ecf56ff9
10 changed files with 350 additions and 2107 deletions

View File

@ -1,9 +0,0 @@
{
"presets": ["env"],
"plugins": [
"transform-vue-jsx",
"transform-object-rest-spread",
"syntax-dynamic-import",
"transform-decorators-legacy"
]
}

View File

@ -7,9 +7,9 @@
# [Ant Design Vue](https://vuecomponent.github.io/ant-design/) # [Ant Design Vue](https://vuecomponent.github.io/ant-design/)
[![Travis branch](https://img.shields.io/travis/vueComponent/ant-design/master.svg?style=flat-square)](https://travis-ci.org/vueComponent/ant-design) [![Travis branch](https://img.shields.io/travis/vueComponent/ant-design/master.svg?style=flat-square)](https://travis-ci.org/vueComponent/ant-design)
[![Dependency Status](https://beta.gemnasium.com/badges/github.com/vueComponent/ant-design.svg)](https://beta.gemnasium.com/projects/github.com/vueComponent/ant-design) [![Dependency Status](https://beta.gemnasium.com/badges/github.com/vueComponent/ant-design.svg)](https://beta.gemnasium.com/projects/github.com/vueComponent/ant-design)
[![npm package](https://img.shields.io/npm/v/vue-antd3/next.svg?style=flat-square)](https://www.npmjs.org/package/vue-antd3) [![npm package](https://img.shields.io/npm/v/vue-antd-ui/next.svg?style=flat-square)](https://www.npmjs.org/package/vue-antd-ui)
[![NPM downloads](http://img.shields.io/npm/dm/vue-antd3.svg?style=flat-square)](https://npmjs.org/package/vue-antd3) [![NPM downloads](http://img.shields.io/npm/dm/vue-antd-ui.svg?style=flat-square)](https://npmjs.org/package/vue-antd-ui)
[![MIT License](https://img.shields.io/github/license/mashape/apistatus.svg)](https://www.npmjs.com/package/vue-antd3) [![MIT License](https://img.shields.io/github/license/mashape/apistatus.svg)](https://www.npmjs.com/package/vue-antd-ui)
Ant Design 3.X 的 Vue 实现,开发和服务于企业级后台产品。 Ant Design 3.X 的 Vue 实现,开发和服务于企业级后台产品。
@ -28,11 +28,11 @@ Ant Design 3.X 的 Vue 实现,开发和服务于企业级后台产品。
### 使用 npm 或 yarn 安装 ### 使用 npm 或 yarn 安装
```bash ```bash
$ npm install vue-antd3 --save $ npm install vue-antd-ui --save
``` ```
```bash ```bash
$ yarn add vue-antd3 $ yarn add vue-antd-ui
``` ```
如果你的网络环境不佳,推荐使用 [cnpm](https://github.com/cnpm/cnpm)。 如果你的网络环境不佳,推荐使用 [cnpm](https://github.com/cnpm/cnpm)。

View File

@ -7,9 +7,9 @@
# [Ant Design Vue](https://vuecomponent.github.io/ant-design/) # [Ant Design Vue](https://vuecomponent.github.io/ant-design/)
[![Travis branch](https://img.shields.io/travis/vueComponent/ant-design/master.svg?style=flat-square)](https://travis-ci.org/vueComponent/ant-design) [![Travis branch](https://img.shields.io/travis/vueComponent/ant-design/master.svg?style=flat-square)](https://travis-ci.org/vueComponent/ant-design)
[![Dependency Status](https://beta.gemnasium.com/badges/github.com/vueComponent/ant-design.svg)](https://beta.gemnasium.com/projects/github.com/vueComponent/ant-design) [![Dependency Status](https://beta.gemnasium.com/badges/github.com/vueComponent/ant-design.svg)](https://beta.gemnasium.com/projects/github.com/vueComponent/ant-design)
[![npm package](https://img.shields.io/npm/v/vue-antd3/next.svg?style=flat-square)](https://www.npmjs.org/package/vue-antd3) [![npm package](https://img.shields.io/npm/v/vue-antd-ui/next.svg?style=flat-square)](https://www.npmjs.org/package/vue-antd-ui)
[![NPM downloads](http://img.shields.io/npm/dm/vue-antd3.svg?style=flat-square)](https://npmjs.org/package/vue-antd3) [![NPM downloads](http://img.shields.io/npm/dm/vue-antd-ui.svg?style=flat-square)](https://npmjs.org/package/vue-antd-ui)
[![MIT License](https://img.shields.io/github/license/mashape/apistatus.svg)](https://www.npmjs.com/package/vue-antd3) [![MIT License](https://img.shields.io/github/license/mashape/apistatus.svg)](https://www.npmjs.com/package/vue-antd-ui)
An enterprise-class UI components based on Ant Design 3.X and Vue. An enterprise-class UI components based on Ant Design 3.X and Vue.
@ -28,11 +28,11 @@ An enterprise-class UI components based on Ant Design 3.X and Vue.
### 使用 npm 或 yarn 安装 ### 使用 npm 或 yarn 安装
```bash ```bash
$ npm install vue-antd3 --save $ npm install vue-antd-ui --save
``` ```
```bash ```bash
$ yarn add vue-antd3 $ yarn add vue-antd-ui
``` ```
如果你的网络环境不佳,推荐使用 [cnpm](https://github.com/cnpm/cnpm)。 如果你的网络环境不佳,推荐使用 [cnpm](https://github.com/cnpm/cnpm)。

View File

@ -41,7 +41,7 @@ module.exports = function (modules) {
resolve: { resolve: {
modules: ['node_modules', path.join(__dirname, '../node_modules')], modules: ['node_modules', path.join(__dirname, '../node_modules')],
extensions: ['.js', '.vue', '.md', '.json'], extensions: ['.js', '.jsx', '.vue', '.md', '.json'],
alias: { alias: {
'vue$': 'vue/dist/vue.esm.js', 'vue$': 'vue/dist/vue.esm.js',
'@': process.cwd(), '@': process.cwd(),
@ -68,18 +68,29 @@ module.exports = function (modules) {
test: /\.vue$/, test: /\.vue$/,
exclude: /node_modules/, exclude: /node_modules/,
use: [ use: [
{
loader: 'babel-loader',
options: babelConfig,
},
{ {
loader: 'vue-loader', loader: 'vue-loader',
options: {
loaders: {
js: [
{ loader: 'babel-loader',
options: {
presets: ['env'],
plugins: [
'transform-vue-jsx',
'transform-object-rest-spread',
],
}},
],
},
},
}, },
], ],
}, },
{ {
test: /\.js$/, test: /\.(js|jsx)$/,
loader: 'babel-loader', exclude: /node_modules/, loader: 'babel-loader', exclude: /node_modules/,
options: babelConfig,
}, },
{ {
test: /\.css$/, test: /\.css$/,

View File

@ -1,19 +0,0 @@
import { cloneElement } from './vnode'
import PropTypes from './vue-types'
export default {
props: {
childProps: PropTypes.object.def({}),
},
render () {
const { $attrs, $listeners, childProps, $slots } = this
let children = $slots.default[0]
children = cloneElement(children, {
attr: $attrs,
on: $listeners,
props: childProps,
})
return children
},
}

View File

@ -98,7 +98,7 @@ const api = {
notification, notification,
message, message,
} }
export { api } export { api, notification, message }
import Steps from './steps' import Steps from './steps'
const { Step } = Steps const { Step } = Steps

View File

@ -1,11 +1,12 @@
import Input, { InputProps } from './Input' import Input from './Input'
import Icon from '../icon' import Icon from '../icon'
import inputProps from './inputProps'
export default { export default {
name: 'InputSearch', name: 'InputSearch',
props: { props: {
...InputProps, ...inputProps,
prefixCls: { prefixCls: {
default: 'ant-input-search', default: 'ant-input-search',
type: String, type: String,

2065
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,149 +1,150 @@
{ {
"name": "vue-antd3", "name": "vue-antd-ui",
"version": "0.1.0", "version": "0.1.0",
"title": "Ant Design Vue", "title": "Ant Design Vue",
"description": "An enterprise-class UI design language and Vue-based implementation", "description": "An enterprise-class UI design language and Vue-based implementation",
"keywords": [ "keywords": [
"ant", "ant",
"design", "design",
"antd", "antd",
"vue", "vue",
"vueComponent", "vueComponent",
"component", "component",
"components", "components",
"ui", "ui",
"framework", "framework",
"frontend" "frontend"
], ],
"main": "dist/antd.min.js", "main": "dist/antd.min.js",
"files": [ "files": [
"dist", "dist",
"components" "lib",
], "es"
"scripts": { ],
"start": "NODE_ENV=development ./node_modules/.bin/webpack-dev-server --open --hot", "scripts": {
"test": "karma start test/karma.conf.js --single-run", "start": "NODE_ENV=development ./node_modules/.bin/webpack-dev-server --open --hot",
"build": "sh build.sh", "test": "karma start test/karma.conf.js --single-run",
"compile": "node antd-tools/cli/run.js compile", "build": "sh build.sh",
"dist": "node antd-tools/cli/run.js dist", "compile": "node antd-tools/cli/run.js compile",
"lint": "eslint -c ./.eslintrc --fix --ext .jsx ./components", "dist": "node antd-tools/cli/run.js dist",
"lint:style": "stylelint \"./examples/**/*.less\" --fix --syntax less" "lint": "eslint -c ./.eslintrc --fix --ext .jsx ./components",
}, "lint:style": "stylelint \"./examples/**/*.less\" --fix --syntax less"
"repository": { },
"type": "git", "repository": {
"url": "git+https://github.com/vueComponent/ant-design.git" "type": "git",
}, "url": "git+https://github.com/vueComponent/ant-design.git"
"license": "MIT", },
"bugs": { "license": "MIT",
"url": "https://github.com/vueComponent/ant-design/issues" "bugs": {
}, "url": "https://github.com/vueComponent/ant-design/issues"
"homepage": "https://github.com/vueComponent/ant-design", },
"pre-commit": [ "homepage": "https://github.com/vueComponent/ant-design",
"lint:style" "pre-commit": [
], "lint:style"
"devDependencies": { ],
"autoprefixer": "^8.1.0", "devDependencies": {
"babel-cli": "^6.26.0", "autoprefixer": "^8.1.0",
"babel-core": "^6.26.0", "babel-cli": "^6.26.0",
"babel-eslint": "^8.0.1", "babel-core": "^6.26.0",
"babel-helper-vue-jsx-merge-props": "^2.0.3", "babel-eslint": "^8.0.1",
"babel-loader": "^7.1.2", "babel-helper-vue-jsx-merge-props": "^2.0.3",
"babel-plugin-add-module-exports": "^0.2.1", "babel-loader": "^7.1.2",
"babel-plugin-import": "^1.1.1", "babel-plugin-add-module-exports": "^0.2.1",
"babel-plugin-istanbul": "^4.1.1", "babel-plugin-import": "^1.1.1",
"babel-plugin-syntax-dynamic-import": "^6.18.0", "babel-plugin-istanbul": "^4.1.1",
"babel-plugin-syntax-jsx": "^6.18.0", "babel-plugin-syntax-dynamic-import": "^6.18.0",
"babel-plugin-transform-decorators": "^6.24.1", "babel-plugin-syntax-jsx": "^6.18.0",
"babel-plugin-transform-decorators-legacy": "^1.3.4", "babel-plugin-transform-decorators": "^6.24.1",
"babel-plugin-transform-es3-member-expression-literals": "^6.22.0", "babel-plugin-transform-decorators-legacy": "^1.3.4",
"babel-plugin-transform-es3-property-literals": "^6.22.0", "babel-plugin-transform-es3-member-expression-literals": "^6.22.0",
"babel-plugin-transform-object-assign": "^6.22.0", "babel-plugin-transform-es3-property-literals": "^6.22.0",
"babel-plugin-transform-object-rest-spread": "^6.26.0", "babel-plugin-transform-object-assign": "^6.22.0",
"babel-plugin-transform-runtime": "~6.23.0", "babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-plugin-transform-vue-jsx": "^3.7.0", "babel-plugin-transform-runtime": "~6.23.0",
"babel-polyfill": "^6.26.0", "babel-plugin-transform-vue-jsx": "^3.7.0",
"babel-preset-env": "^1.6.1", "babel-polyfill": "^6.26.0",
"case-sensitive-paths-webpack-plugin": "^2.1.2", "babel-preset-env": "^1.6.1",
"chai": "^4.1.2", "case-sensitive-paths-webpack-plugin": "^2.1.2",
"chalk": "^2.3.2", "chai": "^4.1.2",
"cheerio": "^1.0.0-rc.2", "chalk": "^2.3.2",
"colorful": "^2.1.0", "cheerio": "^1.0.0-rc.2",
"commander": "^2.15.0", "colorful": "^2.1.0",
"css-loader": "^0.28.7", "commander": "^2.15.0",
"deep-assign": "^2.0.0", "css-loader": "^0.28.7",
"eslint": "^4.7.2", "deep-assign": "^2.0.0",
"eslint-plugin-html": "^3.2.2", "eslint": "^4.7.2",
"eslint-plugin-vue-libs": "^1.2.1", "eslint-plugin-html": "^3.2.2",
"extract-text-webpack-plugin": "^3.0.2", "eslint-plugin-vue-libs": "^1.2.1",
"fetch-jsonp": "^1.1.3", "extract-text-webpack-plugin": "^3.0.2",
"gulp": "^3.9.1", "fetch-jsonp": "^1.1.3",
"gulp-babel": "^7.0.0", "gulp": "^3.9.1",
"gulp-strip-code": "^0.1.4", "gulp-babel": "^7.0.0",
"highlight.js": "^9.12.0", "gulp-strip-code": "^0.1.4",
"html-webpack-plugin": "^2.30.1", "highlight.js": "^9.12.0",
"istanbul-instrumenter-loader": "^3.0.0", "html-webpack-plugin": "^2.30.1",
"jsonp": "^0.2.1", "istanbul-instrumenter-loader": "^3.0.0",
"karma": "^1.4.1", "jsonp": "^0.2.1",
"karma-coverage": "^1.1.1", "karma": "^1.4.1",
"karma-coverage-istanbul-reporter": "^1.3.0", "karma-coverage": "^1.1.1",
"karma-mocha": "^1.3.0", "karma-coverage-istanbul-reporter": "^1.3.0",
"karma-phantomjs-launcher": "^1.0.2", "karma-mocha": "^1.3.0",
"karma-phantomjs-shim": "^1.4.0", "karma-phantomjs-launcher": "^1.0.2",
"karma-sinon-chai": "^1.3.1", "karma-phantomjs-shim": "^1.4.0",
"karma-sourcemap-loader": "^0.3.7", "karma-sinon-chai": "^1.3.1",
"karma-spec-reporter": "0.0.31", "karma-sourcemap-loader": "^0.3.7",
"karma-webpack": "^2.0.2", "karma-spec-reporter": "0.0.31",
"less": "^2.7.2", "karma-webpack": "^2.0.2",
"less-loader": "^4.0.5", "less": "^2.7.2",
"less-plugin-npm-import": "^2.1.0", "less-loader": "^4.0.5",
"markdown-it": "^8.4.0", "less-plugin-npm-import": "^2.1.0",
"marked": "^0.3.7", "markdown-it": "^8.4.0",
"merge2": "^1.2.1", "marked": "^0.3.7",
"mocha": "^3.2.0", "merge2": "^1.2.1",
"postcss": "^6.0.20", "mocha": "^3.2.0",
"postcss-loader": "^2.1.2", "postcss": "^6.0.20",
"pre-commit": "^1.2.2", "postcss-loader": "^2.1.2",
"querystring": "^0.2.0", "pre-commit": "^1.2.2",
"rimraf": "^2.6.2", "querystring": "^0.2.0",
"rucksack-css": "^1.0.2", "rimraf": "^2.6.2",
"selenium-server": "^3.0.1", "rucksack-css": "^1.0.2",
"semver": "^5.3.0", "selenium-server": "^3.0.1",
"sinon": "^4.0.2", "semver": "^5.3.0",
"sinon-chai": "^2.8.0", "sinon": "^4.0.2",
"style-loader": "^0.18.2", "sinon-chai": "^2.8.0",
"stylelint": "^8.1.1", "style-loader": "^0.18.2",
"stylelint-config-standard": "^17.0.0", "stylelint": "^8.1.1",
"through2": "^2.0.3", "stylelint-config-standard": "^17.0.0",
"vue-antd-md-loader": "^1.0.2", "through2": "^2.0.3",
"vue-loader": "^13.0.5", "vue-antd-md-loader": "^1.0.3",
"vue-router": "^3.0.1", "vue-loader": "^13.0.5",
"vue-template-compiler": "^2.5.15", "vue-router": "^3.0.1",
"webpack": "^3.6.0", "vue-template-compiler": "^2.5.15",
"webpack-chunk-hash": "^0.5.0", "webpack": "^3.6.0",
"webpack-dev-server": "^2.8.2", "webpack-chunk-hash": "^0.5.0",
"webpack-merge": "^4.1.1" "webpack-dev-server": "^2.8.2",
}, "webpack-merge": "^4.1.1"
"dependencies": { },
"add-dom-event-listener": "^1.0.2", "dependencies": {
"array-tree-filter": "^2.1.0", "add-dom-event-listener": "^1.0.2",
"classnames": "^2.2.5", "array-tree-filter": "^2.1.0",
"component-classes": "^1.2.6", "classnames": "^2.2.5",
"css-animation": "^1.4.1", "component-classes": "^1.2.6",
"dom-align": "^1.6.7", "css-animation": "^1.4.1",
"dom-scroll-into-view": "^1.2.1", "dom-align": "^1.6.7",
"enquire.js": "^2.1.6", "dom-scroll-into-view": "^1.2.1",
"eslint-plugin-vue": "^3.13.0", "enquire.js": "^2.1.6",
"lodash.clonedeep": "^4.5.0", "eslint-plugin-vue": "^3.13.0",
"lodash.debounce": "^4.0.8", "lodash.clonedeep": "^4.5.0",
"lodash.isequal": "^4.5.0", "lodash.debounce": "^4.0.8",
"lodash.isplainobject": "^4.0.6", "lodash.isequal": "^4.5.0",
"moment": "^2.21.0", "lodash.isplainobject": "^4.0.6",
"omit.js": "^1.0.0", "moment": "^2.21.0",
"shallow-equal": "^1.0.0", "omit.js": "^1.0.0",
"shallowequal": "^1.0.2", "shallow-equal": "^1.0.0",
"vue": "^2.5.15", "shallowequal": "^1.0.2",
"vue-clipboard2": "0.0.8", "vue": "^2.5.15",
"vue-types": "^1.0.2", "vue-clipboard2": "0.0.8",
"warning": "^3.0.0" "vue-types": "^1.0.2",
} "warning": "^3.0.0"
} }
}

View File

@ -121,7 +121,22 @@ module.exports = {
use: [ use: [
{ {
loader: 'vue-antd-md-loader', loader: 'vue-antd-md-loader',
options: Object.assign(md, { wrapper: 'div' }), options: Object.assign(md, { wrapper: 'div',
vueLoaderOptions: {
loaders: {
js: [
{ loader: 'babel-loader',
options: {
presets: ['env'],
plugins: [
'transform-vue-jsx',
'transform-object-rest-spread',
],
}},
],
},
},
}),
}, },
], ],
}, },