Commits

Panayiotis Lipiridis committed 49a79fd Merge

Merge

Comments (0)

Files changed (12)

 main/index.yaml
 main/lib.zip
 main/static/dst
+main/static/ext
 main/static/min
-main/static/src/vendor
-main/static/vendor-fonts
 node_modules
 temp/
 main/index.yaml
 main/lib.zip
 main/static/dst
+main/static/ext
 main/static/min
-main/static/src/vendor
-main/static/vendor-fonts
 node_modules
 temp/
-module.exports = (grunt)->
-  path = require('path')
+module.exports = (grunt) ->
+  path = require 'path'
+
   grunt.initConfig
     watch:
       style:
     bower:
       install:
         options:
-          targetDir: 'main/static/src/vendor'
-          cleanTargetDir: true
+          targetDir: 'main/static/ext'
           layout: (type, component) ->
-            if type is 'fonts'
-              path.join '../../vendor-fonts'
+            if type.search('/') > -1
+              path.join type.replace '/', "/#{component}/"
             else
               path.join type, component
 
-    grunt.loadNpmTasks('grunt-contrib-watch')
-    grunt.registerTask('default', ['watch'])
-    grunt.loadNpmTasks('grunt-bower-task')
+    clean:
+      ext: 'main/static/ext'
+
+    grunt.loadNpmTasks 'grunt-bower-task'
+    grunt.loadNpmTasks 'grunt-contrib-clean'
+    grunt.loadNpmTasks 'grunt-contrib-watch'
+    grunt.registerTask 'default', ['watch']
+    grunt.registerTask 'ext', ['clean:ext', 'bower']
 {
   "name": "gae-init",
   "dependencies": {
+    "bootstrap": "~3",
+    "font-awesome": "~4",
     "jquery": "~2",
-    "bootstrap": "~3",
-    "nprogress": "https://github.com/lipis/nprogress.git#master",
     "momentjs": "~2",
-    "font-awesome": "~4"
+    "nprogress": "https://github.com/lipis/nprogress.git#master"
   },
   "exportsOverride": {
+    "bootstrap": {
+      "js": "js/*.js",
+      "less": "less/*.less",
+      "font": "fonts/*"
+    },
+    "font-awesome": {
+      "less": "less/*.less",
+      "font": "fonts/*"
+    },
     "jquery": {
       "js": "dist/jquery.js"
     },
-    "bootstrap": {
-      "js": "js/*.js",
-      "less": "less/*.less",
-      "fonts": "fonts/*"
+    "momentjs": {
+      "js": "*.js"
     },
     "nprogress": {
       "js": "*.js",
       "less": "*.less"
-    },
-    "momentjs": {
-      "js": "*.js"
-    },
-    "font-awesome": {
-      "less": "less/*.less",
-      "fonts": "fonts/*"
     }
   }
 }
 
 """
 
-__version__ = '0.12.0'
+__version__ = '0.13.0'
   script: main.app
 
 skip_files:
+- ^(.*/)?#.*#
+- ^(.*/)?.*/RCS/.*
+- ^(.*/)?.*\.bak$
+- ^(.*/)?.*\.py[co]
+- ^(.*/)?.*~
+- ^(.*/)?Icon\r
+- ^(.*/)?\..*
 - ^(.*/)?app\.yaml
 - ^(.*/)?app\.yml
 - ^(.*/)?index\.yaml
 - ^(.*/)?index\.yml
-- ^(.*/)?#.*#
-- ^(.*/)?.*~
-- ^(.*/)?.*\.py[co]
-- ^(.*/)?.*/RCS/.*
-- ^(.*/)?\..*
-- ^(.*/)?.*\.bak$
-- ^(.*/)?Icon\r
 - ^lib/.*
+- ^static/dst/.*
+- ^static/ext/coffee/.*
+- ^static/ext/css/.*
+- ^static/ext/js/.*
+- ^static/ext/less/.*
 - ^static/src/.*
-- ^static/dst/.*
 
 SCRIPTS = {
     'libs': [
-        'src/vendor/js/jquery/jquery.js',
-        'src/vendor/js/momentjs/moment.js',
-        'src/vendor/js/nprogress/nprogress.js',
-        'src/vendor/js/bootstrap/alert.js',
-        'src/vendor/js/bootstrap/button.js',
-        'src/vendor/js/bootstrap/transition.js',
-        'src/vendor/js/bootstrap/collapse.js',
-        'src/vendor/js/bootstrap/dropdown.js',
-        'src/vendor/js/bootstrap/tooltip.js',
+        'ext/js/jquery/jquery.js',
+        'ext/js/momentjs/moment.js',
+        'ext/js/nprogress/nprogress.js',
+        'ext/js/bootstrap/alert.js',
+        'ext/js/bootstrap/button.js',
+        'ext/js/bootstrap/transition.js',
+        'ext/js/bootstrap/collapse.js',
+        'ext/js/bootstrap/dropdown.js',
+        'ext/js/bootstrap/tooltip.js',
       ],
     'scripts': [
         'src/script/common/service.coffee',

main/static/src/script/site/profile.coffee

 window.init_profile = ->
-  # do something with the admin page here
+  # do something with the profile page here

main/static/src/style/style.less

-@import "../vendor/less/bootstrap/bootstrap";
-@import "../vendor/less/font-awesome/font-awesome";
-@import "../vendor/less/nprogress/nprogress";
+@import "../../ext/less/bootstrap/bootstrap";
+@import "../../ext/less/font-awesome/font-awesome";
+@import "../../ext/less/nprogress/nprogress";
 
 @import "base";
 @import "variables";

main/static/src/style/variables.less

-@fa-font-path:            "/p/vendor-fonts";
-@icon-font-path:          "/p/vendor-fonts/";
+@fa-font-path:            "/p/ext/font/font-awesome";
+@icon-font-path:          "/p/ext/font/bootstrap/";
 
 @footer-height:           (@line-height-computed * 5);
 
 {
   "name": "gae-init",
-  "version": "0.12.0",
+  "version": "0.13.0",
   "author": "Panayiotis Lipiridis <lipiridis@gmail.com>",
   "licenses": [
     {
   "devDependencies": {
     "bower": "~1",
     "grunt": "~0",
-    "grunt-contrib-watch": "~0",
     "grunt-bower-task": "~0",
-    "grunt-cli": "~0"
+    "grunt-cli": "~0",
+    "grunt-contrib-clean": "~0",
+    "grunt-contrib-watch": "~0"
   }
 }
   )
 PARSER.add_argument(
     '-c', '--clean', dest='clean', action='store_true',
-    help='''recompiles files when running the development web server, but
-    obsolete if -s is used''',
+    help='recompiles files when running the development web server',
   )
 PARSER.add_argument(
     '-C', '--clean-all', dest='clean_all', action='store_true',
 
   for dependency in get_dependencies('bower.json'):
     if not os.path.exists(os.path.join(DIR_BOWER_COMPONENTS, dependency)):
-      os.system('"%s" bower' % FILE_GRUNT)
+      os.system('"%s" ext' % FILE_GRUNT)
       break