Skip to content
Open

ok #12

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
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
.idea
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ node_js:
- "0.6"
notifications:
email:
- xiangnan.zhang@pactera.com
- z@zhangxiangnan.cn
- zhuang.miao@pactera.com

2 changes: 2 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Jarrick Miao (http://www.miaozhuang.net/)
Salior zhang (http://www.zhangxiangnan.cn/)
77 changes: 77 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
module.exports = function(grunt) {
// 配置
grunt.initConfig({
pkg : grunt.file.readJSON('package.json'),
requirejs: {
compile: {
options: {
baseUrl: "public/js",
paths: {
jquery: '../lib/jquery/jquery-1.8.2.min',
bootstrap: '../lib/bootstrap/js/bootstrap',
underscore: '../lib/underscore/underscore',
angular: '../lib/angular/angular',
angularResource: '../lib/angular/angular-resource',
text: '../lib/require/text',
i18n:'../lib/require/i18n',
modernizr:'../lib/modernizr',
html5shiv:'../lib/html5shiv',
mcore:'../lib/mcore.min',
fullscreen:'../lib/fullscreen',
mcustomscrollbar:'../lib/jquery.mCustomScrollbar.concat.min',
detectbrowser:'../lib/detectbrowser'
//res:'../resources/nls/res'

},
shim: {
'angular' : {'exports' : 'angular'},
'angular-resource' : {deps:['angular']},
'bootstrap': {deps:['jquery']},
'mcustomscrollbar':{deps:['jquery']},
'underscore': {exports: '_'},
'detectbrowser':{deps:['modernizr']}
/*,
'res':{exports:'res'}*/

},

optimize:"none",
name: "main",
out: "public/js/main-built.js"

//out: "../public/js/main-built.js"
}
}
},
cssmin: {
compress: {
options: {
banner: '/* NJBLog minified css file */'
},
files: {
'dest/njblog.css': ['public/css/base', 'public/themes/glowsimple/default.css']
}
}
},
concat : {
domop : {
src: 'public/js/*.js',
dest: 'dest/njblog.js'
}
},
uglify : {
options : {
banner : '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n'
},
build : {
src : 'dest/njblog.js',
dest : 'dest/njblog.min.js'
}
}
});
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-requirejs');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.registerTask('default', ['requirejs','cssmin','concat', 'uglify']);
};
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: node app.js
90 changes: 70 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,83 @@
#*NJBlog*多人博客系统# [![Build Status](https://travis-ci.org/mz121star/NJBlog.png?branch=master)](https://travis-ci.org/mz121star/NJBlog)


#*NJBlog* [![Build Status](https://travis-ci.org/mz121star/NJBlog.png?branch=master)](https://travis-ci.org/mz121star/NJBlog)
[项目进度查询](https://trello.com/board/node-js-blog/50dda31c39e3d3341b001433 "项目进度")

----------

*NJBlog*使用Nodejs开发,为Nodejs开发网站的实验性产品
**Project introduction:**

- NJBLog through [Nodejs](http://nodejs.org/ "Nodejs") and [express](http://expressjs.com/) Provide the Restful API.
- Data stored in [Mongodb](http://www.mongodb.org/),Driven by [Mongoose](https://github.com/LearnBoost/mongoose) 。
- Front-End use of the [AngularJs](http://angularjs.org/)。
- NJBlog all javascript files follow AMD standard,by [Requirejs](http://requirejs.org/) loading (The future might consider using [Seajs](http://seajs.org/docs/))。
- NJBlog through [mocha](http://visionmedia.github.com/mocha/) and [jasmine](http://pivotal.github.com/jasmine/) for UT 。
- Style use of the [bootstrap](https://github.com/twitter/bootstrap)。
- NJBlog building by Grunt。

**Checkout and Run:**

> First ,Assume you installed[Mongodb](http://www.mongodb.org/),and [Nodejs](http://nodejs.org/ "Nodejs") in your OS。

**1,clone code**

> `git clone https://github.com/mz121star/NJBlog.git`


**2,install**

> `npm install`


**3,Run app**


> `node app.js`


----

**项目介绍:**

- NJBlog后台采用[Nodejs](http://nodejs.org/ "Nodejs")+[express](http://expressjs.com/)来提供Restful API.
- 数据库采用 [Mongodb](http://www.mongodb.org/),通过[Mongoose](https://github.com/LearnBoost/mongoose)驱动。
- NJBlog前台采用[AngularJs](http://angularjs.org/)进行开发。
- NJBlog目前所有前端JS代码全部采用模块化编写,使用[Requirejs](http://requirejs.org/)驱动(将来可能考虑采用国产[Seajs](http://seajs.org/docs/))。
- NJBlog使用[mocha](http://visionmedia.github.com/mocha/)+[jasmine](http://pivotal.github.com/jasmine/)来编写js单元测试。
- 前端UI使用了[bootstrap](https://github.com/twitter/bootstrap)。
- NJBlog使用强大的grunt对项目进行构建工作。
- NJBlog全部代码托管在GitHub上,使用牛逼的travis-ci进行持续集成(可用来跑单元测试)。
- 项目的demo由appfog和mongohq提供动力。

**获得并运行项目:**

> 首先确保您系统中安装了[Mongodb](http://www.mongodb.org/),和[Nodejs](http://nodejs.org/ "Nodejs"),一起准备完善之后。按照如下操作。

**1,clone代码**

> `git clone https://github.com/mz121star/NJBlog.git`


**2,安装依赖**

> `npm install`


**3,启动程序**


> `node app.js`



**计划具有如下功能**

```
- 支持多人的blog系统

- 有个人积分排名功能

- 可以增删改查blog文章.

- 可以回复blog内容,作者可以设置禁止回复

- 支持RSS订阅

- 支持第三方网站验证登陆,如人人,微博,豆瓣等

- 可以导入站外blog内容(有限制的导入)
```

[项目进度查询](https://trello.com/board/node-js-blog/50dda31c39e3d3341b001433 "项目进度")


**NJBlog目前由两位Node爱好者协同开发!**

```

Copyright (c) 2012 Jarrick,Sailor contributors

Permission is hereby granted, free of charge, to any person obtaining
Expand Down
29 changes: 29 additions & 0 deletions build/build.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
({
baseUrl: "../public/js",
paths: {
jquery: '../lib/jquery/jquery-1.8.2.min',
bootstrap: '../lib/bootstrap/js/bootstrap.mim',
underscore: '../lib/underscore/underscore-min',
angular: '../lib/angular/angular.min',
angularResource: '../lib/angular/angular-resource.min',
text: '../lib/require/text',
i18n:'../lib/require/i18n',
modernizer:'../lib/modernizr',
html5shiv:'../lib/html5shiv',
mcore:'../lib/mcore.min',
fullscreen:'../lib/fullscreen',
sly:'../lib/jquery.sly'
//res:'../resources/nls/res'

},
shim: {
'angular' : {'exports' : 'angular'},
'angular-resource' : {deps:['angular']},
'bootstrap': {deps:['jquery']},
'sly':{deps:['jquery']},
'underscore': {exports: '_'}
},

name: "main",
out: "../public/js/main-built.js"
})
Loading