Skip to content

Commit

Permalink
fix(config): Cleanup in path config
Browse files Browse the repository at this point in the history
Removed scripts path from the config and fixed a bug in elm-app script runner
  • Loading branch information
halfzebra committed Jun 14, 2017
1 parent 513050b commit 5e11e4f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
4 changes: 1 addition & 3 deletions bin/elm-app-cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ const executablePaths = require('elm/platform').executablePaths

const version = require('../package.json').version
const elmPlatformVersion = require('elm/package.json').version
const paths = require('../config/paths')

const commands = argv._

Expand All @@ -17,15 +16,14 @@ if (commands.length === 0) {
}

const script = commands[ 0 ]
const scriptPath = path.resolve(paths.scripts, script)
const scriptArgs = commands.splice(1)

switch (script) {
case 'create':
case 'build':
case 'eject':
case 'start':
spawnSyncNode(scriptPath, scriptArgs)
spawnSyncNode(path.resolve(__dirname, '../scripts', script), scriptArgs);
break

case 'test': {
Expand Down
1 change: 0 additions & 1 deletion config/paths.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ let paths = {
template: path.resolve('./src/index.html'),
favicon: path.resolve('./src/favicon.ico'),
elmPkg: path.resolve('elm-package.json'),
scripts: path.resolve(__dirname, '../scripts'),
elmMake: require('elm/platform').executablePaths['elm-make'],
servedPath: './' || process.env.SERVED_PATH
}
Expand Down

0 comments on commit 5e11e4f

Please sign in to comment.