mirror of
https://github.com/atom/atom.git
synced 2026-01-25 06:48:28 -05:00
Clean output directory before building
This commit is contained in:
@@ -2,8 +2,10 @@
|
||||
|
||||
'use strict'
|
||||
|
||||
const cleanOutputDirectory = require('./lib/clean-output-directory')
|
||||
const transpileBabelPaths = require('./lib/transpile-babel-paths')
|
||||
const transpileCoffeeScriptPaths = require('./lib/transpile-coffee-script-paths')
|
||||
|
||||
cleanOutputDirectory()
|
||||
transpileBabelPaths()
|
||||
transpileCoffeeScriptPaths()
|
||||
|
||||
10
build/lib/clean-output-directory.js
Normal file
10
build/lib/clean-output-directory.js
Normal file
@@ -0,0 +1,10 @@
|
||||
const fs = require('fs-extra')
|
||||
const path = require('path')
|
||||
const CONFIG = require('../config')
|
||||
|
||||
module.exports = function () {
|
||||
if (fs.existsSync(CONFIG.buildOutputPath)) {
|
||||
console.log(`Cleaning ${CONFIG.buildOutputPath}...`);
|
||||
fs.removeSync(CONFIG.buildOutputPath)
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,8 @@
|
||||
"name": "atom-build-scripts",
|
||||
"description": "Atom build scripts",
|
||||
"dependencies": {
|
||||
"glob": "^7.0.3",
|
||||
"mkdirp": "^0.5.1"
|
||||
"fs-extra": "0.30.0",
|
||||
"glob": "7.0.3",
|
||||
"mkdirp": "0.5.1"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user