Commit bcece0b0 by Иван Кубота

dir

parent 4a11b35c
Pipeline #534 failed with stage
KUS_DATA_DIR=../../
\ No newline at end of file
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
.vscode .vscode
/.idea /.idea
.env
.env.local .env.local
.env.development.local .env.development.local
.env.test.local .env.test.local
......
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
const yargs = require("yargs"), const yargs = require("yargs"),
fs = require('fs'); fs = require('fs'),
path = require('path');
const options = yargs const options = yargs
.usage("Usage: -n <name>") .usage("Usage: -n <name>")
...@@ -64,7 +65,7 @@ const sources = [ ...@@ -64,7 +65,7 @@ const sources = [
"js/controller/quizBits/radioPhoto.js" "js/controller/quizBits/radioPhoto.js"
]; ];
var js = sources.map(a=>'./public/'+a).map(n=>fs.readFileSync(n)+'').join('\n\n'); var js = sources.map(a=>path.join(__dirname,'../public',a)).map(n=>fs.readFileSync(n)+'').join('\n\n');
if(options.dir) if(options.dir)
process.env.KUS_DATA_DIR = options.dir; process.env.KUS_DATA_DIR = options.dir;
......
{ {
"name": "kus-quizard", "name": "kus-quizard",
"version": "0.1.0", "version": "0.1.0",
"main": "bin/index.js", "main": "bin/index.js",
"dependencies": { "dependencies": {
"csv-parser": "^2.3.2", "csv-parser": "^2.3.2",
"dotenv": "^8.2.0",
"express": "^4.17.1", "express": "^4.17.1",
"node-async-router": "^0.0.2", "node-async-router": "^0.0.2",
"yargs": "^15.1.0" "yargs": "^15.1.0"
......
...@@ -207,6 +207,11 @@ destroy@~1.0.4: ...@@ -207,6 +207,11 @@ destroy@~1.0.4:
resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80"
integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=
dotenv@^8.2.0:
version "8.2.0"
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.2.0.tgz#97e619259ada750eea3e4ea3e26bceea5424b16a"
integrity sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw==
ee-first@1.1.1: ee-first@1.1.1:
version "1.1.1" version "1.1.1"
resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment