Skip to content

Commit

Permalink
Updated assets.
Browse files Browse the repository at this point in the history
  • Loading branch information
igr committed May 12, 2019
1 parent c72ec13 commit 0119cf1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion spig/tasks/sass.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ const SpigConfig = require('../spig-config');
gulp.task('sass', () => {
const dev = SpigConfig.dev;

SpigConfig.site.assets['dir_css'] = dev.dirCssOut;
SpigConfig.site.assets['css'] = {};
SpigConfig.site.assets.css['dir'] = dev.dirCssOut;

return gulp.src([dev.srcDir + dev.dirCss + '/**/*.s?ss'])
.pipe(sourcemaps.init())
Expand Down
5 changes: 3 additions & 2 deletions spig/tasks/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ const SpigConfig = require('../spig-config');
gulp.task('js', () => {
const dev = SpigConfig.dev;

SpigConfig.site.assets['dir_js'] = dev.dirJsOut;
SpigConfig.site.assets['bundle_js'] = dev.dirJsOut + '/' + SpigConfig.dev.names.bundle_js;
SpigConfig.site.assets['js'] = {};
SpigConfig.site.assets.js['dir'] = dev.dirJsOut;
SpigConfig.site.assets.js['bundle'] = dev.dirJsOut + '/' + SpigConfig.dev.names.bundle_js;

return gulp.src([dev.srcDir + dev.dirJs + '/**/*.js'])
.pipe(plumber())
Expand Down
5 changes: 2 additions & 3 deletions src/layouts/base.njk
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="{{ site.assets.dir_css }}/main.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="{{ site.assets.bundle_js }}"></script>
<link href="{{ site.assets.css.dir }}/main.css" rel="stylesheet" type="text/css">
<title>{{ page.title }}</title>
</head>
<body>
Expand All @@ -17,6 +16,6 @@

{% include "footer.njk" %}

<script type="text/javascript" src="{{ site.assets.bundle_js }}"></script>
<script type="text/javascript" src="{{ site.assets.js.bundle }}"></script>
</body>
</html>

0 comments on commit 0119cf1

Please sign in to comment.