0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-30 22:34:10 -05:00

auto-compile package.json on "npm install"

This commit is contained in:
Alex Kocharin 2014-07-26 21:27:10 +04:00
parent 77af6d4c17
commit 854fd796ae
3 changed files with 8 additions and 4 deletions

View file

@ -1,6 +1,6 @@
module.exports = function(grunt) { module.exports = function(grunt) {
grunt.initConfig({ grunt.initConfig({
pkg: grunt.file.readJSON('package.json'), pkg: grunt.file.readYAML('package.yaml'),
browserify: { browserify: {
dist: { dist: {
files: { files: {
@ -36,4 +36,4 @@ module.exports = function(grunt) {
'browserify', 'browserify',
'less' 'less'
]); ]);
}; };

View file

@ -1,5 +1,9 @@
module.exports = require('./lib')
/**package
{ "name": "sinopia", { "name": "sinopia",
"version": "0.0.0", "version": "0.0.0",
"dependencies": {"js-yaml": "*"}, "dependencies": {"js-yaml": "*"},
"scripts": {"postinstall": "js-yaml package.yaml > package.json ; npm install --production ; git update-index --assume-unchanged package.json"} "scripts": {"postinstall": "js-yaml package.yaml > package.json ; npm install"}
} }
**/

View file

@ -73,7 +73,7 @@ keywords:
scripts: scripts:
test: mocha ./test/functional ./test/unit test: mocha ./test/functional ./test/unit
lint: eslint -c ./.eslint.yaml ./lib lint: eslint -c ./.eslint.yaml ./lib
#prepublish: js-yaml package.yaml > package.json prepublish: js-yaml package.yaml > package.json
# we depend on streams2 stuff # we depend on streams2 stuff
# it can be replaced with isaacs/readable-stream, ask if you need to use 0.8 # it can be replaced with isaacs/readable-stream, ask if you need to use 0.8