Skip to content
This repository was archived by the owner on Aug 22, 2023. It is now read-only.

Conversation

@colthreepv
Copy link

I hope to have make this as customizable as possible.

What you can achieve is:

Have a project called XYZ that requires grunt-swig AND swig-sometag (as siblings).
XYZ\Gruntfile.js:

grunt.initConfig({
  swig: {
    documentation: {
      dest: 'test/dest',
      src: ['**/*.swig', '!templates/*.swig'],
      tags: {
        sometag: require('swig-sometag')
      }
    }
  }
});

Or you could use a custom swig-tag made by yourself! Just using:

grunt.initConfig({
  swig: {
    documentation: {
      dest: 'test/dest',
      src: ['**/*.swig', '!templates/*.swig'],
      tags: {
        personal: require('./my-personal-tag')
      }
    }
  }
});

@colthreepv
Copy link
Author

Added another commit, this is a refactor, and now the PR also supports swig-extras and swig-extensions

I even added a test using swig-extras, putting it as a dependency in the dev-dependencies, i hope this is not a problem

@rtgibbons
Copy link
Owner

This looks awesome.

I've been neglecting this package b/c I don't use it any more. I'll try to spend a few hours and get everything updated and push out a shiny new release.

@rtgibbons
Copy link
Owner

Curious how this would work along side #24

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants