Skip to content

Commit b0caeb3

Browse files
committed
1 parent 8dc1175 commit b0caeb3

File tree

6 files changed

+1008
-1
lines changed

6 files changed

+1008
-1
lines changed

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
'sinon', 'store', 'swfobject',
4141
'underscore', 'zepto', 'ztree', 'morris',
4242
'mathjs', 'list', 'zeroclipboard', 'bootstrap',
43-
'raphael', 'placeholders'
43+
'raphael', 'placeholders', 'keypress'
4444
]
4545

4646
var specs = []

keypress/Gruntfile.js

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
module.exports = function(grunt) {
2+
var pkg = grunt.file.readJSON('package.json');
3+
4+
grunt.initConfig({
5+
pkg: pkg,
6+
7+
download: {
8+
options: {
9+
dest: 'src',
10+
transform: function(code) {
11+
code = 'var keypress;\n' + code;
12+
code = 'define(function(require, exports, module) {\n' + code;
13+
code = code + 'module.exports = keypress;\n';
14+
code = code + '});'
15+
code = code.replace('window.keypress = {}', 'keypress = {}');
16+
return code;
17+
}
18+
},
19+
src: {
20+
url: 'https://raw.github.com/dmauro/Keypress/<%= pkg.version %>/keypress.js',
21+
name: 'keypress.js'
22+
}
23+
}
24+
});
25+
26+
grunt.loadGlobalTasks('spm-build');
27+
grunt.util._.merge(grunt.config.data, require('spm-build').config);
28+
29+
grunt.loadTasks('../_tasks/download/tasks');
30+
grunt.registerTask('build', ['download', 'spm-build']);
31+
32+
};
33+

0 commit comments

Comments
 (0)