Skip to content

Instantly share code, notes, and snippets.

View abhiesa's full-sized avatar

Abhishek Prashant Pandey abhiesa

View GitHub Profile
@abhiesa
abhiesa / app.js
Last active August 29, 2015 14:26 — forked from mscharley/app.js
RequireJS with Zurb Foundation 5
/*
This assumes that your bower_components folder is /assets. I renamed it in .bower.json for sanities sake.
I use baseUrl = '/js' as this is where all my custom javascript is and requirejs can't navigate
bower's folder structure anyway.
*/
requirejs.config({
paths: {
@abhiesa
abhiesa / gist:7afff4551ba881655e83
Last active August 29, 2015 14:26 — forked from radiosilence/gist:4040553
RequireJS with Zurb Foundation
requirejs.config({
shim: {
'foundation/jquery.foundation.topbar': {
deps: ['jquery'],
},
'foundation/jquery.cookie': {
deps: ['jquery']
},
'foundation/jquery.event.move': {
deps: ['jquery']
@abhiesa
abhiesa / pom.xml
Last active August 29, 2015 14:16 — forked from gordonad/pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.gordondickens.sample</groupId>
<artifactId>sample-parent</artifactId>
<version>1.0.0</version>
<packaging>pom</packaging>

Ubuntu 12.10 setup (rbenv/rvm, janus, postgres)

Basic pre-requisites

  • Some utilities:
sudo apt-get install vim tmux git
  • Copy/paste from the command line:

I'm having trouble understanding the benefit of require.js. Can you help me out? I imagine other developers have a similar interest.

From Require.js - Why AMD:

The AMD format comes from wanting a module format that was better than today's "write a bunch of script tags with implicit dependencies that you have to manually order"

I don't quite understand why this methodology is so bad. The difficult part is that you have to manually order dependencies. But the benefit is that you don't have an additional layer of abstraction.