Skip to content

Commit 4ec271b

Browse files
committed
changed: banner locations
1 parent 06a0179 commit 4ec271b

File tree

5 files changed

+14
-13
lines changed

5 files changed

+14
-13
lines changed

config.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ const errorHandler = err => {
2020

2121
// -- Validate Path
2222

23-
const bannerProject = path.join(cli.cwd, 'banner.txt');
2423
const confProject = require(path.join(cli.cwd, 'config'));
2524
const dataProject = require(path.join(cli.cwd, 'package.json'));
2625

@@ -45,7 +44,6 @@ module.exports = {
4544
//
4645

4746
project: {
48-
banner: bannerProject,
4947
data: dataProject,
5048
dir: cli.cwd,
5149
...confProject,

start/banner.txt

Lines changed: 0 additions & 5 deletions
This file was deleted.

start/config.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,18 @@ module.exports = {
2424
},
2525
},
2626

27+
//
28+
// Banner Template | Append of banner in script js or css
29+
//
30+
31+
banner: ['/**',
32+
' * <%= data.title %> v<%= data.version %> <%= "("+data.homepage+")" %>',
33+
' * Copyright ' + (new Date()).getFullYear() + ' <%= data.author.name %>',
34+
' * Licensed under <%= data.license %>',
35+
' */',
36+
''
37+
].join('\n'),
38+
2739
//
2840
// Language Direction
2941
//

tasks/sass.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,7 @@ gulp.task('sass-compile', (done) => {
5555
if (!config.settings.sass) return done();
5656

5757
const banner = {
58-
text: stripIndent(
59-
fs.readFileSync(sassOpts.compile.banner.text, 'utf8').trim()
60-
) + '\n\n',
58+
text: sassOpts.compile.banner.text,
6159
data: sassOpts.compile.banner.data
6260
};
6361

tasks/script.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,7 @@ gulp.task('script-compile', (done) => {
7272
}
7373

7474
const banner = {
75-
text: stripIndent(
76-
fs.readFileSync(jsOpts.compile.banner.text, 'utf8').trim()
77-
) + '\n\n',
75+
text: jsOpts.compile.banner.text,
7876
data: jsOpts.compile.banner.data
7977
};
8078

0 commit comments

Comments
 (0)