Copy static/, dot-atom/ and vendor/ as they are

This commit is contained in:
Antonio Scandurra
2016-07-26 14:52:14 +02:00
parent 265cb90a6d
commit 59bc5d427e
2 changed files with 24 additions and 0 deletions

View File

@@ -5,7 +5,9 @@
const cleanOutputDirectory = require('./lib/clean-output-directory')
const transpileBabelPaths = require('./lib/transpile-babel-paths')
const transpileCoffeeScriptPaths = require('./lib/transpile-coffee-script-paths')
const copyStaticAssets = require('./lib/copy-static-assets')
cleanOutputDirectory()
transpileBabelPaths()
transpileCoffeeScriptPaths()
copyStaticAssets()

View File

@@ -0,0 +1,22 @@
// 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))
}
}