2019-05-22 17:31:09 +03:00
|
|
|
const path = require('path')
|
2019-05-09 13:03:18 +03:00
|
|
|
require('dotenv').config({
|
2019-05-22 17:31:09 +03:00
|
|
|
path: path.resolve(__dirname, '..', '.env')
|
|
|
|
})
|
|
|
|
const fs = require('fs')
|
2019-05-09 13:03:18 +03:00
|
|
|
|
2019-05-22 17:31:09 +03:00
|
|
|
const stylePath = path.resolve(__dirname, '..', 'src', 'assets', 'stylesheets')
|
|
|
|
const destinationFilename = 'application.css'
|
|
|
|
let filename
|
2019-05-09 13:03:18 +03:00
|
|
|
|
|
|
|
if (process.env.APP_STYLES === 'classic') {
|
2019-05-22 17:31:09 +03:00
|
|
|
filename = 'application.classic.css'
|
2019-05-09 13:03:18 +03:00
|
|
|
} else {
|
2019-05-22 17:31:09 +03:00
|
|
|
filename = 'application.core.css'
|
2019-05-09 13:03:18 +03:00
|
|
|
}
|
|
|
|
|
2019-05-22 17:31:09 +03:00
|
|
|
fs.copyFileSync(path.resolve(stylePath, filename), path.resolve(stylePath, destinationFilename))
|