Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.idea/
node_modules/
js-dist/
*.pyc
db.sqlite3
Binary file removed conext/__init__.pyc
Binary file not shown.
Binary file removed conext/receivers.pyc
Binary file not shown.
Binary file removed conext/settings.pyc
Binary file not shown.
Binary file removed conext/startup.pyc
Binary file not shown.
35 changes: 35 additions & 0 deletions conext/static/Gruntfile.js
Original file line number Diff line number Diff line change
@@ -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']);
}
21 changes: 21 additions & 0 deletions conext/static/grunt-install.txt
Original file line number Diff line number Diff line change
@@ -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
3 changes: 1 addition & 2 deletions conext/static/js/app/lib.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
define(['jquery','bootstrap'], function ($) {
debugger;
alert("right");
}

});
13 changes: 13 additions & 0 deletions conext/static/package.json
Original file line number Diff line number Diff line change
@@ -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"

}
}
Binary file removed conext/urls.pyc
Binary file not shown.
Binary file removed conext/views.pyc
Binary file not shown.
Binary file removed conext/wsgi.pyc
Binary file not shown.
Binary file removed qa/__init__.pyc
Binary file not shown.
Binary file removed qa/admin.pyc
Binary file not shown.
Binary file removed qa/api.pyc
Binary file not shown.
Binary file removed qa/models.pyc
Binary file not shown.