-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
52 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,29 +22,23 @@ | |
"email": "[email protected]", | ||
"url": "https://github.com/PrivateSky/pskruntime/issues" | ||
}, | ||
"directories": { | ||
"lib": "./lib" | ||
}, | ||
"engines": { | ||
"node": ">=0.10.0" | ||
}, | ||
"main": "./lib/index.js", | ||
"licenses": [ | ||
{ | ||
"type": "LGPL", | ||
"url": "http://www.gnu.org/licenses/lgpl.html" | ||
}, { | ||
}, | ||
{ | ||
"type": "MIT" | ||
} | ||
|
||
], | ||
"dependencies" : { | ||
"dependencies": { | ||
"browserify": "^16.3.0" | ||
}, | ||
"scripts": { | ||
"build": "node ./psknode/bin/scripts/pskbuild.js ./domain/build.json", | ||
"watch": "node ./psknode/bin/scripts/watcher.js --watch ./ --run ./psknode/bin/scripts/psknode.js --ignore=\"/engine/pskbuildtemp/,/builds/devel/,/tests/,/bin/\"", | ||
"start": " node ./psknode/bin/scripts/psknode.js", | ||
"run-tests": "npm run build && node bin/scripts/testrunner.js", | ||
"cmd": "node bin//terminal.js" | ||
"cmd": "node bin//terminal.js", | ||
"build": "node scripts/builder.js" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
const child_process = require("child_process"); | ||
const path = require("path"); | ||
const fs = require("fs"); | ||
|
||
const pskBuildPath = path.resolve(path.join(__dirname, "..", "/psknode/bin/scripts/pskbuild.js")); | ||
|
||
let domains = process.argv.slice(2); | ||
console.log("Argument domain list: ", domains); | ||
|
||
if(domains.length === 0){ | ||
let domainsDir = path.join(__dirname, "..", "domains"); | ||
console.log(`No domain specified. Directory "${domainsDir}" scan started...`); | ||
|
||
let content = fs.readdirSync(domainsDir, {withFileTypes: true}); | ||
for(let i=0; i<content.length; i++){ | ||
let file = content[i]; | ||
if(file.isDirectory()){ | ||
domains.push(file.name); | ||
} | ||
} | ||
|
||
console.log("Found next domains", domains); | ||
} | ||
|
||
for(let i=0; i<domains.length; i++){ | ||
let domain = domains[i]; | ||
let domainTargetsMap = path.resolve(path.join(__dirname, "..", "domains", domain, "build.json")); | ||
let domainBundlesInput = path.join("bundles", "tmp"); | ||
let domainBundlesOutput = path.join("bundles"); | ||
|
||
console.log("Building domain", domain); | ||
try{ | ||
let res = child_process.execSync(`node ${pskBuildPath} ${domainTargetsMap} `+ | ||
`--input="${domainBundlesInput}" `+ | ||
`--output="${domainBundlesOutput}"`, {cwd: path.resolve(path.join(__dirname, "..", "domains", domain))}); | ||
console.log(res.toString()); | ||
}catch(err){ | ||
console.log(err); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
const path = require("path"); | ||
const fs = require("fs"); | ||
|
||
let setupCmds = ["pskadmin"]; | ||
|
||
let cmds = [""]; |