12345678910111213141516171819202122232425262728293031 |
- var execSync = require('child_process').execSync;
- var fs = require('fs');
- if (!execSync) {
- execSync = require('sync-exec');
- }
- function exec(command) {
- execSync(command, {
- stdio: [0, 1, 2]
- });
- }
- fs.stat('dist', function(error, stat) {
-
- if (process.env.TRAVIS) {
- return;
- }
- if (error || !stat.isDirectory()) {
-
-
- fs.mkdirSync('dist');
- exec('npm install --only=dev');
- exec('npm run build');
- }
- });
|