Skip to content
This repository has been archived by the owner on Aug 15, 2018. It is now read-only.

improve spm install #804

Merged
merged 4 commits into from
May 30, 2014
Merged

improve spm install #804

merged 4 commits into from
May 30, 2014

Conversation

sorrycc
Copy link
Member

@sorrycc sorrycc commented May 29, 2014

  1. install package@stable 时,如果 sea-modules 里存在对应版本号,直接返回 found,而不从 cache 里解压
  2. 基于 stream,减少文件读写

if (err) {
callback(err);
return;
}

var relativePath = path.relative(process.cwd(), dest);
log.info('installed', color.green(relativePath));
var pkg = file.readJSON(path.join(dest, 'package.json'));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

原来是 src 怎么变 dest 了

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

原来的 src 是指 tmp 下的临时 package 路径,改完后没走 tmp 了。

@popomore
Copy link
Member

删了好多代码,清爽了好多

var log = require('./utils/log');
var yuan = require('./sdk/yuan');
var iduri = require('./sdk/iduri');
var file = require('./sdk/file');
var mo = require('./sdk/module');
var gulp = require('gulp');
var gunzip = require('gulp-gunzip');
var untar = require('gulp-untar');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这货有 48 M ,换一个吧。

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gulp-untar 估计把测试文件也发上去了,我这里看 70M+。重新发了个 gulp-untar2 上去,只有 1.5M 了。

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

给他 pr 去—
Sent from Mailbox for iPhone

On Fri, May 30, 2014 at 11:23 AM, chencheng (云谦) notifications@github.com
wrote:

var log = require('./utils/log');
var yuan = require('./sdk/yuan');
var iduri = require('./sdk/iduri');
var file = require('./sdk/file');
var mo = require('./sdk/module');
+var gulp = require('gulp');
+var gunzip = require('gulp-gunzip');
+var untar = require('gulp-untar');

gulp-untar 估计把测试文件也发上去了,我这里看 70M+。重新发了个 gulp-untar2 上去,只有 1.5M 了。

Reply to this email directly or view it on GitHub:
https://github.com/spmjs/spm/pull/804/files#r13215395

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

没法 pr ,源码没问题,publish 的包多了个 out 文件夹,看不明白。已经提了 issue 。

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

问题是他源文件里也没有那个测试文件。。pr 了一个缺失的 dep 依赖,他重新发布应该就好了。
jmerrifield/gulp-untar#1

afc163 added a commit that referenced this pull request May 30, 2014
@afc163 afc163 merged commit ee63b4f into master May 30, 2014
@afc163 afc163 deleted the install-with-stream branch May 30, 2014 08:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants