diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0731fc4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,12 @@ +*.DS_Store +*~ + +*.orig +*.swp + +node_modules/ +bower_components/ + + +assets/js/config.js +public/js/config.min.js diff --git a/Gruntfile.js b/Gruntfile.js index a5ed8d2..3b51217 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -51,7 +51,7 @@ module.exports = function(grunt) { files: [{ expand: true, cwd: "assets/js", - src: "*.js", + src: ["*.js", "!*.sample.js"], dest: "public/js", ext: ".min.js" }] diff --git a/README.md b/README.md index c0caa21..4eb580d 100644 --- a/README.md +++ b/README.md @@ -24,8 +24,10 @@ ANNO是一个开源的应用,目前基本支持了豆瓣的 OAuth2 读书笔 * `npm install` 安装 Grunt 等依赖 * `bower install` 安装前端使用的库文件(如果不需要使用到新的库文件,这一步和下一步可以忽略) -* 将`bower_components/`中所需文件移到 `assets/lib/`中 -* 开发时`grunt watch`,`assets/`下的文件编译、压缩到`public/`中。 +* 将`bower_components/`中所需文件移到 `assets/lib/` 中 +* 申请豆瓣开发者帐号 [http://developers.douban.com/](http://developers.douban.com/) +* 复制一份 `assets/config.sample.js` 到 `assets/config.js` ,填写你的 `api_key` 和 `api_secret` +* 开发时执行 `grunt watch`,将 `assets/` 下的文件编译、压缩到 `public/` 中。 在Chrome扩展中加载项目目录,开启应用调试。