Add istanbul ignore (#521)

pull/524/head
cinwell.li 2016-10-19 22:48:35 +08:00 committed by FuryBean
parent 0c75354eb5
commit 510034d2d2
68 changed files with 101 additions and 62 deletions

View File

@ -1,6 +1,6 @@
popper.js
fecha.js
release.sh
src/utils/popper.js
src/utils/date.js
*.sh
node_modules
lib
coverage

View File

@ -23,6 +23,7 @@ const Files = [
content: `const ${ComponentName} = require('./src/main');
${ComponentName}.install = function(Vue) {
/* istanbul ignore next */
Vue.component(${ComponentName}.name, ${ComponentName});
};
@ -41,21 +42,9 @@ cooking.set({
template: false,
format: 'umd',
moduleName: 'El${ComponentName}',
extends: ['vue2']
});
cooking.add('resolve.alias', {
'main': path.join(__dirname, '../../src'),
'packages': path.join(__dirname, '../../packages')
});
cooking.add('externals', {
vue: {
root: 'Vue',
commonjs: 'vue',
commonjs2: 'vue',
amd: 'vue'
}
extends: ['vue2'],
alias: config.alias,
externals: { vue: config.vue }
});
module.exports = cooking.resolve();`

View File

@ -1,5 +1,6 @@
const Alert = require('./src/main');
/* istanbul ignore next */
Alert.install = function(Vue) {
Vue.component(Alert.name, Alert);
};

View File

@ -1,5 +1,6 @@
const ElAutocomplete = require('./src/autocomplete');
/* istanbul ignore next */
ElAutocomplete.install = function(Vue) {
Vue.component(ElAutocomplete.name, ElAutocomplete);
};

View File

@ -1,5 +1,6 @@
const Badge = require('./src/main');
/* istanbul ignore next */
Badge.install = function(Vue) {
Vue.component(Badge.name, Badge);
};

View File

@ -1,5 +1,6 @@
const ElBreadcrumbItem = require('../breadcrumb/src/breadcrumb-item');
/* istanbul ignore next */
ElBreadcrumbItem.install = function(Vue) {
Vue.component(ElBreadcrumbItem.name, ElBreadcrumbItem);
};

View File

@ -1,5 +1,6 @@
const ElBreadcrumb = require('./src/breadcrumb');
/* istanbul ignore next */
ElBreadcrumb.install = function(Vue) {
Vue.component(ElBreadcrumb.name, ElBreadcrumb);
};

View File

@ -1,5 +1,6 @@
const ElButtonGroup = require('../button/src/button-group');
/* istanbul ignore next */
ElButtonGroup.install = function(Vue) {
Vue.component(ElButtonGroup.name, ElButtonGroup);
};

View File

@ -1,6 +1,7 @@
const ElButton = require('./src/button');
const ElButtonGroup = require('./src/button-group');
/* istanbul ignore next */
ElButton.install = function(Vue) {
Vue.component(ElButton.name, ElButton);
Vue.component(ElButtonGroup.name, ElButtonGroup);

View File

@ -1,5 +1,6 @@
const Card = require('./src/main');
/* istanbul ignore next */
Card.install = function(Vue) {
Vue.component(Card.name, Card);
};

View File

@ -1,5 +1,6 @@
const ElCheckboxGroup = require('../checkbox/src/checkbox-group.vue');
/* istanbul ignore next */
ElCheckboxGroup.install = function(Vue) {
Vue.component(ElCheckboxGroup.name, ElCheckboxGroup);
};

View File

@ -1,6 +1,7 @@
const ElCheckbox = require('./src/checkbox');
const ElCheckboxGroup = require('./src/checkbox-group.vue');
/* istanbul ignore next */
module.exports = function install(Vue) {
Vue.component(ElCheckboxGroup.name, ElCheckboxGroup);
Vue.component(ElCheckbox.name, ElCheckbox);

View File

@ -1,5 +1,6 @@
const ElCheckbox = require('./src/checkbox');
/* istanbul ignore next */
ElCheckbox.install = function(Vue) {
Vue.component(ElCheckbox.name, ElCheckbox);
};

View File

@ -1,7 +1,8 @@
const ElCol = require('./src/col');
/* istanbul ignore next */
ElCol.install = function(Vue) {
Vue.component('el-col', ElCol);
Vue.component(ElCol.name, ElCol);
};
module.exports = ElCol;

View File

@ -2,6 +2,7 @@ import DatePicker from './src/picker/date-picker';
import TimePicker from './src/picker/time-picker';
import TimeSelect from './src/picker/time-select';
/* istanbul ignore next */
module.exports = function install(Vue) {
Vue.component(DatePicker.name, DatePicker);
Vue.component(TimePicker.name, TimePicker);

View File

@ -1,2 +1,8 @@
import Picker from './src/picker/date-picker';
module.exports = Picker;
import DatePicker from './src/picker/date-picker';
/* istanbul ignore next */
module.exports = function install(Vue) {
Vue.component(DatePicker.name, DatePicker);
};
module.exports = DatePicker;

View File

@ -1,5 +1,6 @@
const ElDialog = require('./src/component');
/* istanbul ignore next */
ElDialog.install = function(Vue) {
Vue.component(ElDialog.name, ElDialog);
};

View File

@ -1,5 +1,6 @@
const ElDropdownItem = require('../dropdown/src/dropdown-item');
/* istanbul ignore next */
ElDropdownItem.install = function(Vue) {
Vue.component(ElDropdownItem.name, ElDropdownItem);
};

View File

@ -1,5 +1,6 @@
const ElDropdownMenu = require('../dropdown/src/dropdown-menu');
/* istanbul ignore next */
ElDropdownMenu.install = function(Vue) {
Vue.component(ElDropdownMenu.name, ElDropdownMenu);
};

View File

@ -1,5 +1,6 @@
const ElDropdown = require('./src/dropdown');
/* istanbul ignore next */
ElDropdown.install = function(Vue) {
Vue.component(ElDropdown.name, ElDropdown);
};

View File

@ -1,5 +1,6 @@
const ElFormItem = require('../form/src/form-item');
/* istanbul ignore next */
ElFormItem.install = function(Vue) {
Vue.component(ElFormItem.name, ElFormItem);
};

View File

@ -1,6 +1,7 @@
const ElFormItem = require('./src/form-item');
const ElForm = require('./src/form');
/* istanbul ignore next */
module.exports = function(Vue) {
Vue.component(ElForm.name, ElForm);
Vue.component(ElFormItem.name, ElFormItem);

View File

@ -1,5 +1,6 @@
const ElForm = require('./src/form');
/* istanbul ignore next */
ElForm.install = function(Vue) {
Vue.component(ElForm.name, ElForm);
};

View File

@ -1 +0,0 @@
module.exports = require('./src/group.vue');

View File

@ -1,26 +0,0 @@
<script>
/**
* group
* @module components/basic/group
* @desc 显示分组的布局样式
* @param {string} [title] - 显示标题
*/
export default {
name: 'el-group',
props: {
title: String
}
};
</script>
<template>
<div class="element-group">
<label
class="element-group__label"
v-text="title"></label>
<div class="element-group__option">
<slot></slot>
</div>
</div>
</template>

View File

@ -1 +1,8 @@
module.exports = require('./src/icon.vue');
const ElIcon = require('./src/icon.vue');
/* istanbul ignore next */
ElIcon.install = function(Vue) {
Vue.component(ElIcon.name, ElIcon);
};
module.exports = ElIcon;

View File

@ -1,5 +1,6 @@
const ElInputNumber = require('./src/input-number');
/* istanbul ignore next */
ElInputNumber.install = function(Vue) {
Vue.component(ElInputNumber.name, ElInputNumber);
};

View File

@ -1,5 +1,6 @@
const ElInput = require('./src/input');
/* istanbul ignore next */
ElInput.install = function(Vue) {
Vue.component(ElInput.name, ElInput);
};

View File

@ -1,2 +1 @@
import Loading from './src/directive';
module.exports = Loading;
module.exports = require('./src/directive');

View File

@ -1,5 +1,6 @@
const ElMenuItemGroup = require('../menu/src/menu-item-group');
/* istanbul ignore next */
ElMenuItemGroup.install = function(Vue) {
Vue.component(ElMenuItemGroup.name, ElMenuItemGroup);
};

View File

@ -1,5 +1,6 @@
const ElMenuItem = require('../menu/src/menu-item');
/* istanbul ignore next */
ElMenuItem.install = function(Vue) {
Vue.component(ElMenuItem.name, ElMenuItem);
};

View File

@ -3,6 +3,7 @@ const ElMenuItem = require('./src/menu-item');
const ElMenuItemGroup = require('./src/menu-item-group');
const ElSubmenu = require('./src/submenu');
/* istanbul ignore next */
module.exports = function(Vue) {
Vue.component(ElMenuItem.name, ElMenuItem);
Vue.component(ElMenuItemGroup.name, ElMenuItemGroup);

View File

@ -1,5 +1,6 @@
const ElMenu = require('./src/menu');
/* istanbul ignore next */
ElMenu.install = function(Vue) {
Vue.component(ElMenu.name, ElMenu);
};

View File

@ -1,2 +1 @@
import MessageBox from './src/main.js';
module.exports = MessageBox;
module.exports = require('./src/main.js');

View File

@ -1,2 +1 @@
import Message from './src/main.js';
module.exports = Message;
module.exports = require('./src/main.js');

View File

@ -1,2 +1 @@
import Notification from './src/main.js';
module.exports = Notification;
module.exports = require('./src/main.js');

View File

@ -1,5 +1,6 @@
const ElOptionGroup = require('../select/src/option-group');
/* istanbul ignore next */
ElOptionGroup.install = function(Vue) {
Vue.component(ElOptionGroup.name, ElOptionGroup);
};

View File

@ -1,5 +1,6 @@
const ElOption = require('../select/src/option');
/* istanbul ignore next */
ElOption.install = function(Vue) {
Vue.component(ElOption.name, ElOption);
};

View File

@ -1,5 +1,6 @@
const Pagination = require('./src/pagination');
/* istanbul ignore next */
Pagination.install = function(Vue) {
Vue.component(Pagination.name, Pagination);
};

View File

@ -1,5 +1,6 @@
const Popover = require('./src/main');
/* istanbul ignore next */
Popover.install = function(Vue) {
Vue.component(Popover.name, Popover);
};

View File

@ -1,5 +1,6 @@
const ElProgress = require('./src/progress');
/* istanbul ignore next */
ElProgress.install = function(Vue) {
Vue.component(ElProgress.name, ElProgress);
};

View File

@ -1,5 +1,6 @@
const RadioButton = require('../radio/src/radio-button.vue');
/* istanbul ignore next */
RadioButton.install = function(Vue) {
Vue.component(RadioButton.name, RadioButton);
};

View File

@ -1,5 +1,6 @@
const RadioGroup = require('../radio/src/radio-group.vue');
/* istanbul ignore next */
RadioGroup.install = function(Vue) {
Vue.component(RadioGroup.name, RadioGroup);
};

View File

@ -2,6 +2,7 @@ const ElRadio = require('./src/radio');
const RadioButton = require('./src/radio-button.vue');
const RadioGroup = require('./src/radio-group.vue');
/* istanbul ignore next */
module.exports = function(Vue) {
Vue.component(ElRadio.name, ElRadio);
Vue.component(RadioButton.name, RadioButton);

View File

@ -1,5 +1,6 @@
const ElRadio = require('./src/radio');
/* istanbul ignore next */
ElRadio.install = function(Vue) {
Vue.component('el-radio', ElRadio);
};

View File

@ -1,5 +1,6 @@
const Rate = require('./src/main');
/* istanbul ignore next */
Rate.install = function(Vue) {
Vue.component(Rate.name, Rate);
};

View File

@ -1,5 +1,6 @@
const ElRow = require('./src/row');
/* istanbul ignore next */
ElRow.install = function(Vue) {
Vue.component(ElRow.name, ElRow);
};

View File

@ -2,6 +2,7 @@ const ElSelect = require('./src/select');
const ElOption = require('./src/option');
const ElOptionGroup = require('./src/option-group');
/* istanbul ignore next */
module.exports = function(Vue) {
Vue.component(ElSelect.name, ElSelect);
Vue.component(ElOption.name, ElOption);

View File

@ -1,5 +1,6 @@
var ElSelect = require('./src/select');
/* istanbul ignore next */
ElSelect.install = function(Vue) {
Vue.component(ElSelect.name, ElSelect);
};

View File

@ -1,5 +1,6 @@
const Slider = require('./src/main');
/* istanbul ignore next */
Slider.install = function(Vue) {
Vue.component(Slider.name, Slider);
};

View File

@ -1,5 +1,6 @@
const ElSpinner = require('./src/spinner');
/* istanbul ignore next */
ElSpinner.install = function(Vue) {
Vue.component(ElSpinner.name, ElSpinner);
};

View File

@ -1,5 +1,6 @@
const Step = require('../steps/src/step');
/* istanbul ignore next */
Step.install = function(Vue) {
Vue.component(Step.name, Step);
};

View File

@ -1,6 +1,7 @@
const Steps = require('./src/steps');
const Step = require('./src/step');
/* istanbul ignore next */
module.exports = function(Vue) {
Vue.component(Steps.name, Steps);
Vue.component(Step.name, Step);

View File

@ -1,5 +1,6 @@
const Steps = require('./src/steps');
/* istanbul ignore next */
Steps.install = function(Vue) {
Vue.component(Steps.name, Steps);
};

View File

@ -1,5 +1,6 @@
const ElSubmenu = require('../menu/src/submenu');
/* istanbul ignore next */
ElSubmenu.install = function(Vue) {
Vue.component(ElSubmenu.name, ElSubmenu);
};

View File

@ -1,5 +1,6 @@
const ElSwitch = require('./src/component');
/* istanbul ignore next */
ElSwitch.install = function(Vue) {
Vue.component(ElSwitch.name, ElSwitch);
};

View File

@ -1,5 +1,6 @@
const TabPane = require('../tabs/src/tab-pane.vue');
/* istanbul ignore next */
TabPane.install = function(Vue) {
Vue.component(TabPane.name, TabPane);
};

View File

@ -1,5 +1,6 @@
const ElTableColumn = require('../table/src/table-column');
/* istanbul ignore next */
ElTableColumn.install = function(Vue) {
Vue.component(ElTableColumn.name, ElTableColumn);
};

View File

@ -1,6 +1,7 @@
const ElTableColumn = require('./src/table-column');
const ElTable = require('./src/table');
/* istanbul ignore next */
module.exports = function(Vue) {
Vue.component(ElTable.name, ElTable);
Vue.component(ElTableColumn.name, ElTableColumn);

View File

@ -1,5 +1,6 @@
const ElTable = require('./src/table');
/* istanbul ignore next */
ElTable.install = function(Vue) {
Vue.component(ElTable.name, ElTable);
};

View File

@ -1,6 +1,7 @@
const ElTabs = require('./src/tabs');
const ElTabPane = require('./src/tab-pane');
/* istanbul ignore next */
module.exports = function(Vue) {
Vue.component(ElTabs.name, ElTabs);
Vue.component(ElTabPane.name, ElTabPane);

View File

@ -1,5 +1,6 @@
const ElTabs = require('./src/tabs');
/* istanbul ignore next */
ElTabs.install = function(Vue) {
Vue.component(ElTabs.name, ElTabs);
};

View File

@ -1,5 +1,6 @@
const ElTag = require('./src/tag');
/* istanbul ignore next */
ElTag.install = function(Vue) {
Vue.component(ElTag.name, ElTag);
};

View File

@ -1,2 +1,8 @@
import Picker from '../date-picker/src/picker/time-picker';
module.exports = Picker;
const TimePicker = require('../date-picker/src/picker/time-picker');
/* istanbul ignore next */
TimePicker.install = function(Vue) {
Vue.component(TimePicker.name, TimePicker);
};
module.exports = TimePicker;

View File

@ -1,2 +1,8 @@
import Picker from '../date-picker/src/picker/time-select';
module.exports = Picker;
const TimeSelect = require('../date-picker/src/picker/time-select');
/* istanbul ignore next */
TimeSelect.install = function(Vue) {
Vue.component(TimeSelect.name, TimeSelect);
};
module.exports = TimeSelect;

View File

@ -1,5 +1,6 @@
const Tooltip = require('./src/main');
/* istanbul ignore next */
Tooltip.install = function(Vue) {
Vue.component(Tooltip.name, Tooltip);
};

View File

@ -1,5 +1,6 @@
const Tree = require('./src/tree.vue');
/* istanbul ignore next */
Tree.install = function(Vue) {
Vue.component(Tree.name, Tree);
};

View File

@ -1,5 +1,6 @@
const Upload = require('./src/index');
const Upload = require('./src');
/* istanbul ignore next */
Upload.install = function(Vue) {
Vue.component(Upload.name, Upload);
};