Permalink
Browse files

start making tests

  • Loading branch information...
amelon-bflo committed Jun 21, 2012
1 parent 9d7d12e commit f0a92221eae1da89b070061c9d3caf22abb1c1f6
Showing with 110 additions and 2 deletions.
  1. +22 −0 example/app.js
  2. +56 −0 example/public/index.html
  3. +4 −0 example/public/js/a.js
  4. +4 −0 example/public/js/b.js
  5. +3 −2 package.json
  6. +4 −0 test/assets/a.js
  7. +4 −0 test/assets/b.js
  8. +13 −0 test/test.js
View
@@ -0,0 +1,22 @@
+var flatiron = require('flatiron')
+ , app = flatiron.app
+ , AirDrop = require('../air-drop-flatiron')
+ , ecstatic = require('ecstatic')
+ , package = AirDrop('my-pack').require('public/js/a.js', {name: 'a'})
+ .require('public/js/b.js', {name: 'b'})
+ // .package().minimize().cache();
+
+
+app.use(flatiron.plugins.http, {
+ before: [
+ ecstatic(__dirname + '/public')
+ ]
+});
+
+app.use(AirDrop);
+
+
+app.init(function () {
+ app.start(3000);
+ console.log({"starting": "on", "www": "http://localhost:3000"}, "info");
+});
View
@@ -0,0 +1,56 @@
+
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>Bootstrap, from Twitter</title>
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="">
+
+ <!-- Le styles -->
+ <script src="/air-drop/my-pack.js"></script>
+
+ <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
+ <!--[if lt IE 9]>
+ <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
+ <![endif]-->
+
+ <!-- Le fav and touch icons -->
+ <link rel="shortcut icon" href="../assets/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="../assets/ico/apple-touch-icon-114-precomposed.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="../assets/ico/apple-touch-icon-72-precomposed.png">
+ <link rel="apple-touch-icon-precomposed" href="../assets/ico/apple-touch-icon-57-precomposed.png">
+ </head>
+
+ <body>
+
+ <div class="navbar navbar-fixed-top">
+
+ </div>
+
+ <div class="container-fluid main">
+ <div class="row-fluid">
+ <div class="span2">&nbsp;</div>
+ <div class="span8" id="target">
+ <div class="well">
+ <h2>Bienvenue sur b-eden</h2>
+ </div>
+ </div>
+ <div class="span2">&nbsp;</div>
+ </div>
+
+ <hr>
+
+ <footer>
+ <p>&copy; b-flower 2012</p>
+ </footer>
+
+ </div><!--/.fluid-container-->
+
+ <!-- Le javascript
+ ================================================== -->
+ <!-- Placed at the end of the document so the pages load faster -->
+
+ </body>
+</html>
View
@@ -0,0 +1,4 @@
+function a() {
+ console.log("This is A!");
+ return "A";
+}
View
@@ -0,0 +1,4 @@
+function b() {
+ console.log("This is NOT A!");
+ return "B";
+}
View
@@ -9,9 +9,10 @@
, "devDependencies": {
"flatiron": "0.2.x"
- , "director": "1.0.x"
+ , "union": "0.3.x"
, "request": "2.x.x"
- , "vows": ""
+ , "ecstatic": "0.1.x"
+ , "vows": "0.6.x"
}
, "engines": { "node": "0.6.x"}
View
@@ -0,0 +1,4 @@
+function a() {
+ console.log("This is A!");
+ return "A";
+}
View
@@ -0,0 +1,4 @@
+function b() {
+ console.log("This is NOT A!");
+ return "B";
+}
View
@@ -0,0 +1,13 @@
+var AirDrop = require('../air-drop-flatiron')
+ , assert = require('assert')
+ , vows = require('vows')
+ , flatiron = require('flatiron')
+ , app = flatiron.app
+ , package = AirDrop('test').require('assets/a.js', {name: 'a'}).useBrowserRequire(false);
+
+
+app.use(flatiron.plugins.http);
+app.use(AirDrop);
+package.source(function(err, data) {
+ console.log(data);
+})

0 comments on commit f0a9222

Please sign in to comment.