setting up gulp and sass in the member db
authorAnthony Talarico <talarico@gaslightmedia.com>
Fri, 23 Sep 2016 14:16:27 +0000 (10:16 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Fri, 23 Sep 2016 14:16:27 +0000 (10:16 -0400)
.gitignore
css/glm-grid.css [new file with mode: 0644]
css/glm-grid.css.map [new file with mode: 0644]
gulpfile.js [new file with mode: 0644]
package.json [new file with mode: 0644]
scss/_glm-grid.scss [new file with mode: 0644]
scss/_settings.scss [new file with mode: 0644]
scss/app.scss [new file with mode: 0644]

index 2b59d87..53f75f1 100644 (file)
@@ -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 (file)
index 0000000..7466a85
--- /dev/null
@@ -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 (file)
index 0000000..5cd2645
--- /dev/null
@@ -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 (file)
index 0000000..d1ca260
--- /dev/null
@@ -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 (file)
index 0000000..d2e80ab
--- /dev/null
@@ -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 (file)
index 0000000..e69de29
diff --git a/scss/_settings.scss b/scss/_settings.scss
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/scss/app.scss b/scss/app.scss
new file mode 100644 (file)
index 0000000..95c71f3
--- /dev/null
@@ -0,0 +1,2 @@
+@import 'glm-grid';
+@import 'settings';
\ No newline at end of file