Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No color coding in terminal #28

Open
7 tasks done
jamonholmgren opened this issue Sep 8, 2016 · 3 comments
Open
7 tasks done

No color coding in terminal #28

jamonholmgren opened this issue Sep 8, 2016 · 3 comments

Comments

@jamonholmgren
Copy link

Problem

When I run elm-brunch, I get monochromatic errors:

image

When I run elm-make directly, I get pretty errors:

image

Information

  • elm-brunch version 0.7.0
  • brunch version 2.8.2
  • nodejs version 6.3.0
  • content of brunch-config.js
exports.config = {
  sourceMaps: false,
  production: true,
  npm: {
    enabled: true
  },

  files: {
    // javascripts: {
    //   joinTo: 'thesis-editor.js'
    // },
    stylesheets: {
      joinTo: 'thesis.css'
    }
  },

  // Phoenix paths configuration
  paths: {
    // Which directories to watch
    watched: ['web/elm'],

    // Where to compile files to
    // public: 'priv/static'
  },

  modules: {
    autoRequire: {
      'thesis-editor.js': ['web/static/js/thesis-editor']
    }
  },

  // Configure your plugins
  plugins: {
    // babel: {
    //   // Do not use ES6 compiler in vendor code
    //   ignore: [/^(web\/static\/vendor)/],
    //   presets: ['es2015', 'react']
    // },
    elmBrunch: {
      mainModules: ['web/elm/Main.elm'],
      outputFolder: 'priv/js/',
      outputFile: 'thesis-editor.js'
    }
  }
}
  • content of elm-package.json
{
    "version": "0.0.21",
    "summary": "Thesis CMS - Content Management for Phoenix websites",
    "repository": "https://github.com/infinitered/thesis-phoenix.git",
    "license": "MIT",
    "source-directories": [
        "./web/elm"
    ],
    "exposed-modules": [],
    "dependencies": {
        "elm-lang/core": "4.0.5 <= v < 5.0.0",
        "elm-lang/html": "1.1.0 <= v < 2.0.0"
    },
    "elm-version": "0.17.1 <= v < 0.18.0"
}
  • file layout for your elm files relative to root of project. ./web/elm/Main.elm
  • Operating System Mac OS X
@madsflensted
Copy link
Owner

That would be a great feature, don't hold back if you want to submit a PR for this.

@niklas
Copy link

niklas commented Sep 17, 2016

I think this is caused by elm-make failing to detect a TTY (a "proper" terminal) [1] because it is executed by brunch. The canonical solution seems to implement a command-line flag in elm-make [2].

[1] https://github.com/elm-lang/elm-make/blob/master/src/Report.hs#L35
[2] http://unix.stackexchange.com/questions/10823/where-do-my-ansi-escape-codes-go-when-i-pipe-to-another-process-can-i-keep-them

@jamonholmgren
Copy link
Author

@niklas That's incredibly helpful. Thanks. I'll file an issue with elm-make and possibly work on it if I can find time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants