azproduction / lmd

LMD - JavaScript Module-Assembler for building better web applications :warning: Project is no longer supported :warning:
http://azproduction.ru/lmd/
MIT License
449 stars 27 forks source link

Add wrapper, regexp and banner options #189

Closed monolithed closed 10 years ago

monolithed commented 10 years ago

file.js

//  ...

Options

....
[{
      files: {
            to: ['**/*.html', '!to/**/*.html'],
      },
      wrapper: {
            prefix: '<script>',
            suffix: '</script>'
      },
      banner: 'Copyright ... <%= file %>'
      regexp: '<!--\\s*#include\\s*file\\s*=\\s*"\\s*[\\w.-]+\\s*"\\s*-->'
}]

file.html

<!-- #include file="file.js" -->

Result:

Copyright ... file.js

<script>
// ..code
</script>
azproduction commented 10 years ago

Sorry for late response. It sounds like you ask me to invent yet another Grunt or Gulp :)

Don't you try to use build systems to process files before assemble them with LMD?

monolithed commented 10 years ago

There're some cases in my workflow when I have to build the templates included script files. Now I think you're right is not for LMD :yum: .