Updating the version of jQuery. Got Require working, sort-of.
This commit is contained in:
parent
70059e4ed5
commit
064ebe5831
|
@ -7,6 +7,7 @@
|
|||
npm-debug.log
|
||||
node_modules/*
|
||||
dist/*
|
||||
dist-compiled/*
|
||||
src/*.html
|
||||
src/*.js
|
||||
src/*.css
|
||||
|
|
11
grunt.js
11
grunt.js
|
@ -71,11 +71,11 @@ module.exports = function(grunt) {
|
|||
}
|
||||
},
|
||||
requirejs: {
|
||||
dir: 'dist',
|
||||
appDir: 'src',
|
||||
dir: 'dist-compiled',
|
||||
appDir: 'dist',
|
||||
baseUrl: '.',
|
||||
paths: {
|
||||
jquery : './libs/jquery',
|
||||
jquery : '../libs/jquery/jquery-1.7.2',
|
||||
},
|
||||
pragmas: {
|
||||
doExclude: true
|
||||
|
@ -123,8 +123,9 @@ module.exports = function(grunt) {
|
|||
});
|
||||
|
||||
grunt.registerHelper('templatize', function(src, dest, done) {
|
||||
var file = grunt.file.read(src);
|
||||
console.log('define(' + _und.template(file).source + ');');
|
||||
var file = grunt.file.read(src),
|
||||
out = path.basename(src, '.html');
|
||||
grunt.file.write(path.join(dest, out + '.js'), 'define(' + _und.template(file).source + ');')
|
||||
done();
|
||||
});
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -7,7 +7,7 @@
|
|||
%link{:rel => "stylesheet", :href => "style.css", :type => "text/css"}/
|
||||
%link{:rel => "shortcut icon", :type => "image/x-icon", :href => "images/favicon.ico"}/
|
||||
%link{:rel => "shortcut icon", :type => "image/png", :href => "images/favicon.png"}/
|
||||
%script{:language => "javascript", :type => "text/javascript", :src => "prioritize.js", "data-main" => "prioritize"}
|
||||
%script{:language => "javascript", :type => "text/javascript", :src => "require.js", "data-main" => "priority"}
|
||||
%title Priority / Ignore
|
||||
|
||||
%body
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
require ['jquery', 'priority_tmpl'], ($, priority_template, new_priority_template, help_template) ->
|
||||
require.config
|
||||
paths:
|
||||
'jquery': 'libs/jquery-1.7.2'
|
||||
|
||||
require ['jquery', 'priority_tmpl'], ($, priority_template) ->
|
||||
|
||||
class Prioritize
|
||||
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
%ul.priorities
|
||||
<% var i,l,p; for(i=0,l=priorities.length;i<l;++i) { p=priorities[i]; %>
|
||||
%li.task
|
||||
.taskc <%= p.name %>
|
||||
<% } %>
|
Loading…
Reference in New Issue