Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
fengmk2 committed Jun 5, 2017
0 parents commit 73d7a31
Show file tree
Hide file tree
Showing 10 changed files with 486 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
*.seed
*.log
*.csv
*.dat
*.out
*.pid
*.gz

node_modules
npm-debug.log

shrinkwrap.yaml
yarn.lock
package-lock.json
8 changes: 8 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
sudo: false
env:
- CC=clang CXX=clang++ npm_config_clang=1 npm_registry=https://registry.npmjs.org
language: node_js
node_js:
- '8'
script:
- 'npm test'
21 changes: 21 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
This software is licensed under the MIT License.

Copyright (c) 2017 cnpm and other contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
84 changes: 84 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@

all: pnpm-benchmark cnpmjs.org ghost

pnpm-benchmark:
# see https://github.com/rstacruz/pnpm#benchmark
@echo "install babel-preset-es2015 browserify chalk debug minimist mkdirp"
@echo ------- npminstall@`npminstall -v` -------
@cd pnpm-benchmark && rm -rf node_modules
@cd pnpm-benchmark && time npminstall
@echo ------- pnpm@`pnpm -v` -------
@cd pnpm-benchmark && rm -rf node_modules shrinkwrap.yaml
@cd pnpm-benchmark && time pnpm i
@echo ------- pnpm@`pnpm -v` with shrinkwrap.yaml -------
@cd pnpm-benchmark && rm -rf node_modules
@cd pnpm-benchmark && time pnpm i
@echo ------- npm@`npm -v` -------
@cd pnpm-benchmark && rm -rf node_modules package-lock.json
@cd pnpm-benchmark && time npm i
@echo ------- npm@`npm -v` with package-lock.json -------
@cd pnpm-benchmark && rm -rf node_modules
@cd pnpm-benchmark && time npm i
@echo ------- yarn@`yarn -v` -------
@cd pnpm-benchmark && rm -rf node_modules yarn.lock
@cd pnpm-benchmark && time yarn
@echo ------- yarn@`yarn -v` with yarn.lock -------
@cd pnpm-benchmark && rm -rf node_modules
@cd pnpm-benchmark && time yarn

cnpmjs.org:
@echo "install cnpmjs.org dependencies"
@echo ------- npminstall@`npminstall -v` -------
@cd cnpmjs.org && rm -rf node_modules ~/.npminstall_tarball
@cd cnpmjs.org && time npminstall
@echo ------- npminstall@`npminstall -v` cache -------
@cd cnpmjs.org && rm -rf node_modules
@cd cnpmjs.org && time npminstall
@echo ------- npminstall@`npminstall -v` --no-cache -------
@cd cnpmjs.org && rm -rf node_modules
@cd cnpmjs.org && time npminstall --no-cache
@echo --------- pnpm@`pnpm -v` -----------
@cd cnpmjs.org && rm -rf node_modules shrinkwrap.yaml
@cd cnpmjs.org && time pnpm install
@echo --------- pnpm@`pnpm -v` with shrinkwrap.yaml -----------
@cd cnpmjs.org && rm -rf node_modules
@cd cnpmjs.org && time pnpm install
@echo ---------- npm@`npm -v` -----------
@cd cnpmjs.org && rm -rf node_modules ~/.npm
@cd cnpmjs.org && time npm install
@echo ---- npm@`npm -v` with cache and package-lock.json ------
@cd cnpmjs.org && rm -rf node_modules
@cd cnpmjs.org && time npm install
@echo --------- yarn@`yarn -v` without yarn.lock -----------
@cd cnpmjs.org && rm -rf node_modules ~/.yarn-cache yarn.lock
@cd cnpmjs.org && time yarn
@echo --------- yarn@`yarn -v` cache and with yarn.lock -----------
@cd cnpmjs.org && rm -rf node_modules
@cd cnpmjs.org && time yarn

ghost:
@echo "install ghost dependencies"
@echo ------- npminstall@`npminstall -v` -------
@cd ghost && rm -rf node_modules ~/.npminstall_tarball
@cd ghost && time npminstall
@echo ------- npminstall@`npminstall -v` with cache -------
@cd ghost && rm -rf node_modules
@cd ghost && time npminstall
@echo ------- npminstall@`npminstall -v` --no-cache -------
@cd ghost && rm -rf node_modules
@cd ghost && time ../../bin/install.js --no-cache
@echo ---------- npm@`npm -v` -----------
@cd ghost && rm -rf node_modules
@npm cache clean
@cd ghost && time npm install
@echo ---- npm@`npm -v` with cache ------
@cd ghost && rm -rf node_modules
@cd ghost && time npm install
@echo --------- pnpm@`pnpm -v` -----------
@cd ghost && rm -rf node_modules shrinkwrap.yaml
@cd ghost && time pnpm install
@echo --------- yarn@`yarn -v` -----------
@cd ghost && rm -rf node_modules
@cd ghost && time yarn

.PHONY: pnpm-benchmark cnpmjs.org ghost
44 changes: 44 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# npminstall benchmark

[![build status][travis-image]][travis-url]

[travis-image]: https://img.shields.io/travis/cnpm/npminstall-benchmark.svg?style=flat-square
[travis-url]: https://travis-ci.org/cnpm/npminstall-benchmark

npminstall vs npm vs pnpm vs yarn

## Versions

installer | version
--- | ---
npminstall | 3.0.0
npm | 5.0.2
pnpm | 0.68.0
yarn | 0.24.5

## Benchmarks

### cnpmjs.org install

cli | real | user | sys
--- | --- | --- | ---


### ghost install

cli | real | user | sys
--- | --- | --- | ---


### pnpm benchmark

see https://github.com/rstacruz/pnpm#benchmark

install `babel-preset-es2015 browserify chalk debug minimist mkdirp`

cli | real | user | sys
--- | --- | --- | ---

## License

[MIT](LICENSE.txt)
99 changes: 99 additions & 0 deletions cnpmjs.org/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
{
"name": "cnpmjs.org",
"version": "2.7.1",
"description": "Private npm registry and web for Enterprise, base on MySQL and Simple Store Service",
"main": "index.js",
"scripts": {
"test": "make jshint && make test",
"start": "./bin/nodejsctl start && cp History.md docs/web/history.md",
"status": "./bin/nodejsctl status",
"stop": "./bin/nodejsctl stop"
},
"bin": {
"cnpmjs.org": "bin/cli.js"
},
"dependencies": {
"agentkeepalive": "~2.0.3",
"bytes": "~2.2.0",
"cfork": "~1.4.0",
"co": "~4.6.0",
"co-defer": "~1.0.0",
"co-gather": "~0.0.1",
"co-sleep": "~0.0.1",
"commander": "~2.6.0",
"copy-to": "~2.0.1",
"debug": "~2.2.0",
"error-formater": "~1.0.3",
"fs-cnpm": "~1.2.0",
"giturl": "^1.0.0",
"graceful": "~1.0.0",
"gravatar": "~1.1.0",
"humanize-ms": "~1.0.1",
"humanize-number": "~0.0.2",
"is-type-of": "~1.0.0",
"kcors": "~1.0.1",
"koa": "~1.1.0",
"koa-limit": "~1.0.2",
"koa-markdown": "~2.0.1",
"koa-middlewares": "~2.1.0",
"koa-mock": "~1.5.0",
"koa-safe-jsonp": "~0.3.0",
"markdown-it": "~3.0.6",
"mime": "~1.3.4",
"mini-logger": "~1.1.0",
"mkdirp": "~0.5.0",
"moment": "~2.11.0",
"mysql": "~2.5.4",
"nodemailer": "~1.3.0",
"semver": "~5.1.0",
"sequelize": "~2.0.1",
"thunkify-wrap": "~1.0.4",
"treekill": "~1.0.0",
"tunnel-agent": "^0.4.0",
"urllib": "~2.7.0",
"utility": "~1.6.0",
"xss": "~0.2.10"
},
"devDependencies": {
"autod": "*",
"chunkstream": "*",
"co-mocha": "*",
"contributors": "*",
"istanbul": "*",
"jshint": "*",
"mm": "*",
"mocha": "*",
"node-dev": "*",
"pedding": "*",
"pg": "~4.4.2",
"pg-hstore": "~2.3.2",
"should": "~7.1.0",
"should-http": "*",
"supertest": "*"
},
"homepage": "https://github.com/cnpm/cnpmjs.org",
"repository": {
"type": "git",
"url": "git://github.com/cnpm/cnpmjs.org.git",
"web": "https://github.com/cnpm/cnpmjs.org"
},
"bugs": {
"url": "https://github.com/cnpm/cnpmjs.org/issues",
"email": "[email protected]"
},
"keywords": [
"cnpmjs.org",
"npm",
"npmjs",
"npmjs.org",
"registry"
],
"engines": {
"node": ">= 2.0.0"
},
"author": [
"fengmk2 <[email protected]> (http://fengmk2.com)",
"dead_horse <[email protected]> (http://deadhorse.me)"
],
"license": "MIT"
}
Loading

0 comments on commit 73d7a31

Please sign in to comment.