pulsar/build/tasks/clean-task.coffee

22 lines
734 B
CoffeeScript
Raw Normal View History

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'
rm grunt.config.get('atom.buildDir')
rm require('../src/coffee-cache').cacheDir
rm require('../src/less-compile-cache').cacheDir
2013-10-21 17:42:55 +04:00
rm path.join(tmpdir, 'atom-cached-atom-shells')
rm 'atom-shell'
2013-06-27 20:07:33 +04:00
grunt.registerTask 'clean', 'Delete all the build files', ->
homeDir = process.env[if process.platform is 'win32' then 'USERPROFILE' else 'HOME']
2013-06-27 20:07:33 +04:00
rm 'node_modules'
rm path.join(homeDir, '.atom', '.node-gyp')
2013-06-27 20:07:33 +04:00
grunt.task.run('partial-clean')