mirror of
https://github.com/bckelley/cgm-remote-monitor.git
synced 2026-08-24 03:14:12 -05:00
Merge pull request #7526 from sulkaharo/new_cache_location
New build artefact cache location
This commit is contained in:
+2
-2
@@ -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
|
||||
, }));
|
||||
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
+4
-4
@@ -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",
|
||||
|
||||
@@ -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.$ = $;
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -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);
|
||||
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user