From b68f53c0b00d0942fb7e6f777d90f6c99170958d Mon Sep 17 00:00:00 2001 From: Bachir Soussi Chiadmi Date: Sun, 26 Mar 2017 12:39:37 +0200 Subject: [PATCH] moved scripts to bin/, added gulp tasks --- assets/css/styles.scss | 4 ++-- build.py => bin/build.py | 0 install.sh => bin/install.sh | 0 bin/oeuvres-gen.py | 0 sync.sh => bin/sync.sh | 4 ++-- gulpfile.js | 25 +++++++++++++++++++++++++ package.json | 22 ++++++++++++++++++++++ 7 files changed, 51 insertions(+), 4 deletions(-) rename build.py => bin/build.py (100%) rename install.sh => bin/install.sh (100%) create mode 100755 bin/oeuvres-gen.py rename sync.sh => bin/sync.sh (93%) create mode 100644 gulpfile.js create mode 100644 package.json diff --git a/assets/css/styles.scss b/assets/css/styles.scss index 05fdf79..a36457d 100644 --- a/assets/css/styles.scss +++ b/assets/css/styles.scss @@ -1,4 +1,4 @@ -@import "scss/setup.scss"; +@import "setup.scss"; /** * Computation @@ -242,4 +242,4 @@ p { } } -@import "scss/custom.scss"; +@import "custom.scss"; diff --git a/build.py b/bin/build.py similarity index 100% rename from build.py rename to bin/build.py diff --git a/install.sh b/bin/install.sh similarity index 100% rename from install.sh rename to bin/install.sh diff --git a/bin/oeuvres-gen.py b/bin/oeuvres-gen.py new file mode 100755 index 0000000..e69de29 diff --git a/sync.sh b/bin/sync.sh similarity index 93% rename from sync.sh rename to bin/sync.sh index 3e0b657..bf47760 100755 --- a/sync.sh +++ b/bin/sync.sh @@ -24,11 +24,11 @@ do if [ -d $folder/$repo.git ]; then # if repos exists, pull - echo 'Pull $repo' + echo "Pull $repo" git -C $folder/$repo.git pull origin master else # if repos does not exists, clone - echo 'clone $repo' + echo "clone $repo" git clone $host/$repo.git $folder/$repo.git fi done diff --git a/gulpfile.js b/gulpfile.js new file mode 100644 index 0000000..5fa5f1d --- /dev/null +++ b/gulpfile.js @@ -0,0 +1,25 @@ +'use strict'; + +var gulp = require('gulp'); +var wrap = require('gulp-wrap'); +var sass = require('gulp-sass'); +var rename = require('gulp-rename'); +var shell = require('gulp-shell') +var watch = require('gulp-watch'); + +gulp.task('scss', function () { + gulp.src('./assets/css/styles.scss') + .pipe(sass().on('error', sass.logError)) + .pipe(wrap('')) + .pipe(gulp.dest('./assets/css/dist')); +}); + +gulp.task('build', shell.task([ + './bin/build.py' +])); + +// default gulp task +gulp.task('default', ['scss'], function() { + gulp.watch('./assets/css/**/*.scss', ['scss']); + gulp.watch(['bin/build.py', './assets/css/**/*.scss', './assets/js/**/*.js', './templates/*.tpl.html'], ['build']); +}); diff --git a/package.json b/package.json new file mode 100644 index 0000000..72d086c --- /dev/null +++ b/package.json @@ -0,0 +1,22 @@ +{ + "name": "TDSM", + "version": "1.0.0", + "description": "html2print TDSM", + "main": "gulpfile.js", + "repository": { + "type": "git", + "url": "" + }, + "author": "Bachir Soussi Chiadmi", + "license": "MIT", + "homepage": "", + "devDependencies": { + "gulp": "", + "gulp-rename": "^1.2.2", + "gulp-sass": "^2.0.1", + "gulp-shell": "^0.5.2", + "gulp-watch": "^4.2.4", + "gulp-wrap": "^0.11.0" + }, + "dependencies": {} +}