2013-07-03 20:26:04 +04:00
|
|
|
path = require 'path'
|
2013-10-21 17:42:55 +04:00
|
|
|
os = require 'os'
|
2013-07-03 20:26:04 +04:00
|
|
|
|
2013-06-27 20:07:33 +04:00
|
|
|
module.exports = (grunt) ->
|
|
|
|
{rm} = require('./task-helpers')(grunt)
|
|
|
|
|
|
|
|
grunt.registerTask 'partial-clean', 'Delete some of the build files', ->
|
2013-10-21 17:42:55 +04:00
|
|
|
tmpdir = if process.platform is 'win32' then os.tmpdir() else '/tmp'
|
|
|
|
|
2013-06-27 20:10:18 +04:00
|
|
|
rm grunt.config.get('atom.buildDir')
|
2013-09-09 21:56:01 +04:00
|
|
|
rm require('../src/coffee-cache').cacheDir
|
2013-09-16 23:32:36 +04:00
|
|
|
rm require('../src/less-compile-cache').cacheDir
|
2013-10-21 17:42:55 +04:00
|
|
|
rm path.join(tmpdir, 'atom-cached-atom-shells')
|
2013-07-04 04:52:22 +04:00
|
|
|
rm 'atom-shell'
|
2013-06-27 20:07:33 +04:00
|
|
|
|
|
|
|
grunt.registerTask 'clean', 'Delete all the build files', ->
|
2013-10-21 18:04:51 +04:00
|
|
|
homeDir = process.env[if process.platform is 'win32' then 'USERPROFILE' else 'HOME']
|
|
|
|
|
2013-06-27 20:07:33 +04:00
|
|
|
rm 'node_modules'
|
2013-10-21 18:04:51 +04:00
|
|
|
rm path.join(homeDir, '.atom', '.node-gyp')
|
2013-06-27 20:07:33 +04:00
|
|
|
grunt.task.run('partial-clean')
|