Skip to content

Commit

Permalink
Try .cache in node_modules
Browse files Browse the repository at this point in the history
  • Loading branch information
sulkaharo committed Aug 29, 2022
1 parent 7b01d49 commit 37a2a0d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/server/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ function create (env, ctx) {
, coffee_match: /coffeescript/
, json_match: /json/
, cssmin: myCssmin
, cache: resolvePath('/node_modules/_ns_cache/public')
, cache: resolvePath('/node_modules/.cache/_ns_cache/public')
, onerror: undefined
, }));

Expand Down
2 changes: 1 addition & 1 deletion lib/server/enclave.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const init = function init () {
let apiKeySet = false;

function readKey (filename) {
let filePath = path.resolve(__dirname + '/../../node_modules/_ns_cache/' + filename);
let filePath = path.resolve(__dirname + '/../../node_modules/.cache/_ns_cache/' + filename);
if (fs.existsSync(filePath)) {
return fs.readFileSync(filePath).toString().trim();
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"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",
"bundle-analyzer": "webpack --mode development --config webpack/webpack.config.js --profile --json > stats.json && webpack-bundle-analyzer stats.json",
"generate-keys": "mkdir node_modules/_ns_cache | node bin/generateRandomString.js >node_modules/_ns_cache/randomString",
"generate-keys": "mkdir node_modules/.cache/_ns_cache | 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",
Expand Down
2 changes: 1 addition & 1 deletion webpack/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ module.exports = {
clock: clockEntry
},
output: {
path: path.resolve(projectRoot, './node_modules/_ns_cache/public'),
path: path.resolve(projectRoot, './node_modules/.cache/_ns_cache/public'),
publicPath,
filename: 'js/bundle.[name].js',
sourceMapFilename: 'js/bundle.[name].js.map',
Expand Down

0 comments on commit 37a2a0d

Please sign in to comment.