Remove file dependencies before commit

This commit is contained in:
aurelsicoko 2017-07-17 17:19:35 +02:00
parent 0f9c16940a
commit a8732565c9
25 changed files with 12350 additions and 4927 deletions

4901
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -22,7 +22,8 @@
},
"scripts": {
"test": "make test",
"postinstall": "lerna bootstrap --stream && node ./scripts/setup.js"
"removefiledependencies": "node ./scripts/removefiledependencies.js",
"postinstall": "lerna bootstrap --stream && node ./scripts/setup.js && node ./scripts/removefiledependencies.js"
},
"author": {
"email": "hi@strapi.io",
@ -36,6 +37,10 @@
"url": "http://strapi.io"
}
],
"pre-commit": [
"removefiledependencies",
"test"
],
"repository": {
"type": "git",
"url": "git://github.com/strapi/strapi.git"

View File

@ -44,4 +44,4 @@
"npm": ">= 3.0.0"
},
"license": "MIT"
}
}

View File

@ -29,9 +29,9 @@
"integrity": "sha1-eRQg1/VR7qKJdFOop3ZT+WYG1nw="
},
"bookshelf": {
"version": "0.10.3",
"resolved": "https://registry.npmjs.org/bookshelf/-/bookshelf-0.10.3.tgz",
"integrity": "sha1-clWCBOg4Ffjlu6b9gIcCVj5ys+Q=",
"version": "0.10.4",
"resolved": "https://registry.npmjs.org/bookshelf/-/bookshelf-0.10.4.tgz",
"integrity": "sha1-/gaYRFZ0BBeroT0NdsewZdHxd00=",
"requires": {
"babel-runtime": "6.23.0",
"bluebird": "3.5.0",

View File

@ -19,7 +19,7 @@
"bookshelf": "^0.10.3",
"lodash": "^4.17.4",
"pluralize": "^3.1.0",
"strapi-utils": "file:../strapi-utils"
"strapi-utils": "^3.0.0-alpha.4"
},
"strapi": {
"isHook": true,
@ -54,4 +54,4 @@
"npm": ">= 3.0.0"
},
"license": "MIT"
}
}

View File

@ -46,4 +46,4 @@
"npm": ">= 3.0.0"
},
"license": "MIT"
}
}

View File

@ -41,4 +41,4 @@
"npm": ">= 3.0.0"
},
"license": "MIT"
}
}

View File

@ -43,4 +43,4 @@
"npm": ">= 3.0.0"
},
"license": "MIT"
}
}

View File

@ -43,4 +43,4 @@
"npm": ">= 3.0.0"
},
"license": "MIT"
}
}

View File

@ -53,4 +53,4 @@
"npm": ">= 3.0.0"
},
"license": "MIT"
}
}

View File

@ -43,4 +43,4 @@
"npm": ">= 3.0.0"
},
"license": "MIT"
}
}

View File

@ -45,4 +45,4 @@
"npm": ">= 3.0.0"
},
"license": "MIT"
}
}

View File

@ -44,4 +44,4 @@
"npm": ">= 3.0.0"
},
"license": "MIT"
}
}

View File

@ -43,4 +43,4 @@
"npm": ">= 3.0.0"
},
"license": "MIT"
}
}

View File

@ -43,4 +43,4 @@
"npm": ">= 3.0.0"
},
"license": "MIT"
}
}

View File

@ -46,4 +46,4 @@
"npm": ">= 3.0.0"
},
"license": "MIT"
}
}

File diff suppressed because it is too large Load Diff

View File

@ -121,4 +121,4 @@
"webpack-dev-middleware": "^1.8.4",
"webpack-hot-middleware": "^2.13.1"
}
}
}

View File

@ -50,4 +50,4 @@
"npm": ">= 3.0.0"
},
"license": "MIT"
}
}

View File

@ -20,7 +20,7 @@
"mongoose-double": "0.0.1",
"mongoose-float": "^1.0.2",
"pluralize": "^3.1.0",
"strapi-utils": "file:../strapi-utils"
"strapi-utils": "^3.0.0-alpha.4"
},
"strapi": {
"isHook": true
@ -52,4 +52,4 @@
"npm": ">= 3.0.0"
},
"license": "MIT"
}
}

View File

@ -50,4 +50,4 @@
"devDependencies": {
"strapi-helper-plugin": "3.0.0-alpha.4"
}
}
}

View File

@ -50,4 +50,4 @@
"npm": ">= 3.0.0"
},
"license": "MIT"
}
}

View File

@ -50,4 +50,4 @@
"npm": ">= 3.0.0"
},
"license": "MIT"
}
}

View File

@ -100,4 +100,4 @@
"devDependencies": {
"forever-monitor": "^1.7.1"
}
}
}

View File

@ -0,0 +1,21 @@
const fs = require('fs');
const path = require('path');
try {
const pkgJSON = JSON.parse(fs.readFileSync(path.resolve(process.cwd(), 'package.json'), 'utf8'));
const packages = fs.readdirSync(path.resolve(process.cwd(),'packages'), 'utf8');
packages.filter(pkg => pkg.indexOf('strapi') !== -1).forEach(pkg => {
const packageJSON = JSON.parse(fs.readFileSync(path.resolve(process.cwd(), 'packages', pkg, 'package.json'), 'utf8'));
Object.keys(packageJSON.dependencies).filter(dependency => dependency.indexOf('strapi-') !== -1).forEach(dependency => {
if (packageJSON.dependencies[dependency].indexOf('file:') !== -1) {
packageJSON.dependencies[dependency] = '^' + pkgJSON.version;
}
});
fs.writeFileSync(path.resolve(process.cwd(), 'packages', pkg, 'package.json'), JSON.stringify(packageJSON, null, 2), 'utf8');
});
} catch (error) {
console.error(error);
}