Skip to content

Commit

Permalink
chore: 使用 vue-sfc-cli v1 重构
Browse files Browse the repository at this point in the history
  • Loading branch information
2nthony authored and levy9527 committed Apr 28, 2019
1 parent 339e86f commit afe7103
Show file tree
Hide file tree
Showing 45 changed files with 3,595 additions and 6,555 deletions.
13 changes: 9 additions & 4 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
{
"presets": [
["env", { "modules": false }]
["@babel/env", { "modules": false }]
],
"env": {
"test": {
"presets": [
["env", { "targets": { "node": "current" }}]
["@babel/env", { "targets": { "node": "current" }}]
]
}
}
}
},
"plugins": [
["@babel/transform-runtime", {
"regenerator": true
}]
]
}
7 changes: 6 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
# editorconfig.org
root = true

[*]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
insert_final_newline = false
trim_trailing_whitespace = false
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@ node_modules/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
dist
docs/build
docs/index.html

# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
.env
15 changes: 15 additions & 0 deletions .grenrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module.exports = {
"dataSource": "prs",
"prefix": "",
"ignoreLabels": ["duplicate", "help wanted", "invalid", "question", "wontfix"],
"ignoreIssuesWith": ["duplicate", "help wanted", "invalid", "question", "wontfix"],
"onlyMilestones": false,
"changelogFilename": "CHANGELOG.md",
"template": {
"issue": "- {{name}} [{{text}}]({{url}})"
},
"groupBy": {
"✨ New Features:": ["enhancement"],
"🐛 Bug Fixes:": ["bug"]
}
}
15 changes: 0 additions & 15 deletions .npmignore

This file was deleted.

3 changes: 0 additions & 3 deletions .storybook/addons.js

This file was deleted.

53 changes: 0 additions & 53 deletions .storybook/config.js

This file was deleted.

23 changes: 23 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
language: node_js
node_js:
- lts/*
git:
depth: 3
install:
- yarn --frozen-lockfile
script:
- yarn build
cache: yarn
deploy:
- on:
branch: master
provider: pages
skip-cleanup: true
keep-history: true
local-dir: docs
github-token: $GITHUB_TOKEN
- on:
branch: master
provider: npm
email: [email protected]
api_key: $NPM_TOKEN
44 changes: 3 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# el-data-table

[![Build Status](https://travis-ci.com/FEMessage/el-data-table.svg?branch=master)](https://travis-ci.com/FEMessage/el-data-table)
[![NPM Download](https://img.shields.io/npm/dm/el-data-table.svg)](https://www.npmjs.com/package/el-data-table)
[![NPM Version](https://img.shields.io/npm/v/el-data-table.svg)](https://www.npmjs.com/package/el-data-table)
[![NPM License](https://img.shields.io/npm/l/el-data-table.svg)](https://github.com/FEMessage/el-data-table/blob/master/LICENSE)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/FEMessage/el-data-table/pulls)
[![Automated Release Notes by gren](https://img.shields.io/badge/%F0%9F%A4%96-release%20notes-00B2EE.svg)](https://github-tools.github.io/github-release-notes/)

使用`axios`自动发送请求,支持树形结构,支持分页,支持自定义查询, 自定义操作列, 让 RESTful 风格的 CRUD 更简单 👏

Expand All @@ -15,7 +17,6 @@ auto requesting by `axios`, supports pagination, tree data structure, custom sea

* **[Introduction](#introduction)**
* **[Feature](#feature)**
* **[Documentation](#documentation)**
* **[Demo](#demo)**
* **[Install](#install)**
* **[Quick Start](#quick-start)**
Expand Down Expand Up @@ -198,48 +199,9 @@ export default {

[⬆ Back to Top](#table-of-contents)

## Documentation

* [full api doc](https://femessage.github.io/el-data-table/)
* [online demo](https://femessage.github.io/el-data-table/storybook/)

[⬆ Back to Top](#table-of-contents)

## Demo

you can run demo on your localhost, just follow these scripts

```bash
# clone the source code
git clone https://github.com/FEMessage/el-data-table.git

# enter the directory
cd el-data-table

# install the dependencies
yarn

# run demo in ./stories
yarn story
```

[⬆ Back to Top](#table-of-contents)

## pre install

this component peerDependencies on [element-ui](http://element.eleme.io/#/zh-CN/component/table) and [el-form-renderer](https://github.com/FEMessage/el-form-renderer) and [axios](https://github.com/axios/axios)

make sure you have installed in your project

```sh
yarn add element-ui @femessage/el-form-renderer axios
```

if you want to develop the component on your localhost, you should install with -P

```sh
yarn add element-ui @femessage/el-form-renderer axios -P
```
* [doc and online demo](https://femessage.github.io/el-data-table/)

[⬆ Back to Top](#table-of-contents)

Expand Down
45 changes: 25 additions & 20 deletions build/rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,29 +1,34 @@
// rollup.config.js
import vue from 'rollup-plugin-vue';
import buble from 'rollup-plugin-buble';
import uglify from 'rollup-plugin-uglify-es';
import minimist from 'minimist';
import vue from 'rollup-plugin-vue'
import babel from 'rollup-plugin-babel'
import commonjs from 'rollup-plugin-commonjs'
import { terser } from 'rollup-plugin-terser'
import minimist from 'minimist'

const argv = minimist(process.argv.slice(2));
const argv = minimist(process.argv.slice(2))

const config = {
input: 'src/index.js',
output: {
name: 'ElDataTable',
exports: 'named',
},
plugins: [
vue({
css: true,
compileTemplate: true,
}),
buble(),
],
};
input: 'src/index.js',
output: {
name: 'ElDataTable',
exports: 'named'
},
plugins: [
commonjs(),
vue({
css: true,
compileTemplate: true
}),
babel({
runtimeHelpers: true,
exclude: 'node_modules/**'
})
]
}

// Only minify browser (iife) version
if (argv.format === 'iife') {
config.plugins.push(uglify());
config.plugins.push(terser())
}

export default config;
export default config
Loading

0 comments on commit afe7103

Please sign in to comment.