Run npm install git-push --save-dev
;
Create tools/deploy.js
file with approximately the following content:
import push from 'git-push';
const remote = {
name: 'production',
url: 'http://github.com/user/test.example.com',
/******************************************************************************* | |
1. DEPENDENCIES | |
*******************************************************************************/ | |
var gulp = require('gulp'); // gulp core | |
sass = require('gulp-sass'), // sass compiler | |
uglify = require('gulp-uglify'), // uglifies the js | |
jshint = require('gulp-jshint'), // check if js is ok | |
rename = require("gulp-rename"); // rename files | |
concat = require('gulp-concat'), // concatinate js |
{ | |
"name": "Custom", | |
"version": "0.0.1", | |
"main": "gulpfile.js", | |
"devDependencies": { | |
"gulp-rename": "~1.1.0", | |
"jshint-stylish": "~0.1.5", | |
"gulp-concat": "~2.1.7", | |
"gulp-autoprefixer": "0.0.6", | |
"gulp-minify-css": "~0.3.0", |
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script> |
var selector = 'img' // Replace this with the selector for the element you want to make transformable | |
jQuery.getScript('//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js', function() { | |
jQuery.getScript('//cdnjs.cloudflare.com/ajax/libs/numeric/1.2.6/numeric.min.js', function() { | |
(function() { | |
var $, applyTransform, getTransform, makeTransformable; | |
$ = jQuery; |
Run npm install git-push --save-dev
;
Create tools/deploy.js
file with approximately the following content:
import push from 'git-push';
const remote = {
name: 'production',
url: 'http://github.com/user/test.example.com',
/* globals window, document */ | |
var React = require('react'), | |
Report = require('./components/report.jsx'), | |
mochaTestDataVarName = require('../lib/mocha-test-data-var-name.js'); | |
require('./../node_modules/bootstrap/dist/css/bootstrap.min.css') | |
require('./styles/base.css'); | |
var data = window[mochaTestDataVarName]; |
I went into this expecting a challenge but it was easy. Basically, Couchbase Lite has always had an optional HTTP listener that you can connect to from inside your app at http://lite.couchbase./mydatabase/
. React Native has a fine XHR module and encourages using fetch so getting your app to sync can be as easy as adding some API calls to keep JSON in the database.
We haven't done a full example yet, but in the spirit of possiblity, here are quick instructions to connect Couchbase Lite iOS with a React Native app (generated from their cli).
ios
)return { | |
aliceblue = {0.94117647058824, 0.97254901960784, 1}, | |
antiquewhite = {0.98039215686275, 0.92156862745098, 0.84313725490196}, | |
aqua = {0, 1, 1}, | |
aquamarine = {0.49803921568627, 1, 0.83137254901961}, | |
azure = {0.94117647058824, 1, 1}, | |
beige = {0.96078431372549, 0.96078431372549, 0.86274509803922}, | |
bisque = {1, 0.89411764705882, 0.76862745098039}, | |
black = {0, 0, 0}, | |
blanchedalmond = {1, 0.92156862745098, 0.80392156862745}, |
#!/bin/sh | |
base=$1 | |
convert "$base" -resize '29x29' -unsharp 1x4 "Icon-Small.png" | |
convert "$base" -resize '40x40' -unsharp 1x4 "Icon-Small-40.png" | |
convert "$base" -resize '50x50' -unsharp 1x4 "Icon-Small-50.png" | |
convert "$base" -resize '57x57' -unsharp 1x4 "Icon.png" | |
convert "$base" -resize '58x58' -unsharp 1x4 "[email protected]" | |
convert "$base" -resize '60x60' -unsharp 1x4 "Icon-60.png" | |
convert "$base" -resize '72x72' -unsharp 1x4 "Icon-72.png" | |
convert "$base" -resize '76x76' -unsharp 1x4 "Icon-76.png" |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>JSSample</title> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script> | |
<meta name="viewport" content="user-scalable=yes, initial-scale=0.75, maximum-scale=2, minimum-scale=1, width=device-width, target-densitydpi=device-dpi" /> | |
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self' data: 'unsafe-inline' 'unsafe-eval' https:; object-src 'self'; style-src 'self' 'unsafe-inline' https:; img-src 'self' data: https:; media-src 'self'; frame-src 'self'; font-src 'self' data: https:; connect-src 'self' https: http:" /> | |
<meta http-equiv="X-Content-Security-Policy" content="default-src 'self'; script-src 'self' data: 'unsafe-inline' 'unsafe-eval' https:; object-src 'self'; style-src 'self' 'unsafe-inline' https:; img-src 'self' data: https:; media-src 'self'; frame-src 'self'; font-src 'self' data: https:; connect-src 'self' https:" /> | |
<meta http-equiv="X-WebKit-CSP" content="default-src ' |