fix(build): Make build unrelient on root level deps (take 2)

This commit is contained in:
Bouncey
2018-09-06 15:31:05 +01:00
committed by Stuart Taylor
parent a70fb9ba01
commit eb5dee1cbb
4 changed files with 7 additions and 36 deletions

1
client/config/.gitkeep Normal file
View File

@ -0,0 +1 @@
# this file is here to add an empty dir to git

View File

@ -1,4 +1,4 @@
const fs = require('fs-extra');
const fs = require('fs');
const path = require('path');
const env = require('./env');
@ -9,7 +9,7 @@ const clientPath = path.resolve(__dirname, '../client');
fs.access(`${apiPath}/server/rev-manifest.json`, function(err) {
if (err) {
console.log('\n\ncreating manifest\n\n');
return fs.writeFileSync('./api-server/server/rev-manifest.json', '{}');
return fs.writeFileSync(`${apiPath}/server/rev-manifest.json`, '{}');
}
console.log('\n\nrev-manifest present\n\n');
return null;
@ -19,7 +19,7 @@ fs.access(`${apiPath}/server/resources/pathMigration.json`, err => {
if (err) {
console.log('\n\ncreating pathMigration\n\n');
return fs.writeFileSync(
'./api-server/server/resources/pathMigration.json',
`${apiPath}/server/resources/pathMigration.json`,
'{}'
);
}
@ -27,6 +27,5 @@ fs.access(`${apiPath}/server/resources/pathMigration.json`, err => {
return null;
});
fs.ensureDir(`${clientPath}/config/`).then(() =>
fs.writeFileSync(`${clientPath}/config/env.json`, JSON.stringify(env))
);
fs.writeFileSync(`${clientPath}/config/env.json`, JSON.stringify(env))

28
package-lock.json generated
View File

@ -9,39 +9,11 @@
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-6.0.0.tgz",
"integrity": "sha512-FlWbnhgjtwD+uNLUGHbMykMOYQaTivdHEmYwAKFjn6GKe/CqY0fNae93ZHTd20snh9ZLr8mTzIL9m0APQ1pjQg=="
},
"fs-extra": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.0.tgz",
"integrity": "sha512-EglNDLRpmaTWiD/qraZn6HREAEAHJcJOmxNEYwq6xeMKnVMAy3GUcFB+wXt2C6k4CNvB/mP1y/U3dzvKKj5OtQ==",
"requires": {
"graceful-fs": "4.1.11",
"jsonfile": "4.0.0",
"universalify": "0.1.2"
}
},
"graceful-fs": {
"version": "4.1.11",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz",
"integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg="
},
"jsonfile": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
"integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=",
"requires": {
"graceful-fs": "4.1.11"
}
},
"tree-kill": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.0.tgz",
"integrity": "sha512-DlX6dR0lOIRDFxI0mjL9IYg6OTncLm/Zt+JiBhE5OlFcAR8yc9S7FFXU9so0oda47frdM/JFsk7UjNt9vscKcg==",
"dev": true
},
"universalify": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
"integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg=="
}
}
}

View File

@ -8,7 +8,6 @@
"tree-kill": "^1.2.0"
},
"dependencies": {
"dotenv": "^6.0.0",
"fs-extra": "^7.0.0"
"dotenv": "^6.0.0"
}
}