Skip to content

Commit

Permalink
fix: do not create empty license file (#78)
Browse files Browse the repository at this point in the history
* fix: do not create empty license file

* pretty
  • Loading branch information
alexander-fenster committed Oct 28, 2019
1 parent 1ff3617 commit 908dd14
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{% macro license() %}// Copyright 2019 Google LLC
{% macro license() -%}
// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -15,4 +16,4 @@
// ** This file is automatically generated by gapic-generator-typescript. **
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **
{% endmacro %}
{% endmacro %}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{% import "./license.njk" as license %}{{license.license()}}
{% import "../../_license.njk" as license -%}
{{license.license()}}
import * as gax from 'google-gax';
import * as path from 'path';

Expand Down
3 changes: 2 additions & 1 deletion templates/typescript_gapic/src/$version/index.ts.njk
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{% import "./license.njk" as license %}{{license.license()}}
{% import "../../_license.njk" as license -%}
{{license.license()}}
{% for service in api.services -%}
export {{ '{' + service.name.toPascalCase() + 'Client}' }} from './{{ service.name.toSnakeCase() }}_client';
{%- endfor %}
3 changes: 2 additions & 1 deletion templates/typescript_gapic/src/index.ts.njk
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{% import "././$version/license.njk" as license %}{{license.license()}}
{% import "../_license.njk" as license -%}
{{license.license()}}
import * as {{ api.naming.version }} from './{{ api.naming.version }}';
export {{ '{' + api.naming.version + '}' }};
{% for service in api.services -%}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{% import "../src/$version/license.njk" as license %}{{license.license()}}
{% import "../_license.njk" as license -%}
{{license.license()}}
'use strict';

const assert = require('assert');
Expand Down
Empty file.
Empty file.
Empty file.

0 comments on commit 908dd14

Please sign in to comment.