From f80d10917f87f44e81ac971ff9126477e37f1b40 Mon Sep 17 00:00:00 2001 From: virusdefender <1670873886@qq.com> Date: Sat, 1 Aug 2015 23:16:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20build.js=20=E5=B0=86=20css?= =?UTF-8?q?=20inline=20=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 ++- static/src/css/oj.css | 2 ++ static/src/js/build.js | 15 +++++++++------ template/oj_base.html | 7 +------ 4 files changed, 14 insertions(+), 13 deletions(-) diff --git a/.gitignore b/.gitignore index 1d6c7243..f5020fbb 100644 --- a/.gitignore +++ b/.gitignore @@ -55,4 +55,5 @@ db.db #*.out db.sqlite3 .DS_Store -log/ \ No newline at end of file +log/ +release/ \ No newline at end of file diff --git a/static/src/css/oj.css b/static/src/css/oj.css index 8eb43409..989299ed 100644 --- a/static/src/css/oj.css +++ b/static/src/css/oj.css @@ -1,3 +1,5 @@ +@import url("bootstrap/bootstrap.min.css"); +@import url("bootstrap/todc-bootstrap.min.css"); html, body { height: 100%; } diff --git a/static/src/js/build.js b/static/src/js/build.js index 128e22e8..533a8919 100644 --- a/static/src/js/build.js +++ b/static/src/js/build.js @@ -1,6 +1,6 @@ ({ // RequireJS 通过一个相对的路径 baseUrl来加载所有代码。baseUrl通常被设置成data-main属性指定脚本的同级目录。 - baseUrl: ".", + baseUrl: "js/", // 第三方脚本模块的别名,jquery比libs/jquery-1.11.1.min.js简洁明了; paths: { //百度webuploader @@ -16,7 +16,6 @@ oj: "app/oj", "bs_alert": "utils/bs_alert", - //formValidation 不要在代码中单独使用,而是使用和修改utils/validation base: "lib/formValidation/base", helper: "lib/formValidation/helper", @@ -45,8 +44,12 @@ shim: { "bootstrap": {"deps": ['jquery']} }, - name: "oj", - out: "oj-build.js", - findNestedDependencies: true - //wrapShim: true + findNestedDependencies: true, + appDir: "../", + dir: "../../release/", + modules: [ + { + name: "oj" + } + ] }) \ No newline at end of file diff --git a/template/oj_base.html b/template/oj_base.html index 05ca7a6c..66e760b7 100644 --- a/template/oj_base.html +++ b/template/oj_base.html @@ -8,11 +8,6 @@ 在线评测系统 - - - - - {% block css_block %}{% endblock %} @@ -95,7 +90,7 @@ - +