mirror of https://github.com/ElemeFE/element
Update externals (#641)
parent
b97e372b60
commit
4dd8b094cb
|
@ -8,8 +8,7 @@ var mixinsList = fs.readdirSync(path.resolve(__dirname, '../src/mixins'));
|
||||||
var externals = {};
|
var externals = {};
|
||||||
|
|
||||||
Object.keys(Components).forEach(function(key) {
|
Object.keys(Components).forEach(function(key) {
|
||||||
externals[`element-ui/packages/${key}/index.js`] = `element-ui/lib/${key}`;
|
externals[`element-ui/packages/${key}`] = `element-ui/lib/${key}`;
|
||||||
externals[`element-ui/packages/${key}/style.css`] = `element-ui/lib/${key}/style.css`;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
Object.keys(dependencies).forEach(function(key) {
|
Object.keys(dependencies).forEach(function(key) {
|
||||||
|
|
|
@ -78,14 +78,6 @@ var wrap = function(render) {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
var externals = {};
|
|
||||||
Object.keys(Components).forEach(function(key) {
|
|
||||||
externals[`element-ui/packages/${key}/style.css`] = 'null';
|
|
||||||
});
|
|
||||||
|
|
||||||
// 开发模式不需要将不存在的 style.css 打包进去
|
|
||||||
cooking.add('externals', externals);
|
|
||||||
|
|
||||||
if (process.env.NODE_ENV === 'production') {
|
if (process.env.NODE_ENV === 'production') {
|
||||||
cooking.add('externals.vue', 'Vue');
|
cooking.add('externals.vue', 'Vue');
|
||||||
cooking.add('externals.vue-router', 'VueRouter');
|
cooking.add('externals.vue-router', 'VueRouter');
|
||||||
|
|
|
@ -7,7 +7,9 @@ cooking.set({
|
||||||
entry: './src/index.js',
|
entry: './src/index.js',
|
||||||
extends: process.env.CI_ENV ? ['vue2'] : ['vue2', 'lint'],
|
extends: process.env.CI_ENV ? ['vue2'] : ['vue2', 'lint'],
|
||||||
minimize: false,
|
minimize: false,
|
||||||
alias: config.alias,
|
alias: Object.assign(config.alias, {
|
||||||
|
'vue$': 'vue/dist/vue.js'
|
||||||
|
}),
|
||||||
postcss: config.postcss,
|
postcss: config.postcss,
|
||||||
sourceMap: '#inline-source-map'
|
sourceMap: '#inline-source-map'
|
||||||
});
|
});
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
"pub": "sh build/release.sh",
|
"pub": "sh build/release.sh",
|
||||||
"pub:all": "npm run dist:all && lerna publish",
|
"pub:all": "npm run dist:all && lerna publish",
|
||||||
"build:utils": "babel src/utils --out-dir lib/utils",
|
"build:utils": "babel src/utils --out-dir lib/utils",
|
||||||
"clean": "rimraf lib && rimraf packages/*/lib",
|
"clean": "rimraf lib && rimraf packages/*/lib && rimraf test/**/coverage",
|
||||||
"lint": "eslint src/**/* test/**/* packages/**/*.{js,vue} build/**/* --quiet",
|
"lint": "eslint src/**/* test/**/* packages/**/*.{js,vue} build/**/* --quiet",
|
||||||
"test:watch": "karma start test/unit/karma.conf.js",
|
"test:watch": "karma start test/unit/karma.conf.js",
|
||||||
"test": "npm run lint && CI_ENV=/dev/ karma start test/unit/karma.conf.js --single-run"
|
"test": "npm run lint && CI_ENV=/dev/ karma start test/unit/karma.conf.js --single-run"
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import ElInput from 'element-ui/packages/input/index.js';
|
import ElInput from 'element-ui/packages/input';
|
||||||
import Clickoutside from 'element-ui/src/utils/clickoutside';
|
import Clickoutside from 'element-ui/src/utils/clickoutside';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import ElInput from 'element-ui/packages/input/index.js';
|
import ElInput from 'element-ui/packages/input';
|
||||||
import { once, on } from 'wind-dom/src/event';
|
import { once, on } from 'wind-dom/src/event';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
|
@ -34,8 +34,8 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
import Popup from 'vue-popup';
|
import Popup from 'vue-popup';
|
||||||
import ElInput from 'element-ui/packages/input/index.js';
|
import ElInput from 'element-ui/packages/input';
|
||||||
import ElButton from 'element-ui/packages/button/index.js';
|
import ElButton from 'element-ui/packages/button';
|
||||||
import { addClass, removeClass } from 'wind-dom/src/class';
|
import { addClass, removeClass } from 'wind-dom/src/class';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import Pager from './pager.vue';
|
import Pager from './pager.vue';
|
||||||
import ElSelect from 'element-ui/packages/select/index.js';
|
import ElSelect from 'element-ui/packages/select';
|
||||||
import ElOption from 'element-ui/packages/option/index.js';
|
import ElOption from 'element-ui/packages/option';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ElPagination',
|
name: 'ElPagination',
|
||||||
|
|
|
@ -15,7 +15,7 @@ npm i el-select -D
|
||||||
|
|
||||||
// import component
|
// import component
|
||||||
import Component from 'el-select'
|
import Component from 'el-select'
|
||||||
import ''el-select/lib/style.css'
|
import 'el-select/lib/style.css'
|
||||||
|
|
||||||
Vue.use(Component)
|
Vue.use(Component)
|
||||||
```
|
```
|
||||||
|
|
|
@ -65,9 +65,9 @@
|
||||||
|
|
||||||
<script type="text/babel">
|
<script type="text/babel">
|
||||||
import emitter from 'element-ui/src/mixins/emitter';
|
import emitter from 'element-ui/src/mixins/emitter';
|
||||||
import ElInput from 'element-ui/packages/input/index.js';
|
import ElInput from 'element-ui/packages/input';
|
||||||
import ElSelectMenu from './select-dropdown.vue';
|
import ElSelectMenu from './select-dropdown.vue';
|
||||||
import ElTag from 'element-ui/packages/tag/index.js';
|
import ElTag from 'element-ui/packages/tag';
|
||||||
import debounce from 'throttle-debounce/debounce';
|
import debounce from 'throttle-debounce/debounce';
|
||||||
import Clickoutside from 'element-ui/src/utils/clickoutside';
|
import Clickoutside from 'element-ui/src/utils/clickoutside';
|
||||||
import { addClass, removeClass, hasClass } from 'wind-dom/src/class';
|
import { addClass, removeClass, hasClass } from 'wind-dom/src/class';
|
||||||
|
|
|
@ -35,8 +35,8 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script type="text/babel">
|
<script type="text/babel">
|
||||||
import ElInputNumber from 'element-ui/packages/input-number/index.js';
|
import ElInputNumber from 'element-ui/packages/input-number';
|
||||||
import ElTooltip from 'element-ui/packages/tooltip/index.js';
|
import ElTooltip from 'element-ui/packages/tooltip';
|
||||||
import { getStyle } from 'wind-dom/src/style';
|
import { getStyle } from 'wind-dom/src/style';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import ElCheckbox from 'element-ui/packages/checkbox/index.js';
|
import ElCheckbox from 'element-ui/packages/checkbox';
|
||||||
import ElTag from 'element-ui/packages/tag/index.js';
|
import ElTag from 'element-ui/packages/tag';
|
||||||
import objectAssign from 'object-assign';
|
import objectAssign from 'object-assign';
|
||||||
|
|
||||||
let columnIdSeed = 1;
|
let columnIdSeed = 1;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import ElCheckbox from 'element-ui/packages/checkbox/index.js';
|
import ElCheckbox from 'element-ui/packages/checkbox';
|
||||||
import ElTag from 'element-ui/packages/tag/index.js';
|
import ElTag from 'element-ui/packages/tag';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'el-table-header',
|
name: 'el-table-header',
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
import UploadList from './upload-list';
|
import UploadList from './upload-list';
|
||||||
import Upload from './upload';
|
import Upload from './upload';
|
||||||
import IframeUpload from './iframe-upload';
|
import IframeUpload from './iframe-upload';
|
||||||
import ElProgress from 'element-ui/packages/progress/index.js';
|
import ElProgress from 'element-ui/packages/progress';
|
||||||
|
|
||||||
function noop() {
|
function noop() {
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import Vue from 'vue/dist/vue';
|
import Vue from 'vue';
|
||||||
import Element from 'main/index.js';
|
import Element from 'main/index.js';
|
||||||
|
|
||||||
Vue.use(Element);
|
Vue.use(Element);
|
||||||
|
|
Loading…
Reference in New Issue