This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import deasync from 'deasync'; | |
import sharp from 'sharp'; | |
sharp.prototype.toBufferSync = function(options) { | |
let done = false; | |
let returnValue; | |
this.toBuffer(options, (err, data, info) => { | |
if (err) throw err; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Disclaimer: The instructions are the collective efforts from a few places online. | |
Nothing here is my original. But I want to put them together in one place to save people from spending the same time as I did. | |
First off, bundle. | |
================== | |
1. cd to the project directory | |
2. Start the react-native packager if not started | |
3. Download the bundle to the asset folder: | |
curl "http://localhost:8081/index.android.bundle?platform=android" -o "android/app/src/main/assets/index.android.bundle" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "Building Grunt Project."; | |
grunt build; | |
echo "change path to $HOME/dev/hfAppV01"; | |
cd $HOME/dev/hfAppV01; | |
echo "Deleting files in ./www"; | |
rm -rf ./www/*; | |
echo "Copying files from ../hffinal/static/dist/ to ./www"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
/* | |
HOW TO USE: | |
------------------------------------------------------------------------- | |
DIRECTIVE (A): | |
<div hf-loading-spinner="loading" loading-type="{{ loadingType }}" [options="{ "lines": "20" }"]> | |
// insert content to display after loading is done | |
</div> | |
--------- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "Building Grunt Project."; | |
cd ./yeoman/; | |
grunt build; | |
cd ../; | |
echo "Deleting files in ./www"; | |
rm -rf ./www/*; | |
echo "Copying files from ./yeoman/dist to ./www"; | |
cp -r ./yeoman/dist/* ./www/; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@hf.module "Components.Loading", (Loading, App, Backbone, Marionette, $, _) -> | |
class Loading.LoadingView extends App.Views.ItemView | |
template: "#loadingView" | |
className: "loading-container" | |
tagName: "div" | |
onRender: -> | |
opts = @_getOptions() | |
@$el.spin opts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@hf.module "Components.Loading", (Loading, App, Backbone, Marionette, $, _) -> | |
class Loading.LoadingController extends App.Controllers.Base | |
initialize: (options) -> | |
{ view, config } = options | |
config = if _.isBoolean(config) then {} else config | |
_.defaults config, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@hf.module "Home.Page", (Page, App, Backbone, Marionette, $, _) -> | |
class Page.Layout extends App.Views.Layout | |
template: '#home_page_layout' | |
# regions: | |
# loginRegion: "#loginRegion" | |
# registrationRegion: "#registrationRegion" | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@hf.module "Home.Page", (Page, App, Backbone, Marionette, $, _) -> | |
class Page.Controller extends App.Controllers.Base | |
initialize: (options = {}) -> | |
{ } = options | |
@layout = new Page.Layout |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@hf.module "Home", (Home, App, Backbone, Marionette, $, _) -> | |
@startWithParent = false | |
class Home.Router extends Marionette.AppRouter | |
appRoutes: | |
"home" : "page" | |
API = |
NewerOlder