Giter Site home page Giter Site logo

Does nothing about grunt-include-source HOT 6 CLOSED

jwvdiermen avatar jwvdiermen commented on July 21, 2024
Does nothing

from grunt-include-source.

Comments (6)

jwvdiermen avatar jwvdiermen commented on July 21, 2024

Thanks for your feedback. I still need to add unit tests and expand the documentation, but it's nice to see people actually want to use it.

I'm going to have a look at it this evening when I get back from work.

from grunt-include-source.

jwvdiermen avatar jwvdiermen commented on July 21, 2024

After a quick look at your source, it looks like you copy/pasted a typo of mine into your configuration.
Change line 10 of Gruntfile.js from:

'dist/index.html': 'app/index.tpl.hml'

to:

'dist/index.html': 'app/index.tpl.html'

from grunt-include-source.

dmitrybelyakov avatar dmitrybelyakov commented on July 21, 2024

@jwvdiermen

Yes, it's nice and while searching for something similar I've seen people doing complicated workarounds for something that simple. So it's a very useful task.

By the way - I think I found the issue. It's just the example config is wrong. It should provide a list of files like so:

includeSource: {
    options: {
      basePath: 'app'
    },
    targetName: {
      files: {'dist/index.html': 'app/index.tpl.html'}
    }
  }
},

(updated)

Seems to be minor nesting issue in the example. And the task name is wrong as well. Its in fact includeSource rather than include_source.

So I finally got it to work :)
Thanks!

from grunt-include-source.

jwvdiermen avatar jwvdiermen commented on July 21, 2024

I updated the documentation to remove the task name typo, thanks for bringing that to my attention.

I guess you have to nest the files property because it's a multi task. Here is an example I use in one of my projects:

includeSource: {
    server: {
        options: {
            basePath: '<%= env.app %>'
        },
        files: {
            '<%= env.temp %>/index.html': '<%= env.app %>/index.html',
            '<%= env.temp %>/login.html': '<%= env.app %>/login.html'
        }
    }
}

from grunt-include-source.

dmitrybelyakov avatar dmitrybelyakov commented on July 21, 2024

Sure no problem :)

UPDATED: But my point actually was that you should have files inside your tasks target (server in your example). So the example on the homepage won't work, because files get treated as a target/subtask like includeSource:files that has no files defined.

Hope I managed to explain that well :)

from grunt-include-source.

jwvdiermen avatar jwvdiermen commented on July 21, 2024

That's what I meant to, but I forgot that the example was wrong. It's updated now, thanks for explaining.

from grunt-include-source.

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.