提交 10416d7e 编写于 作者: C codecalm 提交者: Alex Safian

libs `@` fix

上级 f9539a6c
......@@ -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)
});
{% 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 %}
......
......@@ -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 %}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册