使用 NPM 安装旧版本的 Jasmine

Install old version of Jasmine with NPM

我需要run Jasmine 1.3.1 版的一些单元测试才能通过一些测试
不幸的是,NPM 似乎看不到 2.0.0

之前的版本 例如,这些老歌可以从 gem 获得

NPM 是否能够从 "external" 个 URL 获取版本?

2.0 之前的 jasmine 版本似乎未发布到 npm 注册表:

$ npm info jasmine
npm http request GET https://registry.npmjs.org/jasmine
npm http 200 https://registry.npmjs.org/jasmine

{ name: 'jasmine',
  description: 'Command line jasmine',
  'dist-tags': { latest: '2.1.1' },
  versions: [ '2.0.1', '2.1.0', '2.1.1' ],

当我从 github 查看 jasmine 源代码时,我在 1.3.x 的分支中没有看到 package.json(npm 安装需要):

$ git clone https://github.com/jasmine/jasmine -b 1_3_x $ cd jasmine $ ls -la package.json ls: package.json: No such file or directory

npm 需要 package.json 文件才能安装,因此您不能使用 npm 安装旧版本的 jasmine