GithubHelp home page GithubHelp logo

Comments (5)

kokarn avatar kokarn commented on July 22, 2024

Hmm, this is interesting. Because for me Gruntfile.js works so would assume it's something with your OS. Can you test the same file on another linux box and/or a win/osx box?

from atom-grunt-runner.

beejjorgensen avatar beejjorgensen commented on July 22, 2024

I'll try to get it set up on a Mac to test, but I think it will work fine there.

Changing "/gruntfile" to "/Gruntfile" grunt-runner-view.coffee causes it to work on my Linux box. I very much suspect that this is an issue related to the fact that filenames tend to be case-sensitive on Unix boxes, and case-insensitive on OSX/Windows.

If that's the case, maybe it makes more sense to refer to /Gruntfile? I'm out of my element on Mac/Windows, so I'll defer to someone else if that's a good or safe idea.

from atom-grunt-runner.

kokarn avatar kokarn commented on July 22, 2024

I have a speculative fix for this.

Can you test it out for me?
Replace lines 80 through 90 in grunt-runner-view.coffee

        else
            Task.once require.resolve('./parse-config-task'), @path+'/gruntfile', ({error, tasks})->

                # log error or add panel to workspace
                if error
                    view.addLine "Error loading gruntfile: #{error}", "error"
                    view.toggleLog()
                else
                    view.addLine "Grunt file parsed, found #{tasks.length} tasks"
                    view.tasks = tasks
                    view.togglePanel()

with this

        else
            Task.once require.resolve('./parse-config-task'), @path+'/Gruntfile', ({error, tasks})->

                if error
                    # failed to load Gruntfile.js, try gruntfile.js
                    Task.once require.resolve('./parse-config-task'), @path+'/gruntfile', ({error, tasks})->

                        # log error or add panel to workspace
                        if error
                            view.addLine "Error loading gruntfile: #{error}", "error"
                            view.toggleLog()
                        else
                            view.addLine "Grunt file parsed, found #{tasks.length} tasks"
                            view.tasks = tasks
                            view.togglePanel()
                else
                    view.addLine "Grunt file parsed, found #{tasks.length} tasks"
                    view.tasks = tasks
                    view.togglePanel()

If it fails for /Gruntfile it just tries with /gruntfile :)

from atom-grunt-runner.

beejjorgensen avatar beejjorgensen commented on July 22, 2024

Tested, works for me! :)

from atom-grunt-runner.

kokarn avatar kokarn commented on July 22, 2024

Great! I'll add that then :)

from atom-grunt-runner.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.