diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..da7f172 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +.idea/ +node_modules/ +js-dist/ +*.pyc +db.sqlite3 \ No newline at end of file diff --git a/conext/__init__.pyc b/conext/__init__.pyc deleted file mode 100644 index 6ee9625..0000000 Binary files a/conext/__init__.pyc and /dev/null differ diff --git a/conext/receivers.pyc b/conext/receivers.pyc deleted file mode 100644 index e538551..0000000 Binary files a/conext/receivers.pyc and /dev/null differ diff --git a/conext/settings.pyc b/conext/settings.pyc deleted file mode 100644 index 21663f9..0000000 Binary files a/conext/settings.pyc and /dev/null differ diff --git a/conext/startup.pyc b/conext/startup.pyc deleted file mode 100644 index abb700f..0000000 Binary files a/conext/startup.pyc and /dev/null differ diff --git a/conext/static/Gruntfile.js b/conext/static/Gruntfile.js new file mode 100644 index 0000000..d09d250 --- /dev/null +++ b/conext/static/Gruntfile.js @@ -0,0 +1,35 @@ +module.exports = function (grunt) { + + grunt.initConfig({ + pkg: grunt.file.readJSON('package.json'), + clean: { + build: { + src: ['js-dist'] + } + }, + copy: { + main: { + src: 'js/lib/*', + dest: 'js-dist/lib/' + } + }, + uglify: { + options: { + banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n' + }, + build: { + src: 'js/app/**/*.js', + dest: 'js-dist/app/<%= pkg.name %>_<%= pkg.version %>.js' + } + } + }); + + // load task plugins + grunt.loadNpmTasks('grunt-contrib-clean'); + grunt.loadNpmTasks('grunt-contrib-copy'); + grunt.loadNpmTasks('grunt-contrib-uglify'); + + // exec task +// grunt.registerTask('default', ['clean']); + grunt.registerTask('default', ['clean', 'copy', 'uglify']); +} \ No newline at end of file diff --git a/conext/static/grunt-install.txt b/conext/static/grunt-install.txt new file mode 100644 index 0000000..197551f --- /dev/null +++ b/conext/static/grunt-install.txt @@ -0,0 +1,21 @@ +for mac +========================= +1. 文件 packeage.json, Gruntfile.js + +2. 安装 + #安装node + brew install node + node -v + npm -v + + #安装cli + npm install -g grunt-cli + npm install -g grunt + grunt --version + + + #安装package.json中依赖模块 + npm install + +3. build + grunt default \ No newline at end of file diff --git a/conext/static/js/app/lib.js b/conext/static/js/app/lib.js index 80ecea8..21ab170 100644 --- a/conext/static/js/app/lib.js +++ b/conext/static/js/app/lib.js @@ -1,5 +1,4 @@ define(['jquery','bootstrap'], function ($) { - debugger; alert("right"); - } + }); diff --git a/conext/static/package.json b/conext/static/package.json new file mode 100644 index 0000000..55f41f8 --- /dev/null +++ b/conext/static/package.json @@ -0,0 +1,13 @@ +{ + "name": "context", + "version": "0.0.1", + "devDependencies": { + "grunt": "^0.4.5", + "grunt-contrib-jshint": "~0.6.0", + "grunt-contrib-nodeunit": "~0.2.0", + "grunt-contrib-uglify": "~0.2.2", + "grunt-contrib-copy": "~0.4.0", + "grunt-contrib-clean": "~0.4.0" + + } +} diff --git a/conext/urls.pyc b/conext/urls.pyc deleted file mode 100644 index e01e2a8..0000000 Binary files a/conext/urls.pyc and /dev/null differ diff --git a/conext/views.pyc b/conext/views.pyc deleted file mode 100644 index 6b6c41e..0000000 Binary files a/conext/views.pyc and /dev/null differ diff --git a/conext/wsgi.pyc b/conext/wsgi.pyc deleted file mode 100644 index 300a2a8..0000000 Binary files a/conext/wsgi.pyc and /dev/null differ diff --git a/qa/__init__.pyc b/qa/__init__.pyc deleted file mode 100644 index d74cbfb..0000000 Binary files a/qa/__init__.pyc and /dev/null differ diff --git a/qa/admin.pyc b/qa/admin.pyc deleted file mode 100644 index 5094778..0000000 Binary files a/qa/admin.pyc and /dev/null differ diff --git a/qa/api.pyc b/qa/api.pyc deleted file mode 100644 index aec8df6..0000000 Binary files a/qa/api.pyc and /dev/null differ diff --git a/qa/models.pyc b/qa/models.pyc deleted file mode 100644 index dfebe06..0000000 Binary files a/qa/models.pyc and /dev/null differ