Write control/desktop files to build dir

This commit is contained in:
Kevin Sawicki
2014-07-21 16:52:20 -07:00
parent a26cb6023e
commit 1757ff18f2
2 changed files with 8 additions and 13 deletions

View File

@@ -34,7 +34,6 @@
"request": "~2.27.0",
"rimraf": "~2.2.2",
"runas": "0.5.x",
"temp": "^0.8.0",
"underscore-plus": "1.x",
"unzip": "~0.1.9",
"vm-compatibility-layer": "~0.1.0"

View File

@@ -1,22 +1,18 @@
fs = require 'fs'
path = require 'path'
_ = require 'underscore-plus'
temp = require 'temp'
temp.track()
tempResourcesFolder = temp.mkdirSync('atom-resources-')
fillTemplate = (filePath, data) ->
template = _.template(String(fs.readFileSync("#{filePath}.in")))
filled = template(data)
outputPath = path.join(tempResourcesFolder, path.basename(filePath))
fs.writeFileSync(outputPath, filled)
outputPath
module.exports = (grunt) ->
{spawn} = require('./task-helpers')(grunt)
fillTemplate = (filePath, data) ->
template = _.template(String(fs.readFileSync("#{filePath}.in")))
filled = template(data)
outputPath = path.join(grunt.config.get('atom.buildDir'), path.basename(filePath))
fs.writeFileSync(outputPath, filled)
outputPath
grunt.registerTask 'mkdeb', 'Create debian package', ->
done = @async()