Require the resources path as input to sync assets
This commit is contained in:
		
							parent
							
								
									e402be1dd2
								
							
						
					
					
						commit
						611d86f3f7
					
				@ -34,8 +34,8 @@
 | 
			
		||||
    "start:local-staging": "npm run generate-config && npm run sync-assets-dev && npm run ng -- serve -c local-staging",
 | 
			
		||||
    "start:mixed": "npm run generate-config && npm run sync-assets-dev && npm run ng -- serve -c mixed",
 | 
			
		||||
    "build": "npm run generate-config && npm run ng -- build --configuration production --localize && npm run sync-assets && npm run build-mempool.js",
 | 
			
		||||
    "sync-assets": "rsync -av ./src/resources ./dist/mempool/browser && node sync-assets.js",
 | 
			
		||||
    "sync-assets-dev": "node sync-assets.js dev",
 | 
			
		||||
    "sync-assets": "rsync -av ./src/resources ./dist/mempool/browser && node sync-assets.js 'dist/mempool/browser/resources/'",
 | 
			
		||||
    "sync-assets-dev": "node sync-assets.js 'src/resources/'",
 | 
			
		||||
    "generate-config": "node generate-config.js",
 | 
			
		||||
    "build-mempool.js": "npm run build-mempool-js && npm run build-mempool-liquid-js && npm run build-mempool-bisq-js",
 | 
			
		||||
    "build-mempool-js": "browserify -p tinyify ./node_modules/@mempool/mempool.js/lib/index.js --standalone mempoolJS > ./dist/mempool/browser/en-US/mempool.js",
 | 
			
		||||
 | 
			
		||||
@ -4,9 +4,13 @@ var fs = require('fs');
 | 
			
		||||
const CONFIG_FILE_NAME = 'mempool-frontend-config.json';
 | 
			
		||||
let configContent = {};
 | 
			
		||||
 | 
			
		||||
var PATH = 'dist/mempool/browser/resources/';
 | 
			
		||||
if (process.argv[2] && process.argv[2] === 'dev') {
 | 
			
		||||
  PATH = 'src/resources/';
 | 
			
		||||
var PATH;
 | 
			
		||||
if (process.argv[2]) {
 | 
			
		||||
  PATH = process.argv[2];
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
if (!PATH) {
 | 
			
		||||
  throw new Error('Resource path argument is not set');
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
try {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user