Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Hesh Wanigasooriya heshanlk

🏠
Working from home
View GitHub Profile
@heshanlk
heshanlk / gulpfile.js
Last active Oct 21, 2016
Babel + React Gulpfile
View gulpfile.js
const gulp = require('gulp');
const babel = require('gulp-babel');
const browserify = require('browserify');
const source = require('vinyl-source-stream');
const notify = require('gulp-notify');
gulp.task('default', () => {
return browserify({
entries: 'src/CallerBarApp.js',
extensions: ['.jsx'],
@heshanlk
heshanlk / gulpfile.js
Created Oct 14, 2016 — forked from Sigmus/gulpfile.js
gulpfile.js with browserify, reactify, watchify and gulp-notify.
View gulpfile.js
var source = require('vinyl-source-stream');
var gulp = require('gulp');
var gutil = require('gulp-util');
var browserify = require('browserify');
var reactify = require('reactify');
var watchify = require('watchify');
var notify = require("gulp-notify");
var scriptsDir = './scripts';
var buildDir = './build';
@heshanlk
heshanlk / commerce-coupon-rule.md
Last active Nov 15, 2017
Drupal Commerce Coupon - Limit one coupon per order rule
View commerce-coupon-rule.md

#Drupal Commerce Coupon - Limit one coupon per order rule

{ "rules_no_double_coupons" : {
    "LABEL" : "No double coupons",
    "PLUGIN" : "reaction rule",
    "OWNER" : "rules",
    "REQUIRES" : [ "rules", "commerce_coupon" ],
    "ON" : { "commerce_coupon_applied_to_cart" : [] },
    "IF" : [
      { "entity_has_field" : { "entity" : [ "commerce-order" ], "field" : "commerce_coupons" } },
You can’t perform that action at this time.