├── .gitignore ├── .travis.yml ├── Gruntfile.js ├── LICENCE-MIT ├── README.md ├── in.html ├── package.json ├── tasks └── includereplace.js └── test ├── expected ├── copyFileToFile │ └── index.production.html ├── cwd │ └── index.html ├── docroot │ ├── css │ │ ├── print.css │ │ └── style.css │ ├── index.html │ └── pages │ │ └── about.html ├── exclusions │ └── included.html ├── globals │ └── test.html ├── globbing │ └── template.js ├── in.html ├── includes │ └── test.txt ├── lastMatch │ └── index.html ├── multisrc │ ├── js │ │ └── script.js │ └── lib │ │ ├── jquery.js │ │ └── underscore.js ├── multisrcdest │ ├── css │ │ ├── main.css │ │ └── normalize.css │ ├── html │ │ └── index.html │ └── js │ │ ├── main.js │ │ └── vendor │ │ └── jquery.js ├── parameterless │ └── test.txt ├── parameters │ └── test.html ├── prefixsuffix │ └── test.html ├── process │ └── test.coffee ├── regexp │ └── index.html ├── regexsafeprefixsuffix │ └── index.js └── types │ └── test.js ├── files ├── copyFileToFile │ └── index.html ├── cwd │ ├── inc │ │ └── header.html │ └── index.html ├── docroot │ ├── css │ │ ├── print.css │ │ └── style.css │ ├── inc │ │ └── styles.html │ ├── index.html │ └── pages │ │ └── about.html ├── exclusions │ ├── excluded.js │ └── included.html ├── globals │ └── test.html ├── globbing │ ├── dest │ │ ├── dest.js │ │ ├── dest2.js │ │ └── test │ │ │ └── dest3.js │ ├── dest4.js │ └── template.js ├── includes │ └── test.txt ├── lastMatch │ ├── header.inc.html │ └── index.html ├── multisrc │ ├── js │ │ ├── inc │ │ │ └── namespace.js │ │ └── script.js │ └── lib │ │ ├── jquery.js │ │ └── underscore.js ├── multisrcdest │ ├── css │ │ ├── main.css │ │ └── normalize.css │ ├── html │ │ ├── inc │ │ │ └── foo.html │ │ └── index.html │ └── js │ │ ├── main.js │ │ └── vendor │ │ └── jquery.js ├── parameterless │ ├── inc.txt │ └── test.txt ├── parameters │ ├── head.html │ ├── test.html │ └── title.html ├── prefixsuffix │ ├── inc │ │ └── foo.inc │ └── test.html ├── process │ ├── included.coffee │ └── test.coffee ├── regexp │ ├── body.html │ └── index.html ├── regexsafeprefixsuffix │ ├── foo.js │ └── index.js └── types │ ├── include.js │ └── test.js ├── global_includes ├── bar.txt ├── foo.txt └── sub │ └── foo.txt └── includereplace.js /.gitignore: -------------------------------------------------------------------------------- 1 | /dist 2 | /node_modules 3 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanshaw/grunt-include-replace/HEAD/.travis.yml -------------------------------------------------------------------------------- /Gruntfile.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanshaw/grunt-include-replace/HEAD/Gruntfile.js -------------------------------------------------------------------------------- /LICENCE-MIT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanshaw/grunt-include-replace/HEAD/LICENCE-MIT -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanshaw/grunt-include-replace/HEAD/README.md -------------------------------------------------------------------------------- /in.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanshaw/grunt-include-replace/HEAD/in.html -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanshaw/grunt-include-replace/HEAD/package.json -------------------------------------------------------------------------------- /tasks/includereplace.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanshaw/grunt-include-replace/HEAD/tasks/includereplace.js -------------------------------------------------------------------------------- /test/expected/copyFileToFile/index.production.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/expected/cwd/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanshaw/grunt-include-replace/HEAD/test/expected/cwd/index.html -------------------------------------------------------------------------------- /test/expected/docroot/css/print.css: -------------------------------------------------------------------------------- 1 | /* Print styles */ -------------------------------------------------------------------------------- /test/expected/docroot/css/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-size: 138em; 3 | } -------------------------------------------------------------------------------- /test/expected/docroot/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanshaw/grunt-include-replace/HEAD/test/expected/docroot/index.html -------------------------------------------------------------------------------- /test/expected/docroot/pages/about.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanshaw/grunt-include-replace/HEAD/test/expected/docroot/pages/about.html -------------------------------------------------------------------------------- /test/expected/exclusions/included.html: -------------------------------------------------------------------------------- 1 |

This file should be found in dist

-------------------------------------------------------------------------------- /test/expected/globals/test.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanshaw/grunt-include-replace/HEAD/test/expected/globals/test.html -------------------------------------------------------------------------------- /test/expected/globbing/template.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanshaw/grunt-include-replace/HEAD/test/expected/globbing/template.js -------------------------------------------------------------------------------- /test/expected/in.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanshaw/grunt-include-replace/HEAD/test/expected/in.html -------------------------------------------------------------------------------- /test/expected/includes/test.txt: -------------------------------------------------------------------------------- 1 | foo 2 | bar 3 | #foo{} -------------------------------------------------------------------------------- /test/expected/lastMatch/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanshaw/grunt-include-replace/HEAD/test/expected/lastMatch/index.html -------------------------------------------------------------------------------- /test/expected/multisrc/js/script.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanshaw/grunt-include-replace/HEAD/test/expected/multisrc/js/script.js -------------------------------------------------------------------------------- /test/expected/multisrc/lib/jquery.js: -------------------------------------------------------------------------------- 1 | /* jquery */ -------------------------------------------------------------------------------- /test/expected/multisrc/lib/underscore.js: -------------------------------------------------------------------------------- 1 | /* underscore.js */ -------------------------------------------------------------------------------- /test/expected/multisrcdest/css/main.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanshaw/grunt-include-replace/HEAD/test/expected/multisrcdest/css/main.css -------------------------------------------------------------------------------- /test/expected/multisrcdest/css/normalize.css: -------------------------------------------------------------------------------- 1 | /* normalize.css */ -------------------------------------------------------------------------------- /test/expected/multisrcdest/html/index.html: -------------------------------------------------------------------------------- 1 | bar 2 | bar -------------------------------------------------------------------------------- /test/expected/multisrcdest/js/main.js: -------------------------------------------------------------------------------- 1 | /* main.js */ -------------------------------------------------------------------------------- /test/expected/multisrcdest/js/vendor/jquery.js: -------------------------------------------------------------------------------- 1 | /* jquery.js */ -------------------------------------------------------------------------------- /test/expected/parameterless/test.txt: -------------------------------------------------------------------------------- 1 | Look ma, no local vars! 2 | Yes dear. -------------------------------------------------------------------------------- /test/expected/parameters/test.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanshaw/grunt-include-replace/HEAD/test/expected/parameters/test.html -------------------------------------------------------------------------------- /test/expected/prefixsuffix/test.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanshaw/grunt-include-replace/HEAD/test/expected/prefixsuffix/test.html -------------------------------------------------------------------------------- /test/expected/process/test.coffee: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanshaw/grunt-include-replace/HEAD/test/expected/process/test.coffee -------------------------------------------------------------------------------- /test/expected/regexp/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanshaw/grunt-include-replace/HEAD/test/expected/regexp/index.html -------------------------------------------------------------------------------- /test/expected/regexsafeprefixsuffix/index.js: -------------------------------------------------------------------------------- 1 | var foo = "bar" -------------------------------------------------------------------------------- /test/expected/types/test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanshaw/grunt-include-replace/HEAD/test/expected/types/test.js -------------------------------------------------------------------------------- /test/files/copyFileToFile/index.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/files/cwd/inc/header.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanshaw/grunt-include-replace/HEAD/test/files/cwd/inc/header.html -------------------------------------------------------------------------------- /test/files/cwd/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanshaw/grunt-include-replace/HEAD/test/files/cwd/index.html -------------------------------------------------------------------------------- /test/files/docroot/css/print.css: -------------------------------------------------------------------------------- 1 | /* Print styles */ -------------------------------------------------------------------------------- /test/files/docroot/css/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-size: 138em; 3 | } -------------------------------------------------------------------------------- /test/files/docroot/inc/styles.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanshaw/grunt-include-replace/HEAD/test/files/docroot/inc/styles.html -------------------------------------------------------------------------------- /test/files/docroot/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanshaw/grunt-include-replace/HEAD/test/files/docroot/index.html -------------------------------------------------------------------------------- /test/files/docroot/pages/about.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanshaw/grunt-include-replace/HEAD/test/files/docroot/pages/about.html -------------------------------------------------------------------------------- /test/files/exclusions/excluded.js: -------------------------------------------------------------------------------- 1 | // This file should not be found in dist -------------------------------------------------------------------------------- /test/files/exclusions/included.html: -------------------------------------------------------------------------------- 1 |

This file should be found in dist

-------------------------------------------------------------------------------- /test/files/globals/test.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanshaw/grunt-include-replace/HEAD/test/files/globals/test.html -------------------------------------------------------------------------------- /test/files/globbing/dest/dest.js: -------------------------------------------------------------------------------- 1 | var b = 2; -------------------------------------------------------------------------------- /test/files/globbing/dest/dest2.js: -------------------------------------------------------------------------------- 1 | var c = 3; 2 | //@@include('../dest4.js') -------------------------------------------------------------------------------- /test/files/globbing/dest/test/dest3.js: -------------------------------------------------------------------------------- 1 | var e = 5; -------------------------------------------------------------------------------- /test/files/globbing/dest4.js: -------------------------------------------------------------------------------- 1 | var d = 4; -------------------------------------------------------------------------------- /test/files/globbing/template.js: -------------------------------------------------------------------------------- 1 | var a = 1; 2 | //@@include('dest/**/*.js') -------------------------------------------------------------------------------- /test/files/includes/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanshaw/grunt-include-replace/HEAD/test/files/includes/test.txt -------------------------------------------------------------------------------- /test/files/lastMatch/header.inc.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanshaw/grunt-include-replace/HEAD/test/files/lastMatch/header.inc.html -------------------------------------------------------------------------------- /test/files/lastMatch/index.html: -------------------------------------------------------------------------------- 1 | @@include("header.inc.html") -------------------------------------------------------------------------------- /test/files/multisrc/js/inc/namespace.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanshaw/grunt-include-replace/HEAD/test/files/multisrc/js/inc/namespace.js -------------------------------------------------------------------------------- /test/files/multisrc/js/script.js: -------------------------------------------------------------------------------- 1 | "@@include('inc/namespace.js')" 2 | 3 | ns.getFoo = function() { 4 | return 'foo'; 5 | } -------------------------------------------------------------------------------- /test/files/multisrc/lib/jquery.js: -------------------------------------------------------------------------------- 1 | /* jquery */ -------------------------------------------------------------------------------- /test/files/multisrc/lib/underscore.js: -------------------------------------------------------------------------------- 1 | /* underscore.js */ -------------------------------------------------------------------------------- /test/files/multisrcdest/css/main.css: -------------------------------------------------------------------------------- 1 | @@include('normalize.css') 2 | 3 | body { 4 | /* Paint it black */ 5 | background: #000; 6 | } -------------------------------------------------------------------------------- /test/files/multisrcdest/css/normalize.css: -------------------------------------------------------------------------------- 1 | /* normalize.css */ -------------------------------------------------------------------------------- /test/files/multisrcdest/html/inc/foo.html: -------------------------------------------------------------------------------- 1 | bar -------------------------------------------------------------------------------- /test/files/multisrcdest/html/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanshaw/grunt-include-replace/HEAD/test/files/multisrcdest/html/index.html -------------------------------------------------------------------------------- /test/files/multisrcdest/js/main.js: -------------------------------------------------------------------------------- 1 | /* main.js */ -------------------------------------------------------------------------------- /test/files/multisrcdest/js/vendor/jquery.js: -------------------------------------------------------------------------------- 1 | /* jquery.js */ -------------------------------------------------------------------------------- /test/files/parameterless/inc.txt: -------------------------------------------------------------------------------- 1 | Look ma, no local vars! -------------------------------------------------------------------------------- /test/files/parameterless/test.txt: -------------------------------------------------------------------------------- 1 | @@include('inc.txt') 2 | Yes dear. -------------------------------------------------------------------------------- /test/files/parameters/head.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanshaw/grunt-include-replace/HEAD/test/files/parameters/head.html -------------------------------------------------------------------------------- /test/files/parameters/test.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanshaw/grunt-include-replace/HEAD/test/files/parameters/test.html -------------------------------------------------------------------------------- /test/files/parameters/title.html: -------------------------------------------------------------------------------- 1 | @@title - Test webpage -------------------------------------------------------------------------------- /test/files/prefixsuffix/inc/foo.inc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanshaw/grunt-include-replace/HEAD/test/files/prefixsuffix/inc/foo.inc -------------------------------------------------------------------------------- /test/files/prefixsuffix/test.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanshaw/grunt-include-replace/HEAD/test/files/prefixsuffix/test.html -------------------------------------------------------------------------------- /test/files/process/included.coffee: -------------------------------------------------------------------------------- 1 | class Module 2 | 3 | constructor: (@name) -> -------------------------------------------------------------------------------- /test/files/process/test.coffee: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanshaw/grunt-include-replace/HEAD/test/files/process/test.coffee -------------------------------------------------------------------------------- /test/files/regexp/body.html: -------------------------------------------------------------------------------- 1 | Check we allow closing braces in parameter strings: @@text -------------------------------------------------------------------------------- /test/files/regexp/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanshaw/grunt-include-replace/HEAD/test/files/regexp/index.html -------------------------------------------------------------------------------- /test/files/regexsafeprefixsuffix/foo.js: -------------------------------------------------------------------------------- 1 | var foo = "bar" -------------------------------------------------------------------------------- /test/files/regexsafeprefixsuffix/index.js: -------------------------------------------------------------------------------- 1 | /* @@ include("foo.js") */ -------------------------------------------------------------------------------- /test/files/types/include.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanshaw/grunt-include-replace/HEAD/test/files/types/include.js -------------------------------------------------------------------------------- /test/files/types/test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanshaw/grunt-include-replace/HEAD/test/files/types/test.js -------------------------------------------------------------------------------- /test/global_includes/bar.txt: -------------------------------------------------------------------------------- 1 | bar -------------------------------------------------------------------------------- /test/global_includes/foo.txt: -------------------------------------------------------------------------------- 1 | foo -------------------------------------------------------------------------------- /test/global_includes/sub/foo.txt: -------------------------------------------------------------------------------- 1 | #foo{} -------------------------------------------------------------------------------- /test/includereplace.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanshaw/grunt-include-replace/HEAD/test/includereplace.js --------------------------------------------------------------------------------