浏览代码

Update build css script

zhixin 6 年之前
父节点
当前提交
27b51efb0f

+ 1 - 1
package.json

@@ -27,7 +27,7 @@
     "js:build:concat": "babel src/locale -o dist/bootstrap-table-locale-all.js && NODE_ENV=production babel src/locale -o dist/bootstrap-table-locale-all.min.js",
     "js:build:banner": "find dist -name '*.min.js' -exec headr {} -o {} --version --homepage --author --license \\;",
     "js:build": "run-s js:build:*",
-    "css:build:scss": "sass src/bootstrap-table.scss src/bootstrap-table.css",
+    "css:build:scss": "find src -name 'bootstrap-table*.scss' | sed -e 'p;s/scss/css/' | xargs -n2 sass",
     "css:build:base": "find src -name '*.css' | sed -e 'p;s/src/dist/' | xargs -n2 cp",
     "css:build:min": "find dist -name '*.css' | sed -e 'p;s/.css/.min.css/' | xargs -n2 cssmin",
     "css:build:banner": "find dist -name '*.min.css' -exec headr {} -o {} --version --homepage --author --license \\;",

+ 4 - 4
site/themes/bulma.md

@@ -15,7 +15,7 @@ Looking to quickly add Bootstrap Table to your <a href="http://bulma.io" target=
 Copy-paste the stylesheet `<link>` into your `<head>` before all other stylesheets to load our CSS.
 
 {% highlight html %}
-<link rel="stylesheet" href="https://unpkg.com/bootstrap-table@{{ site.current_version }}/dist/bootstrap-table-bulma.min.css">
+<link rel="stylesheet" href="https://unpkg.com/bootstrap-table@{{ site.current_version }}/dist/themes/bulma/bootstrap-table-bulma.min.css">
 {% endhighlight %}
 
 ### JS
@@ -24,7 +24,7 @@ Place the following `<script>`s near the end of your pages, right before the clo
 
 {% highlight html %}
 <script src="https://unpkg.com/bootstrap-table@{{ site.current_version }}/dist/bootstrap-table.min.js"></script>
-<script src="https://unpkg.com/bootstrap-table@{{ site.current_version }}/dist/bootstrap-table-bulma.min.js"></script>
+<script src="https://unpkg.com/bootstrap-table@{{ site.current_version }}/dist/themes/bulma/bootstrap-table-bulma.min.js"></script>
 {% endhighlight %}
 
 ## Starter template
@@ -45,7 +45,7 @@ Put it all together and your pages should look like this:
 
     <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.4/css/bulma.min.css">
     <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous">
-    <link rel="stylesheet" href="https://unpkg.com/bootstrap-table@{{ site.current_version }}/dist/bootstrap-table-bulma.min.css">
+    <link rel="stylesheet" href="https://unpkg.com/bootstrap-table@{{ site.current_version }}/dist/themes/bulma/bootstrap-table-bulma.min.css">
 
     <title>Hello, Bootstrap Table!</title>
   </head>
@@ -74,7 +74,7 @@ Put it all together and your pages should look like this:
 
     <script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
     <script src="https://unpkg.com/bootstrap-table@{{ site.current_version }}/dist/bootstrap-table.min.js"></script>
-    <script src="https://unpkg.com/bootstrap-table@{{ site.current_version }}/dist/bootstrap-table-bulma.min.js"></script>
+    <script src="https://unpkg.com/bootstrap-table@{{ site.current_version }}/dist/themes/bulma/bootstrap-table-bulma.min.js"></script>
   </body>
 </html>
 {% endhighlight %}

+ 4 - 4
site/themes/foundation.md

@@ -15,7 +15,7 @@ Looking to quickly add Bootstrap Table to your <a href="https://foundation.zurb.
 Copy-paste the stylesheet `<link>` into your `<head>` before all other stylesheets to load our CSS.
 
 {% highlight html %}
-<link rel="stylesheet" href="https://unpkg.com/bootstrap-table@{{ site.current_version }}/dist/bootstrap-table-foundation.min.css">
+<link rel="stylesheet" href="https://unpkg.com/bootstrap-table@{{ site.current_version }}/dist/themes/foundation/bootstrap-table-foundation.min.css">
 {% endhighlight %}
 
 ### JS
@@ -24,7 +24,7 @@ Place the following `<script>`s near the end of your pages, right before the clo
 
 {% highlight html %}
 <script src="https://unpkg.com/bootstrap-table@{{ site.current_version }}/dist/bootstrap-table.min.js"></script>
-<script src="https://unpkg.com/bootstrap-table@{{ site.current_version }}/dist/bootstrap-table-foundation.min.js"></script>
+<script src="https://unpkg.com/bootstrap-table@{{ site.current_version }}/dist/themes/foundation/bootstrap-table-foundation.min.js"></script>
 {% endhighlight %}
 
 ## Starter template
@@ -45,7 +45,7 @@ Put it all together and your pages should look like this:
 
     <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/foundation-sites@6.5.3/dist/css/foundation.min.css" integrity="sha256-xpOKVlYXzQ3P03j397+jWFZLMBXLES3IiryeClgU5og= sha384-gP4DhqyoT9b1vaikoHi9XQ8If7UNLO73JFOOlQV1RATrA7D0O7TjJZifac6NwPps sha512-AKwIib1E+xDeXe0tCgbc9uSvPwVYl6Awj7xl0FoaPFostZHOuDQ1abnDNCYtxL/HWEnVOMrFyf91TDgLPi9pNg==" crossorigin="anonymous">
     <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous">
-    <link rel="stylesheet" href="https://unpkg.com/bootstrap-table@{{ site.current_version }}/dist/bootstrap-table-foundation.min.css">
+    <link rel="stylesheet" href="https://unpkg.com/bootstrap-table@{{ site.current_version }}/dist/themes/foundation/bootstrap-table-foundation.min.css">
 
     <title>Hello, Bootstrap Table!</title>
   </head>
@@ -75,7 +75,7 @@ Put it all together and your pages should look like this:
     <script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
     <script src="https://cdn.jsdelivr.net/npm/foundation-sites@6.5.3/dist/js/foundation.min.js" integrity="sha256-/PFxCnsMh+nTuM0k3VJCRch1gwnCfKjaP8rJNq5SoBg= sha384-9ksAFjQjZnpqt6VtpjMjlp2S0qrGbcwF/rvrLUg2vciMhwc1UJJeAAOLuJ96w+Nj sha512-UMSn6RHqqJeJcIfV1eS2tPKCjzaHkU/KqgAnQ7Nzn0mLicFxaVhm9vq7zG5+0LALt15j1ljlg8Fp9PT1VGNmDw==" crossorigin="anonymous"></script>
     <script src="https://unpkg.com/bootstrap-table@{{ site.current_version }}/dist/bootstrap-table.min.js"></script>
-    <script src="https://unpkg.com/bootstrap-table@{{ site.current_version }}/dist/bootstrap-table-foundation.min.js"></script>
+    <script src="https://unpkg.com/bootstrap-table@{{ site.current_version }}/dist/themes/foundation/bootstrap-table-foundation.min.js"></script>
   </body>
 </html>
 {% endhighlight %}

+ 4 - 4
site/themes/materialize.md

@@ -15,7 +15,7 @@ Looking to quickly add Bootstrap Table to your <a href="https://materializecss.c
 Copy-paste the stylesheet `<link>` into your `<head>` before all other stylesheets to load our CSS.
 
 {% highlight html %}
-<link rel="stylesheet" href="https://unpkg.com/bootstrap-table@{{ site.current_version }}/dist/bootstrap-table-materialize.min.css">
+<link rel="stylesheet" href="https://unpkg.com/bootstrap-table@{{ site.current_version }}/dist/themes/materialize/bootstrap-table-materialize.min.css">
 {% endhighlight %}
 
 ### JS
@@ -24,7 +24,7 @@ Place the following `<script>`s near the end of your pages, right before the clo
 
 {% highlight html %}
 <script src="https://unpkg.com/bootstrap-table@{{ site.current_version }}/dist/bootstrap-table.min.js"></script>
-<script src="https://unpkg.com/bootstrap-table@{{ site.current_version }}/dist/bootstrap-table-materialize.min.js"></script>
+<script src="https://unpkg.com/bootstrap-table@{{ site.current_version }}/dist/themes/materialize/bootstrap-table-materialize.min.js"></script>
 {% endhighlight %}
 
 ## Starter template
@@ -45,7 +45,7 @@ Put it all together and your pages should look like this:
 
     <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css">
     <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
-    <link rel="stylesheet" href="https://unpkg.com/bootstrap-table@{{ site.current_version }}/dist/bootstrap-table-materialize.min.css">
+    <link rel="stylesheet" href="https://unpkg.com/bootstrap-table@{{ site.current_version }}/dist/themes/materialize/bootstrap-table-materialize.min.css">
 
     <title>Hello, Bootstrap Table!</title>
   </head>
@@ -75,7 +75,7 @@ Put it all together and your pages should look like this:
     <script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
     <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>
     <script src="https://unpkg.com/bootstrap-table@{{ site.current_version }}/dist/bootstrap-table.min.js"></script>
-    <script src="https://unpkg.com/bootstrap-table@{{ site.current_version }}/dist/bootstrap-table-materialize.min.js"></script>
+    <script src="https://unpkg.com/bootstrap-table@{{ site.current_version }}/dist/themes/materialize/bootstrap-table-materialize.min.js"></script>
   </body>
 </html>
 {% endhighlight %}

+ 4 - 4
site/themes/semantic.md

@@ -15,7 +15,7 @@ Looking to quickly add Bootstrap Table to your <a href="http://semantic-ui.com"
 Copy-paste the stylesheet `<link>` into your `<head>` before all other stylesheets to load our CSS.
 
 {% highlight html %}
-<link rel="stylesheet" href="https://unpkg.com/bootstrap-table@{{ site.current_version }}/dist/bootstrap-table-semantic.min.css">
+<link rel="stylesheet" href="https://unpkg.com/bootstrap-table@{{ site.current_version }}/dist/themes/semantic/bootstrap-table-semantic.min.css">
 {% endhighlight %}
 
 ### JS
@@ -24,7 +24,7 @@ Place the following `<script>`s near the end of your pages, right before the clo
 
 {% highlight html %}
 <script src="https://unpkg.com/bootstrap-table@{{ site.current_version }}/dist/bootstrap-table.min.js"></script>
-<script src="https://unpkg.com/bootstrap-table@{{ site.current_version }}/dist/bootstrap-table-semantic.min.js"></script>
+<script src="https://unpkg.com/bootstrap-table@{{ site.current_version }}/dist/themes/semantic/bootstrap-table-semantic.min.js"></script>
 {% endhighlight %}
 
 ## Starter template
@@ -45,7 +45,7 @@ Put it all together and your pages should look like this:
 
     <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/semantic.min.css">
     <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous">
-    <link rel="stylesheet" href="https://unpkg.com/bootstrap-table@{{ site.current_version }}/dist/bootstrap-table-semantic.min.css">
+    <link rel="stylesheet" href="https://unpkg.com/bootstrap-table@{{ site.current_version }}/dist/themes/semantic/bootstrap-table-semantic.min.css">
 
     <title>Hello, Bootstrap Table!</title>
   </head>
@@ -75,7 +75,7 @@ Put it all together and your pages should look like this:
     <script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
     <script src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/semantic.min.js"></script>
     <script src="https://unpkg.com/bootstrap-table@{{ site.current_version }}/dist/bootstrap-table.min.js"></script>
-    <script src="https://unpkg.com/bootstrap-table@{{ site.current_version }}/dist/bootstrap-table-semantic.min.js"></script>
+    <script src="https://unpkg.com/bootstrap-table@{{ site.current_version }}/dist/themes/semantic/bootstrap-table-semantic.min.js"></script>
   </body>
 </html>
 {% endhighlight %}

+ 2 - 1
src/bootstrap-table.scss

@@ -1,7 +1,8 @@
 /**
  * @author zhixin wen <wenzhixin2010@gmail.com>
+ * version: 1.13.5
  * https://github.com/wenzhixin/bootstrap-table/
  */
 
 @import './themes/bootstrap/variables.scss';
-@import './themes/bootstrap-table.scss';
+@import './themes/theme.scss';

+ 1 - 1
src/themes/bulma/bootstrap-table-bulma.scss

@@ -5,7 +5,7 @@
  */
 
  @import './variables.scss';
- @import '../bootstrap-table.scss';
+ @import '../theme.scss';
 
 .bootstrap-table {
   .float-left {

+ 1 - 1
src/themes/foundation/bootstrap-table-foundation.scss

@@ -5,7 +5,7 @@
  */
 
  @import './variables.scss';
- @import '../bootstrap-table.scss';
+ @import '../theme.scss';
 
 .bootstrap-table {
   .float-left {

+ 1 - 1
src/themes/materialize/bootstrap-table-materialize.scss

@@ -5,7 +5,7 @@
  */
 
  @import './variables.scss';
- @import '../bootstrap-table.scss';
+ @import '../theme.scss';
 
 .bootstrap-table {
   .float-left {

+ 1 - 1
src/themes/semantic/bootstrap-table-semantic.scss

@@ -5,7 +5,7 @@
  */
 
  @import './variables.scss';
- @import '../bootstrap-table.scss';
+ @import '../theme.scss';
 
 .bootstrap-table {
   .fixed-table-container.fixed-height:not(.has-footer),

+ 0 - 6
src/themes/bootstrap-table.scss

@@ -1,9 +1,3 @@
-/**
- * @author zhixin wen <wenzhixin2010@gmail.com>
- * version: 1.13.5
- * https://github.com/wenzhixin/bootstrap-table/
- */
-
 .bootstrap-table {
   .fixed-table-toolbar {
     &:after {