Files
atom/build/lib/copy-static-assets.js
2016-07-26 14:52:14 +02:00

23 lines
674 B
JavaScript

// This module exports a function that copies all the static assets into the
// appropriate location in the build output directory.
'use strict'
const path = require('path')
const fs = require('fs-extra')
const computeDestinationPath = require('./compute-destination-path')
const CONFIG = require('../config')
module.exports = function () {
console.log('Copying static assets...');
const sourcePaths = [
path.join(CONFIG.repositoryRootPath, 'static'),
path.join(CONFIG.repositoryRootPath, 'dot-atom'),
path.join(CONFIG.repositoryRootPath, 'vendor')
]
for (let srcPath of sourcePaths) {
fs.copySync(srcPath, computeDestinationPath(srcPath))
}
}