From 88fdd04ffa31a4e093fcc21247188e5c1b36e6c8 Mon Sep 17 00:00:00 2001 From: "jo.sy" Date: Fri, 7 Sep 2018 10:49:03 +0800 Subject: [PATCH] ver. 0.1.8 --- HISTORY.md | 3 +++ package.json | 2 +- src/ActionBar.less | 6 +++--- src/List.less | 10 +++++----- style/index.js | 3 +++ webpack.custom.js | 19 +++++++++++++++++++ 6 files changed, 34 insertions(+), 9 deletions(-) create mode 100644 style/index.js create mode 100644 webpack.custom.js diff --git a/HISTORY.md b/HISTORY.md index cf210bf..9038e34 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,4 +1,7 @@ # history +## 0.1.8 + +* `CHANGED` support js style export ## 0.1.7 * `CHANGED` update to react 16.x diff --git a/package.json b/package.json index 2325604..cfcc196 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "uxcore-list", - "version": "0.1.7", + "version": "0.1.8", "description": "uxcore-list component for uxcore.", "repository": "https://github.com/uxcore/uxcore-list.git", "author": "eternalsky", diff --git a/src/ActionBar.less b/src/ActionBar.less index 1748bbc..c1aa521 100644 --- a/src/ActionBar.less +++ b/src/ActionBar.less @@ -1,10 +1,10 @@ -.@{__list-prefix-cls}-actionbar { +.@{__listPrefixCls}-actionbar { width: 100%; margin-bottom: 12px; padding: 6px 0px 4px; } -.@{__list-prefix-cls}-actionbar-item { +.@{__listPrefixCls}-actionbar-item { display: inline-block; margin-right: 10px; &.kuma-button { @@ -12,7 +12,7 @@ } } -.@{__list-prefix-cls}-searchbar { +.@{__listPrefixCls}-searchbar { float: right; position:relative; width: 270px; diff --git a/src/List.less b/src/List.less index 7de9777..347df0d 100644 --- a/src/List.less +++ b/src/List.less @@ -5,17 +5,17 @@ * Copyright 2015-2016, Uxcore Team, Alinw. * All rights reserved. */ - - @__list-prefix-cls: kuma-list; + + @__listPrefixCls: kuma-list; @import "./Actionbar"; -.@{__list-prefix-cls}-nodata { +.@{__listPrefixCls}-nodata { line-height: 50px; color: @text-primary-color; background: #fafafa; text-align: center; } -.@{__list-prefix-cls}-pager { +.@{__listPrefixCls}-pager { text-align: right; padding: 10px 0px; .kuma-select2-selection__rendered { @@ -23,7 +23,7 @@ } } -.@{__list-prefix-cls} .kuma-page { +.@{__listPrefixCls} .kuma-page { display: inline-block; } diff --git a/style/index.js b/style/index.js new file mode 100644 index 0000000..79c1cf5 --- /dev/null +++ b/style/index.js @@ -0,0 +1,3 @@ +import '../src/List.less'; +import 'uxcore-button/style'; +import 'uxcore-pagination/style'; diff --git a/webpack.custom.js b/webpack.custom.js new file mode 100644 index 0000000..aea07bf --- /dev/null +++ b/webpack.custom.js @@ -0,0 +1,19 @@ +const modifyVars = require('kuma-base/jsvars/orange'); + +/* eslint-disable no-param-reassign */ +module.exports = (config) => { + config.module.rules.forEach((rule) => { + if (rule.test.toString() === /\.less$/.toString()) { + rule.use = [ + 'style-loader', + 'css-loader', + { + loader: 'less-loader', + options: { + modifyVars, + }, + }, + ]; + } + }); +};