Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

10 steps away from developing own templater

  • Loading branch information...
commit 90ac99c436b95da5ee2fab634396a0182a309c2d 1 parent 1b66078
@twolfson twolfson authored
View
1  .gitignore
@@ -0,0 +1 @@
+/node_modules/
View
16 grunt.js
@@ -10,6 +10,10 @@ module.exports = function(grunt) {
'* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' +
' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> */'
},
+ template: {
+ 'stage/jqueryp.js': 'jqueryp.js',
+ 'stage/require_chainer.js': 'require_chainer.js'
+ },
concat: {
dist: {
src: ['<banner:meta.banner>', '<file_strip_banner:lib/<%= pkg.name %>.js>'],
@@ -50,9 +54,19 @@ module.exports = function(grunt) {
module: false
}
},
- uglify: {}
+ uglify: {},
+ mustache: {
+ 'filesAsVariables': {
+ 'jquery': 'lib/jqueryp.js',
+ 'require_chainer': 'lib/require_chainer.js'
+ }
+ }
});
+ // grumble grumble, why is nothing ever what I want/need =(
+ // TODO: Open source/contribute this
+ grunt.registerMultiTask('template', function (
+
// Default task.
grunt.registerTask('default', 'lint test concat min');
View
0  lib/require.chainer.js → lib/require_chainer.js
File renamed without changes
View
5 lib/templates/require.mustache
@@ -0,0 +1,5 @@
+define(['jquery'], function ($) {
+ {{jqueryp}}
+
+ {{require_chainer}}
+});
View
3  lib/templates/vanilla.mustache
@@ -0,0 +1,3 @@
+(function ($, undefined) {
+ {{jquery}}
+}(window.jQuery));
View
12 package.json
@@ -28,8 +28,16 @@
"scripts": {
"test": "grunt test"
},
+ "dependencies": {
+ }
"devDependencies": {
"grunt": "~0.3.17"
},
- "keywords": []
-}
+ "keywords": [
+ "jquery",
+ "plugin",
+ "jqueryp",
+ "module",
+ "require"
+ ]
+}
Please sign in to comment.
Something went wrong with that request. Please try again.