Skip to content
This repository has been archived by the owner on Sep 10, 2022. It is now read-only.

Commit

Permalink
use folder as babel input to preserve directory structure (#719)
Browse files Browse the repository at this point in the history
  • Loading branch information
farism authored and istarkov committed Jul 31, 2018
1 parent 6188a0b commit 7f245ec
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions scripts/release.js
Expand Up @@ -7,7 +7,6 @@ const chalk = require('chalk')
const { flowRight: compose } = require('lodash')
const readline = require('readline-sync')
const semver = require('semver')
const glob = require('glob')
const { pascalCase } = require('change-case')

const BIN = './node_modules/.bin'
Expand Down Expand Up @@ -86,14 +85,12 @@ try {

log('Compiling source files...')

const sourceFiles = glob.sync(`${sourceDir}/**/*.js`, {
ignore: `${sourceDir}/node_modules/**/*.js`,
})

exec(
'cross-env NODE_ENV=cjs ' +
`${path.resolve(BIN)}/babel ${sourceFiles.join(' ')} ` +
`--out-dir ${path.resolve(outDir)} --ignore="**/__tests__/**"`
`${path.resolve(BIN)}/babel ${sourceDir} ` +
`--out-dir ${path.resolve(
outDir
)} --ignore="**/__tests__/**,**/node_modules/**"`
)

log('Copying additional project files...')
Expand Down

0 comments on commit 7f245ec

Please sign in to comment.