13 lines
		
	
	
		
			439 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
		
		
			
		
	
	
			13 lines
		
	
	
		
			439 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| 
								 | 
							
								const path = require('path');
							 | 
						||
| 
								 | 
							
								const fs = require('fs');
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								const { getChallengesForLang } = require('../../../curriculum/getChallenges');
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								const globalConfigPath = path.resolve(__dirname, '../../../config');
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								// We are defaulting to English because the ids for the challenges are same
							 | 
						||
| 
								 | 
							
								// accross all languages.
							 | 
						||
| 
								 | 
							
								getChallengesForLang('english')
							 | 
						||
| 
								 | 
							
								  .then(JSON.stringify)
							 | 
						||
| 
								 | 
							
								  .then(x => fs.writeFileSync(`${globalConfigPath}/curriculum.json`, x));
							 |