versioning script
This commit is contained in:
parent
8594ed3ef1
commit
94a8be4fca
1 changed files with 6 additions and 1 deletions
|
|
@ -52,8 +52,13 @@ function fixCollisions(code) {
|
||||||
return code
|
return code
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function setVersion(code) {
|
||||||
|
var metadata = JSON.parse(fs.readFileSync("./package.json"))
|
||||||
|
return code.replace("bleeding-edge", metadata.version)
|
||||||
|
}
|
||||||
|
|
||||||
function bundle(input, output) {
|
function bundle(input, output) {
|
||||||
var code = resolve(".", fs.readFileSync(input, "utf8"))
|
var code = setVersion(resolve(".", fs.readFileSync(input, "utf8")))
|
||||||
if (new Function(code)) fs.writeFileSync(output, code, "utf8")
|
if (new Function(code)) fs.writeFileSync(output, code, "utf8")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue