mirror of
				https://github.com/strapi/strapi.git
				synced 2025-10-31 09:56:44 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			20 lines
		
	
	
		
			468 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			468 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| const fs = require('fs-extra');
 | |
| const path = require('path');
 | |
| 
 | |
| const content = `
 | |
| 'use strict';
 | |
| 
 | |
| if (process.env.NODE_ENV === "production") {
 | |
|   module.exports = require("./helper-plugin.production.js");
 | |
| } else {
 | |
|   module.exports = require("./helper-plugin.development.js");
 | |
| }
 | |
| `;
 | |
| 
 | |
| const createIndexFile = async dest => {
 | |
|   await fs.ensureDir(path.resolve(dest, 'build'));
 | |
|   fs.writeFile(path.resolve(dest, 'build', 'index.js'), content);
 | |
| };
 | |
| 
 | |
| createIndexFile(__dirname);
 | 
