Permalink
Browse files

refine output rules

  • Loading branch information...
1 parent 2928ff5 commit 153b88e6ea39e6e29fd2eb25f837c446ffc30749 @nqdeng committed Jan 8, 2013
Showing with 6 additions and 20 deletions.
  1. +5 −19 lib/action/build.js
  2. +1 −1 package.json
View
@@ -77,29 +77,15 @@ var BASE_TMPL = '/js/6v/biz/%s/sea-modules',
* @return {Object}
*/
output = function (name) {
- var pathname = path.join('local', name),
- customOutput = path.join(pathname, 'output.json'),
- output;
+ var pathname = path.join('local', name, 'output.json');
- if (fs.existsSync(customOutput)) {
- return JSON.parse(fs.readFileSync(customOutput, 'utf8'));
+ if (fs.existsSync(pathname)) {
+ return JSON.parse(fs.readFileSync(pathname, 'utf8'));
} else {
- output = {
+ return {
+ './*.js': '.',
'i18n/*.js': '.'
};
-
- fs.readdirSync(pathname)
- .filter(function (item) {
- item = path.join(pathname, item);
-
- return fs.statSync(item).isFile()
- && path.extname(item) === '.js';
- })
- .forEach(function (item) {
- output[item] = '.';
- });
-
- return output;
}
},
View
@@ -10,7 +10,7 @@
"url": "git://github.com/nqdeng/apm.git"
},
"author": "Nanqiao Deng <nqdeng@gmail.com>",
- "version": "1.0.1",
+ "version": "1.0.2",
"engines": {
"node": "0.8.x"
},

0 comments on commit 153b88e

Please sign in to comment.