mirror of
				https://gitee.com/vant-contrib/vant.git
				synced 2025-11-04 21:02:09 +08:00 
			
		
		
		
	[build] reduce npm scripts
This commit is contained in:
		
							parent
							
								
									9fc2bed48e
								
							
						
					
					
						commit
						e83abd30fe
					
				@ -6,13 +6,14 @@ const signale = require('signale');
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
const { Signale } = signale;
 | 
					const { Signale } = signale;
 | 
				
			||||||
const tasks = [
 | 
					const tasks = [
 | 
				
			||||||
  'bootstrap',
 | 
					  'npm run bootstrap',
 | 
				
			||||||
  'lint',
 | 
					  'npm run lint',
 | 
				
			||||||
  'build:entry',
 | 
					  'npm run build:entry',
 | 
				
			||||||
  'build:components',
 | 
					  'node build/build-components.js --color',
 | 
				
			||||||
  'build:style',
 | 
					  'node build/build-style.js',
 | 
				
			||||||
  'build:style-entry',
 | 
					  'node build/build-style-entry.js',
 | 
				
			||||||
  'build:vant'
 | 
					  'cross-env NODE_ENV=production webpack --color --config build/webpack.build.js',
 | 
				
			||||||
 | 
					  'cross-env NODE_ENV=production webpack -p --color --config build/webpack.build.js'
 | 
				
			||||||
];
 | 
					];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
tasks.forEach(task => {
 | 
					tasks.forEach(task => {
 | 
				
			||||||
@ -20,6 +21,6 @@ tasks.forEach(task => {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  const interactive = new Signale({ interactive: true });
 | 
					  const interactive = new Signale({ interactive: true });
 | 
				
			||||||
  interactive.pending(task);
 | 
					  interactive.pending(task);
 | 
				
			||||||
  shell.exec(`npm run ${task} --silent`);
 | 
					  shell.exec(`${task} --silent`);
 | 
				
			||||||
  interactive.success(task);
 | 
					  interactive.success(task);
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
 | 
				
			|||||||
@ -18,10 +18,6 @@
 | 
				
			|||||||
    "dev": "npm run build:entry && webpack-dev-server --config build/webpack.dev.js",
 | 
					    "dev": "npm run build:entry && webpack-dev-server --config build/webpack.dev.js",
 | 
				
			||||||
    "lint": "eslint ./packages --ext .js,.vue,.ts,.tsx && stylelint \"packages/*.less\"",
 | 
					    "lint": "eslint ./packages --ext .js,.vue,.ts,.tsx && stylelint \"packages/*.less\"",
 | 
				
			||||||
    "build:entry": "node build/build-entry.js",
 | 
					    "build:entry": "node build/build-entry.js",
 | 
				
			||||||
    "build:components": "node build/build-components.js --color",
 | 
					 | 
				
			||||||
    "build:vant": "cross-env NODE_ENV=production webpack --color --config build/webpack.build.js && cross-env NODE_ENV=production webpack -p --color --config build/webpack.build.js",
 | 
					 | 
				
			||||||
    "build:style": "node build/build-style.js",
 | 
					 | 
				
			||||||
    "build:style-entry": "node build/build-style-entry.js",
 | 
					 | 
				
			||||||
    "build:changelog": "vant-doc changelog ./changelog.generated.md",
 | 
					    "build:changelog": "vant-doc changelog ./changelog.generated.md",
 | 
				
			||||||
    "build:lib": "node build/build-lib.js",
 | 
					    "build:lib": "node build/build-lib.js",
 | 
				
			||||||
    "build:site": "rm -rf docs/dist && cross-env NODE_ENV=production webpack --config build/webpack.doc.js && gh-pages -d docs/dist",
 | 
					    "build:site": "rm -rf docs/dist && cross-env NODE_ENV=production webpack --config build/webpack.doc.js && gh-pages -d docs/dist",
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user