зеркало из https://github.com/microsoft/napajs.git
Remove non-used script and add tools folder to npmignore
This commit is contained in:
Родитель
2649af099a
Коммит
f3ebdca4bc
|
@ -1,5 +1,6 @@
|
|||
bin
|
||||
build
|
||||
tools
|
||||
|
||||
.npmrc
|
||||
.npmignore
|
||||
|
|
38
package.json
38
package.json
|
@ -1,21 +1,21 @@
|
|||
{
|
||||
"name": "napajs",
|
||||
"version": "0.4.1",
|
||||
"author": "napajs",
|
||||
"main": "./lib/index.js",
|
||||
"types": "./types/index.d.ts",
|
||||
"dependencies": {
|
||||
"cmake-js": ">= 3.5.0",
|
||||
"boost-lib": ">= 0.11.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": ">= 2.2.1",
|
||||
"@types/node": ">= 7.0.8",
|
||||
"@types/mocha": ">= 2.2.0"
|
||||
},
|
||||
"scripts": {
|
||||
"install": "cmake-js compile",
|
||||
"postinstall": "cmake-js clean",
|
||||
"prepublish": "node node_modules/typescript/lib/tsc.js -p lib"
|
||||
}
|
||||
"name": "napajs",
|
||||
"version": "0.4.4",
|
||||
"author": "napajs",
|
||||
"main": "./lib/index.js",
|
||||
"types": "./types/index.d.ts",
|
||||
"dependencies": {
|
||||
"cmake-js": ">= 3.5.0",
|
||||
"boost-lib": ">= 0.11.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": ">= 2.2.1",
|
||||
"@types/node": ">= 7.0.8",
|
||||
"@types/mocha": ">= 2.2.0"
|
||||
},
|
||||
"scripts": {
|
||||
"install": "cmake-js compile",
|
||||
"postinstall": "cmake-js clean",
|
||||
"prepublish": "node node_modules/typescript/lib/tsc.js -p lib"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,39 +0,0 @@
|
|||
// This script is used for updating patch numbers in package.json files.
|
||||
// It uses the current date to create an 8 digit patch number.
|
||||
|
||||
var fs = require('fs');
|
||||
|
||||
var packageObj = JSON.parse(fs.readFileSync('package.json'));
|
||||
|
||||
if (packageObj.version === undefined) {
|
||||
console.error("package.json must have a version property");
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
// Create new package version
|
||||
var packageVersion = packageObj.version.trim();
|
||||
packageVersion = packageVersion.substring(0, packageVersion.lastIndexOf('.') + 1);
|
||||
packageVersion += getPatchNumber();
|
||||
|
||||
// Update the package version
|
||||
packageObj.version = packageVersion;
|
||||
|
||||
fs.writeFileSync('package.json', JSON.stringify(packageObj, null, 4));
|
||||
|
||||
function getPatchNumber() {
|
||||
var date = new Date();
|
||||
|
||||
// Get the current year.
|
||||
var year = date.getUTCFullYear().toString();
|
||||
|
||||
// getMonth returns [0,11] so adjust number for normal display.
|
||||
var month = (date.getUTCMonth() + 1).toString();
|
||||
if (month.length == 1) {
|
||||
month = "0" + month;
|
||||
}
|
||||
|
||||
// 2 digits that represent the current day in the month.
|
||||
var day = date.getUTCDate().toString();
|
||||
|
||||
return year + month + day;
|
||||
}
|
Загрузка…
Ссылка в новой задаче