Skip to content
This repository has been archived by the owner on Nov 24, 2019. It is now read-only.

Commit

Permalink
fix: Fix issue in the header-js:tmp template
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Walther committed Feb 15, 2018
1 parent aac4a07 commit f1a94b2
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
4 changes: 4 additions & 0 deletions changelog.yml
@@ -1,3 +1,7 @@
v0.14.7:
date: "2018-02-15"
changes:
- "Fix issue in the header-js:tmp template"
v0.14.6:
date: "2018-02-09"
fixes:
Expand Down
15 changes: 12 additions & 3 deletions lib/tasks/header.js
Expand Up @@ -11,13 +11,20 @@ function HeaderTasks(gulp, plugins, config, taskUtils) {
* @param done
*/
const header = function (taskConfig, done) {
console.log('taskConfig', taskConfig);
return gulp.src(taskConfig.src)
.pipe(taskUtils.debug(taskConfig))
.pipe(plugins.header(taskConfig.opts.template, taskConfig.opts.context))
.on('error', function (err) {
console.log('err', err);
})
.on('error', function (err) {
console.log('err', err);
})
.pipe(gulp.dest(taskConfig.dest))
.on('error', function (err) {
console.log('err', err);
})
.on('end', function () {
if (typeof done === 'function') {
done();
Expand All @@ -30,19 +37,21 @@ function HeaderTasks(gulp, plugins, config, taskUtils) {
// Normalize the pkg, in case that some information is missing in the project's package.json file
let pkgNormalized = {
name: _.get(config.pkg, 'name', '<name>'),
description: _.get(config.pkg, 'description', '<description>'),
version: _.get(config.pkg, 'version', '<version>'),
description: _.get(config.pkg, 'description', '<description>'),
link: _.get(config.pkg, 'homepage', _.get(config.pkg, 'repository.url', '')),
author: _.get(config.pkg, 'author.name', _.get(config.pkg, 'author', '')),
author: _.get(config.pkg, 'author', _.get(config.pkg, 'author.name', '')),
license: _.get(config.pkg, 'license', 'unknown')
};

// console.log('pkgNormalized', pkgNormalized);

let tmpl = [
'/*!\n',
'* <%= pkg.name %> - <%= pkg.description %>',
'* --',
'* @version v<%= pkg.version %>',
'* @link <%= pkg.link',
'* @link <%= pkg.link %>',
'* @author <%= pkg.author %>',
'* @license <%= pkg.license %>',
'*/'].join('\n');
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "sense-go",
"version": "0.14.6",
"version": "0.14.7",
"description": "Validate, package and deploy your Qlik Sense Visualization Extension projects with ease.",
"keywords": [
"deployment",
Expand Down

0 comments on commit f1a94b2

Please sign in to comment.