From: Anthony Talarico Date: Fri, 23 Sep 2016 14:16:27 +0000 (-0400) Subject: setting up gulp and sass in the member db X-Git-Tag: v2.7.0^2~17^2~12^2~3 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=257a8ede40ce38b0f3d9b400dc2b6b067b3ad801;p=WP-Plugins%2Fglm-member-db.git setting up gulp and sass in the member db --- diff --git a/.gitignore b/.gitignore index 2b59d87e..53f75f14 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ misc/smarty/** media/images/** .project +node_modules diff --git a/css/glm-grid.css b/css/glm-grid.css new file mode 100644 index 00000000..7466a853 --- /dev/null +++ b/css/glm-grid.css @@ -0,0 +1,2 @@ + +/*# sourceMappingURL=glm-grid.css.map */ diff --git a/css/glm-grid.css.map b/css/glm-grid.css.map new file mode 100644 index 00000000..5cd26453 --- /dev/null +++ b/css/glm-grid.css.map @@ -0,0 +1 @@ +{"version":3,"file":"glm-grid.css","sources":["app.scss","_glm-grid.scss","_settings.scss"],"sourcesContent":["@import 'glm-grid';\n@import 'settings';","",""],"mappings":"","names":[],"sourceRoot":"/source/"} \ No newline at end of file diff --git a/gulpfile.js b/gulpfile.js new file mode 100644 index 00000000..d1ca2606 --- /dev/null +++ b/gulpfile.js @@ -0,0 +1,43 @@ +var gulp = require('gulp'); +var rename = require('gulp-rename'); +var sass = require('gulp-sass'); +var maps = require('gulp-sourcemaps'); + +function swallowError (error) { + + // If you want details of the error in the console + console.log(error.toString()) + + this.emit('end') +} + +function swallowError (error) { + + // If you want details of the error in the console + console.log(error.toString()); + + this.emit('end'); +} + +gulp.task('sass', function() { + return gulp.src('scss/app.scss') + .pipe(maps.init()) + .on('error', swallowError) + .pipe(sass({ + outputStyle: 'compressed' + })).on('error', swallowError) + .pipe(rename('glm-grid.css')) + .pipe(maps.write('.')) + .pipe(gulp.dest('css')); +}); + +gulp.task('watch', function () { + gulp.watch('scss/**/*.{scss,sass}', ['sass']); + gulp.watch('gulpfile.js'); +}); + +gulp.task('build', ["sass"]); + +gulp.task('runwatch', ["sass"]); + +gulp.task('default', ["runwatch","watch"]); \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 00000000..d2e80abb --- /dev/null +++ b/package.json @@ -0,0 +1,21 @@ +{ + "name": "glm-member-db", + "version": "0.0.0", + "description": "=== Gaslight Media Member Database === Contributors: cscott@gaslightmedia.com Donate link: http://www.gaslightmedia.com Tags: Gaslight Media,Plugin,Members Requires at least: 3.0.1 Tested up to: 3.4 Stable tag: 4.3 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git@cvs2:WP-Plugins/glm-member-db.git" + }, + "author": "", + "license": "ISC", + "dependencies": { + "gulp": "~3.9.1", + "gulp-sass": "~2.3.2", + "gulp-rename": "~1.2.2", + "gulp-sourcemaps": "~1.6.0" + } +} diff --git a/scss/_glm-grid.scss b/scss/_glm-grid.scss new file mode 100644 index 00000000..e69de29b diff --git a/scss/_settings.scss b/scss/_settings.scss new file mode 100644 index 00000000..e69de29b diff --git a/scss/app.scss b/scss/app.scss new file mode 100644 index 00000000..95c71f3d --- /dev/null +++ b/scss/app.scss @@ -0,0 +1,2 @@ +@import 'glm-grid'; +@import 'settings'; \ No newline at end of file