diff --git a/lib/server/app.js b/lib/server/app.js index bb68a2f711a..b8a845999e9 100644 --- a/lib/server/app.js +++ b/lib/server/app.js @@ -320,7 +320,7 @@ function create (env, ctx) { } // Production bundling - const tmpFiles = express.static(resolvePath('/tmp/public'), { + const tmpFiles = express.static(resolvePath('/node_modules/.cache/_ns_cache/public'), { maxAge: maxAge }); @@ -343,7 +343,7 @@ function create (env, ctx) { , coffee_match: /coffeescript/ , json_match: /json/ , cssmin: myCssmin - , cache: resolvePath('/tmp/public') + , cache: resolvePath('/node_modules/.cache/_ns_cache/public') , onerror: undefined , })); diff --git a/lib/server/enclave.js b/lib/server/enclave.js index 2ae0ef2ebcb..3e62a04a0c6 100644 --- a/lib/server/enclave.js +++ b/lib/server/enclave.js @@ -19,7 +19,7 @@ const init = function init () { let apiKeySet = false; function readKey (filename) { - let filePath = path.resolve(__dirname + '/../../tmp/' + filename); + let filePath = path.resolve(__dirname + '/../../node_modules/.cache/_ns_cache/' + filename); if (fs.existsSync(filePath)) { return fs.readFileSync(filePath).toString().trim(); } diff --git a/package.json b/package.json index c70aa3e0694..21834da3d04 100644 --- a/package.json +++ b/package.json @@ -31,11 +31,11 @@ "test-single": "env-cmd -f ./my.test.env mocha --timeout 5000 --require ./tests/hooks.js --exit ./tests/$TEST.test.js", "test-ci": "env-cmd -f ./tests/ci.test.env nyc --reporter=lcov --reporter=text-summary mocha --timeout 5000 --require ./tests/hooks.js --exit ./tests/*.test.js", "env": "env", - "postinstall": "webpack --mode production --config webpack/webpack.config.js && npm run-script generate-keys", - "bundle": "webpack --mode production --config webpack/webpack.config.js && npm run-script generate-keys", - "bundle-dev": "webpack --mode development --config webpack/webpack.config.js && npm run-script generate-keys", + "postinstall": "webpack --mode production --config webpack/webpack.config.js && npm run-script post-generate-keys", + "bundle": "webpack --mode production --config webpack/webpack.config.js && npm run-script post-generate-keys", + "bundle-dev": "webpack --mode development --config webpack/webpack.config.js && npm run-script post-generate-keys", "bundle-analyzer": "webpack --mode development --config webpack/webpack.config.js --profile --json > stats.json && webpack-bundle-analyzer stats.json", - "generate-keys": "node bin/generateRandomString.js >tmp/randomString", + "post-generate-keys": "node bin/generateRandomString.js >node_modules/.cache/_ns_cache/randomString", "coverage": "cat ./coverage/lcov.info | env-cmd -f ./tests/ci.test.env codacy-coverage || echo NO COVERAGE", "dev": "env-cmd -f ./my.env nodemon --inspect lib/server/server.js 0.0.0.0", "dev-test": "env-cmd -f ./my.devtest.env nodemon --inspect lib/server/server.js 0.0.0.0", diff --git a/tests/admintools.test.js b/tests/admintools.test.js index 59f10c720a7..4b7801419cd 100644 --- a/tests/admintools.test.js +++ b/tests/admintools.test.js @@ -70,7 +70,7 @@ describe('admintools', function ( ) { before(function (done) { benv.setup(function() { - benv.require(__dirname + '/../tmp/public/js/bundle.app.js'); + benv.require(__dirname + '/../node_modules/.cache/_ns_cache/public/js/bundle.app.js'); self.$ = $; diff --git a/tests/fixtures/headless.js b/tests/fixtures/headless.js index a3ad66b2424..310566e6132 100644 --- a/tests/fixtures/headless.js +++ b/tests/fixtures/headless.js @@ -25,7 +25,7 @@ function headless (benv, binding) { console.log('Setting up benv', Date.now() - t); - benv.require(__dirname + '/../../tmp/public/js/bundle.app.js'); + benv.require(__dirname + '/../../node_modules/.cache/_ns_cache/public/js/bundle.app.js'); console.log('Bundle loaded', Date.now() - t); diff --git a/webpack/webpack.config.js b/webpack/webpack.config.js index 9e65111f63b..691a5f0fc1a 100644 --- a/webpack/webpack.config.js +++ b/webpack/webpack.config.js @@ -149,7 +149,7 @@ module.exports = { clock: clockEntry }, output: { - path: path.resolve(projectRoot, './tmp/public'), + path: path.resolve(projectRoot, './node_modules/.cache/_ns_cache/public'), publicPath, filename: 'js/bundle.[name].js', sourceMapFilename: 'js/bundle.[name].js.map',