Skip to content

Commit

Permalink
added applicaiton.js example, index.html page, updated read me
Browse files Browse the repository at this point in the history
  • Loading branch information
j1n6 committed Jun 5, 2012
1 parent 9cd5eb9 commit 3bfda93
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .gitignore
@@ -1 +1,2 @@
.DS_Store
.DS_Store
build
13 changes: 11 additions & 2 deletions README.md
@@ -1,2 +1,11 @@
amd-js-copycat
==============
# AMD JS Copycat

If you prefer to develop JavaScript with AMD module, this repository helps you to setup the project and create initial file structures.

## When should I use this?
* I only write pure javascript without template and css files
* I want to write in a modular way
* I want to use AMD
* I want the final JavaScript to be loaded on a site that may or may not have requireJS available
* I want the final JavaScript is requirable

8 changes: 8 additions & 0 deletions app/application.js
@@ -0,0 +1,8 @@
define([
], function(){
var initialize = function(){
alert("the application has been loaded!");
}

initialize();
});
9 changes: 9 additions & 0 deletions public/index.html
@@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<title>Application</title>
<script data-main="../config/development_profile" src="../lib/requirejs/require.js"></script>
</head>
<body>
</body>
</html>

0 comments on commit 3bfda93

Please sign in to comment.