couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gar...@apache.org
Subject [17/21] git commit: updated refs/heads/1846-dev-server-improvements to 5da4bbf
Date Mon, 08 Jul 2013 16:00:10 GMT
working with less and css


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/12761a8b
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/12761a8b
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/12761a8b

Branch: refs/heads/1846-dev-server-improvements
Commit: 12761a8bd00214ccf8d7a54c835fc22dbfba92b6
Parents: 804d4fe
Author: Garren Smith <garren.smith@gmail.com>
Authored: Mon Jul 8 14:47:58 2013 +0200
Committer: Garren Smith <garren.smith@gmail.com>
Committed: Mon Jul 8 17:22:49 2013 +0200

----------------------------------------------------------------------
 src/fauxton/Gruntfile.js             | 15 ++++++++-------
 src/fauxton/app/addons/stats/base.js |  2 +-
 src/fauxton/app/config.js            |  8 ++++----
 src/fauxton/couchapp.js              |  2 +-
 src/fauxton/package.json             |  3 +--
 src/fauxton/settings.json.default    |  2 +-
 src/fauxton/tasks/couchserver.js     |  5 ++++-
 src/fauxton/tasks/fauxton.js         |  1 -
 8 files changed, 20 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/12761a8b/src/fauxton/Gruntfile.js
----------------------------------------------------------------------
diff --git a/src/fauxton/Gruntfile.js b/src/fauxton/Gruntfile.js
index 90b37cf..7299ced 100644
--- a/src/fauxton/Gruntfile.js
+++ b/src/fauxton/Gruntfile.js
@@ -84,7 +84,7 @@ module.exports = function(grunt) {
 
   var templateSettings = function(){
     var defaultSettings = {
-      "develpment": {
+      "development": {
         "src": "assets/index.underscore",
         "dest": "dist/debug/index.html",
         "variables": {
@@ -166,7 +166,7 @@ module.exports = function(grunt) {
     // index.html.
     concat: {
       requirejs: {
-        src: [ "dist/debug/templates.js", "assets/js/libs/require.js"],
+        src: [ "assets/js/libs/require.js", "dist/debug/templates.js", "dist/debug/require.js"],
         dest: "dist/debug/js/require.js"
       },
 
@@ -243,6 +243,7 @@ module.exports = function(grunt) {
           // Do not wrap everything in an IIFE.
           wrap: false,
           optimize: "none",
+
           excludeShallow: ['css/css-builder', 'less/lessc-server', 'less/lessc'],
           include: ['css']
         }
@@ -332,7 +333,7 @@ module.exports = function(grunt) {
   // Load the exec task
   grunt.loadNpmTasks('grunt-exec');
   // Load Require.js task
-  grunt.loadNpmTasks('grunt-requirejs');
+  grunt.loadNpmTasks('grunt-contrib-requirejs');
   // Load Copy task
   grunt.loadNpmTasks('grunt-contrib-copy');
   // Load Clean task
@@ -375,11 +376,11 @@ module.exports = function(grunt) {
   grunt.registerTask('dev', ['debugDev', 'couchserver']);
   // build a debug release
   grunt.registerTask('debug', ['test', 'dependencies', 'concat:requirejs','less', 'concat:index_css',
'template:development', 'copy:debug']);
-  grunt.registerTask('debugDev', ['test', 'dependencies', 'less', 'concat:index_css', 'template',
'copy:debug']);
-  //grunt.registerTask('watchRun', ['jshint', 'dependencies', 'less', 'concat:index_css'
]);
+  grunt.registerTask('debugDev', ['test', 'dependencies', 'less', 'concat:index_css', 'template:development',
'copy:debug']);
+
   grunt.registerTask('watchRun', ['jshint', 'dependencies' ]);
   // build a release
-  grunt.registerTask('release', ['test' ,'dependencies', 'build', 'minify', 'copy:dist']);
+  grunt.registerTask('release', ['test' ,'dependencies', 'build', 'copy:dist']);
 
   /*
    * Install into CouchDB in either debug, release, or couchapp mode
@@ -389,7 +390,7 @@ module.exports = function(grunt) {
   // make a minimized install that is server by mochiweb under _utils
   grunt.registerTask('couchdb', ['release', 'copy:couchdb']);
   // make an install that can be deployed as a couchapp
-  grunt.registerTask('couchapp_setup', ['build', 'minify', 'copy:dist']);
+  grunt.registerTask('couchapp_setup', ['release']);
   // install fauxton as couchapp
   grunt.registerTask('couchapp_install', ['rmcouchdb:fauxton', 'mkcouchdb:fauxton', 'couchapp:fauxton']);
   // setup and install fauxton as couchapp

http://git-wip-us.apache.org/repos/asf/couchdb/blob/12761a8b/src/fauxton/app/addons/stats/base.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/stats/base.js b/src/fauxton/app/addons/stats/base.js
index 78e4994..3fcfb48 100644
--- a/src/fauxton/app/addons/stats/base.js
+++ b/src/fauxton/app/addons/stats/base.js
@@ -14,7 +14,7 @@ define([
   "app",
   "api",
   "addons/stats/routes",
-  'less!/app/addons/stats/assets/less/stats'
+  'less!addons/stats/assets/less/stats'
 ],
 
 function(app, FauxtonAPI, Stats) {

http://git-wip-us.apache.org/repos/asf/couchdb/blob/12761a8b/src/fauxton/app/config.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/config.js b/src/fauxton/app/config.js
index 97b8ea2..76075d7 100644
--- a/src/fauxton/app/config.js
+++ b/src/fauxton/app/config.js
@@ -54,12 +54,12 @@ require.config({
 
   /*map: {
     '*': {
-      'css': '../assets/js/plugins/require-css/css'
+    'css': '../assets/js/plugins/require-css/css'
     }
-  },*/
+    },*/
 
   packages: [
-  {
+    {
     name: 'css',
     location: '../assets/js/plugins/require-css',
     main: 'css'
@@ -69,6 +69,6 @@ require.config({
     location: '../assets/js/plugins/require-less',
     main: 'less'
   }
-]
+  ]
 
 });

http://git-wip-us.apache.org/repos/asf/couchdb/blob/12761a8b/src/fauxton/couchapp.js
----------------------------------------------------------------------
diff --git a/src/fauxton/couchapp.js b/src/fauxton/couchapp.js
index 63ea297..4711ae2 100644
--- a/src/fauxton/couchapp.js
+++ b/src/fauxton/couchapp.js
@@ -23,5 +23,5 @@ ddoc = {
 };
 
 
-couchapp.loadAttachments(ddoc, path.join(__dirname, 'dist', 'release'));
+couchapp.loadAttachments(ddoc, path.join(__dirname, 'dist', 'debug'));
 module.exports = ddoc;

http://git-wip-us.apache.org/repos/asf/couchdb/blob/12761a8b/src/fauxton/package.json
----------------------------------------------------------------------
diff --git a/src/fauxton/package.json b/src/fauxton/package.json
index fe34a79..ad69f2f 100644
--- a/src/fauxton/package.json
+++ b/src/fauxton/package.json
@@ -23,14 +23,13 @@
     "grunt-couchapp": "~0.1.0",
     "grunt-exec": "~0.4.0",
     "grunt-init": "~0.2.0",
-    "grunt-requirejs": "~0.3.3",
+    "grunt-contrib-requirejs": "~0.4.1",
     "underscore": "~1.4.2",
     "url": "~0.7.9",
     "urls": "~0.0.3",
     "http-proxy": "~0.10.2",
     "send": "~0.1.1"
   },
-  "devDependencies": {},
   "scripts": {
     "test": "echo \"Error: no test specified\" && exit 1"
   },

http://git-wip-us.apache.org/repos/asf/couchdb/blob/12761a8b/src/fauxton/settings.json.default
----------------------------------------------------------------------
diff --git a/src/fauxton/settings.json.default b/src/fauxton/settings.json.default
index 8fabe09..8e6539e 100644
--- a/src/fauxton/settings.json.default
+++ b/src/fauxton/settings.json.default
@@ -7,7 +7,7 @@
   { "name": "auth" }
   ],
     "template": {
-      "develpment": {
+      "development": {
         "src": "assets/index.underscore",
         "dest": "dist/debug/index.html",
         "variables": {

http://git-wip-us.apache.org/repos/asf/couchdb/blob/12761a8b/src/fauxton/tasks/couchserver.js
----------------------------------------------------------------------
diff --git a/src/fauxton/tasks/couchserver.js b/src/fauxton/tasks/couchserver.js
index f85339c..687ecb4 100644
--- a/src/fauxton/tasks/couchserver.js
+++ b/src/fauxton/tasks/couchserver.js
@@ -46,9 +46,12 @@ module.exports = function (grunt) {
           accept = req.headers.accept.split(','),
           filePath;
 
-      if (!!url.match(/assets/)) {
+      if (!!url.match(/\.less$/)) {
+        filePath = path.join('./app',req.url);
+      } else if (!!url.match(/assets/)) {
         // serve any javascript or css files from here assets dir
         filePath = path.join('./',req.url);
+        console.log('assets', filePath);
       } else if (!!url.match(/\.css$|\/js\/|img/)) {
         // serve any javascript or css files from dist debug dir
         filePath = path.join(dist_dir,req.url);

http://git-wip-us.apache.org/repos/asf/couchdb/blob/12761a8b/src/fauxton/tasks/fauxton.js
----------------------------------------------------------------------
diff --git a/src/fauxton/tasks/fauxton.js b/src/fauxton/tasks/fauxton.js
index c2ec80e..ac48cf3 100644
--- a/src/fauxton/tasks/fauxton.js
+++ b/src/fauxton/tasks/fauxton.js
@@ -22,7 +22,6 @@ module.exports = function(grunt) {
 
   grunt.registerMultiTask('get_deps', 'Fetch external dependencies', function(version) {
     grunt.log.writeln("Fetching external dependencies");
-    console.log('boom', version, arguments);
 
     var path = require('path');
     var done = this.async();


Mime
View raw message