Browse Source

Gulping

pull/1191/head
jlukic 10 years ago
parent
commit
bb0d13d250
2 changed files with 49 additions and 52 deletions
  1. 12
      build.json
  2. 89
      gulpfile.js

12
build.json

@ -14,16 +14,6 @@
"packaged" : "dist/packaged/",
"themes" : "dist/themes"
}
},
"browsers" : [
"last 2 version",
"> 1%",
"opera 12.1",
"safari 6",
"ie 9",
"bb 10",
"android 4"
]
}
}

89
gulpfile.js

@ -93,7 +93,7 @@ var
;
// Add base to all paths
// Add base value to all paths
for(var folder in source) {
if(source.hasOwnProperty(folder)) {
source[folder] = base + source[folder];
@ -109,26 +109,7 @@ for(var folder in output) {
Tasks
*******************************/
/*--------------
User
---------------*/
gulp.task('default', 'Defaults task is watch', [
'watch'
]);
// cleans distribution files
gulp.task('clean', 'Clean dist folder', function(callback) {
del([
config.output.compressed,
config.output.minified,
config.output.packaged
], callback);
});
gulp.task('watch', 'Watch source directory for changes', function () {
gulp.task('watch', 'Watch source directory for changes (Default Task)', function () {
gulp.watch([
source.definitions + '**/*.less',
@ -144,13 +125,15 @@ gulp.task('watch', 'Watch source directory for changes', function () {
assets
;
// recompile related definition file
// recompile only definition file
path = util.replaceExtension(file.path, '.less');
path = path.replace(source.themes, source.definitions);
path = path.replace(source.site, source.definitions);
console.log(path);
// find asset path
assetPaths.source = path.relative(output.uncompressed, output.themes);
console.log(assetPaths.source);
if( fs.existsSync(path) ) {
@ -159,8 +142,6 @@ gulp.task('watch', 'Watch source directory for changes', function () {
.pipe(gulp.dest(output.themes))
;
// replace paths
// build less
css = gulp.src(path)
.pipe(plumber())
@ -189,31 +170,57 @@ gulp.task('watch', 'Watch source directory for changes', function () {
});
// Builds all files
gulp.task('build', 'Builds all files from source to dist', function(callback) {
});
// cleans distribution files
gulp.task('clean', 'Clean dist folder', function(callback) {
del([
config.output.compressed,
config.output.minified,
config.output.packaged
], callback);
});
gulp.task('version', 'Displays current version of Semantic', function(callback) {
});
gulp.task('default', false, [
'watch'
]);
/*--------------
Library
Maintainer
---------------*/
/* These tasks are designed for updates to the core library */
/* Bump Version */
gulp.task('bump', false, function () {
// Create RTL Release
// Create Node Release
gulp.task('rtl', 'Create RTL Release', function () {
watch('src/definitions/**/*.js', function (files, callback) {
gulp.start('library module changed', callback);
});
});
gulp.task('watch definitions', function () {
watch('src/definitions/**/*.less', function (files, callback) {
gulp.start('library definition changed', callback);
});
});
// Build release
gulp.task('build release', function () {
/* Release */
gulp.task('release', false, function () {
// Create SCSS Version
// Create RTL Release
// Create Node Release
// Create Bower Releases
// create RTL release
// create bower releases
});

Loading…
Cancel
Save