Browse Source

Update comment banner

pull/1243/head
jlukic 10 years ago
parent
commit
b503b987ca
4 changed files with 20 additions and 20 deletions
  1. 4
      gulpfile.js
  2. 6
      tasks/banner.js
  3. 10
      tasks/defaults.js
  4. 20
      tasks/gulp-settings.js

4
gulpfile.js

@ -229,6 +229,7 @@ gulp.task('watch', 'Watch for site/theme changes (Default Task)', function(callb
compressedStream = stream.pipe(clone());
uncompressedStream
.pipe(plumber())
.pipe(replace(assetPaths.source, assetPaths.uncompressed))
//.pipe(sourcemaps.write('/', settings.sourcemap))
.pipe(header(banner, settings.header))
@ -240,6 +241,7 @@ gulp.task('watch', 'Watch for site/theme changes (Default Task)', function(callb
;
compressedStream = stream
.pipe(plumber())
.pipe(clone())
.pipe(replace(assetPaths.source, assetPaths.compressed))
.pipe(minifyCSS(settings.minify))
@ -508,6 +510,7 @@ gulp.task('install', 'Set-up project for first time', function () {
console.info('Adjusting @siteFolder', sitePathReplace);
if(themeConfigExists) {
gulp.src(config.files.site)
.pipe(plumber())
.pipe(replace(siteVariable, sitePathReplace))
.pipe(gulp.dest(config.folders.theme))
;
@ -515,6 +518,7 @@ gulp.task('install', 'Set-up project for first time', function () {
else {
console.info('Creating src/theme.config (LESS config)');
gulp.src(config.templates.theme)
.pipe(plumber())
.pipe(rename({ extname : '' }))
.pipe(replace(siteVariable, sitePathReplace))
.pipe(gulp.dest(config.folders.theme))

6
tasks/banner.js

@ -1,8 +1,8 @@
module.exports = ''
+ ' /*' + '\n'
+ ' * # <%= package.title %>' + '\n'
+ ' * <%= package.repository.url %>' + '\n'
+ ' *' + '\n'
+ ' * # <%= title %>' + '\n'
+ ' * <%= repository %>' + '\n'
+ ' * <%= url %>' + '\n'
+ ' *' + '\n'
+ ' * Copyright 2014 Contributors' + '\n'
+ ' * Released under the MIT license' + '\n'

10
tasks/defaults.js

@ -3,15 +3,19 @@
*******************************/
module.exports = {
base : '',
base : '',
theme : './src/theme.config',
theme : './src/theme.config',
docs : {
docs : {
source : '../docs/server/files/release/',
output : '../docs/release/'
},
title : 'Semantic UI',
repository : 'https://github.com/Semantic-Org/Semantic-UI',
url : 'http://beta.semantic-ui.com/',
// files cleaned after install
setupFiles: [
'./src/theme.config.example',

20
tasks/gulp-settings.js

@ -1,19 +1,9 @@
var
path = require('path'),
fs = require('fs'),
package
path = require('path'),
fs = require('fs'),
defaults = require('./defaults')
;
try {
package = require('../package.json')
}
catch(error) {
// fallback
package = {
title : 'Semantic UI',
url : 'git://github.com/Semantic-Org/Semantic-UI.git'
}
}
module.exports = {
del: {
@ -38,7 +28,9 @@ module.exports = {
]
},
header: {
package: package
title : defaults.title,
repository : defaults.repository,
url : defaults.url
},
sourcemap: {
includeContent : true,

Loading…
Cancel
Save