1
0
mirror of https://github.com/tabler/tabler.git synced 2025-12-26 11:16:12 +04:00

libs @ fix

This commit is contained in:
codecalm
2019-10-28 23:15:07 +01:00
committed by Alex Safian
parent f9539a6ce1
commit 10416d7e74
3 changed files with 4 additions and 4 deletions

View File

@@ -5,7 +5,7 @@ const libs = require('../pages/_data/libs'),
const all_libs = libs.js.concat(libs.css);
all_libs.forEach(function (lib) {
let dirname = path.dirname(lib);
let cmd = `mkdir -p "dist/libs/${dirname}" && cp -r node_modules/${lib} dist/libs/${lib}`;
let dirname = path.dirname(lib).replace('@', '');
let cmd = `mkdir -p "dist/libs/${dirname}" && cp -r node_modules/${lib} dist/libs/${lib.replace('@', '')}`;
exec(cmd)
});

View File

@@ -1,7 +1,7 @@
{% if site.data.libs %}
<!-- Libs CSS -->
{% for lib in site.data.libs.css %}
<link href="{{ site.base }}/{% if jekyll.environment == 'production' %}dist/libs{% else %}node_modules{% endif %}/{{ lib }}?{{ site.time | date: '%s' }}" rel="stylesheet" />
<link href="{{ site.base }}/{% if jekyll.environment == 'production' %}dist/libs{% else %}node_modules{% endif %}/{% if jekyll.environment == 'production' %}{{ lib | replace: '@', '' }}{% else %}{{ lib }}{% endif %}?{{ site.time | date: '%s' }}" rel="stylesheet" />
{% endfor %}
{% endif %}

View File

@@ -7,7 +7,7 @@
{% if site.data.libs %}
<!-- Libs JS -->
{% for lib in site.data.libs.js %}
<script src="{{ site.base }}/{% if jekyll.environment == 'production' %}dist/libs{% else %}node_modules{% endif %}/{{ lib }}?{{ site.time | date: '%s' }}"></script>
<script src="{{ site.base }}/{% if jekyll.environment == 'production' %}dist/libs{% else %}node_modules{% endif %}/{% if jekyll.environment == 'production' %}{{ lib | replace: '@', '' }}{% else %}{{ lib }}{% endif %}?{{ site.time | date: '%s' }}"></script>
{% endfor %}
{% endif %}