Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
todomvc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Sven Franck
todomvc
Commits
410b0357
Commit
410b0357
authored
Feb 01, 2015
by
Arthur Verschaeve
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Switch the jQuery example over to NPM
parent
0cb634d0
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
330 additions
and
307 deletions
+330
-307
examples/jquery/.gitignore
examples/jquery/.gitignore
+11
-11
examples/jquery/index.html
examples/jquery/index.html
+6
-6
examples/jquery/node_modules/director/build/director.js
examples/jquery/node_modules/director/build/director.js
+34
-28
examples/jquery/node_modules/handlebars/dist/handlebars.js
examples/jquery/node_modules/handlebars/dist/handlebars.js
+0
-0
examples/jquery/node_modules/jquery/dist/jquery.js
examples/jquery/node_modules/jquery/dist/jquery.js
+277
-262
examples/jquery/node_modules/todomvc-app-css/index.css
examples/jquery/node_modules/todomvc-app-css/index.css
+0
-0
examples/jquery/node_modules/todomvc-common/base.css
examples/jquery/node_modules/todomvc-common/base.css
+0
-0
examples/jquery/node_modules/todomvc-common/base.js
examples/jquery/node_modules/todomvc-common/base.js
+0
-0
examples/jquery/package.json
examples/jquery/package.json
+2
-0
No files found.
examples/jquery/.gitignore
View file @
410b0357
bower_component
s/jquery
!
bower_component
s/jquery/dist/jquery.js
node_module
s/jquery
!
node_module
s/jquery/dist/jquery.js
bower_component
s/director
!
bower_component
s/director/build/director.js
node_module
s/director
!
node_module
s/director/build/director.js
bower_component
s/handlebars
!
bower_component
s/handlebars/handlebars.js
node_module
s/handlebars
!
node_module
s/handlebars/handlebars.js
bower_component
s/todomvc-app-css
!
bower_component
s/todomvc-app-css/index.css
node_module
s/todomvc-app-css
!
node_module
s/todomvc-app-css/index.css
bower_component
s/todomvc-common
!
bower_component
s/todomvc-common/base.js
!
bower_component
s/todomvc-common/base.css
node_module
s/todomvc-common
!
node_module
s/todomvc-common/base.js
!
node_module
s/todomvc-common/base.css
examples/jquery/index.html
View file @
410b0357
...
...
@@ -3,8 +3,8 @@
<head>
<meta
charset=
"utf-8"
>
<title>
jQuery • TodoMVC
</title>
<link
rel=
"stylesheet"
href=
"
bower_component
s/todomvc-common/base.css"
>
<link
rel=
"stylesheet"
href=
"
bower_component
s/todomvc-app-css/index.css"
>
<link
rel=
"stylesheet"
href=
"
node_module
s/todomvc-common/base.css"
>
<link
rel=
"stylesheet"
href=
"
node_module
s/todomvc-app-css/index.css"
>
<link
rel=
"stylesheet"
href=
"css/app.css"
>
</head>
<body>
...
...
@@ -52,10 +52,10 @@
<
/ul
>
{{
#
if
completedTodos
}}
<
button
id
=
"
clear-completed
"
>
Clear
completed
({{
completedTodos
}})
<
/button>{{/i
f
}}
</script>
<script
src=
"
bower_component
s/todomvc-common/base.js"
></script>
<script
src=
"
bower_component
s/jquery/dist/jquery.js"
></script>
<script
src=
"
bower_components/handlebars
/handlebars.js"
></script>
<script
src=
"
bower_component
s/director/build/director.js"
></script>
<script
src=
"
node_module
s/todomvc-common/base.js"
></script>
<script
src=
"
node_module
s/jquery/dist/jquery.js"
></script>
<script
src=
"
node_modules/handlebars/dist
/handlebars.js"
></script>
<script
src=
"
node_module
s/director/build/director.js"
></script>
<script
src=
"js/app.js"
></script>
</body>
</html>
examples/jquery/
bower_component
s/director/build/director.js
→
examples/jquery/
node_module
s/director/build/director.js
View file @
410b0357
//
// Generated on
Fri Dec 27 2013 12:02:11 GMT-0500 (EST) by Nodejitsu, Inc
(Using Codesurgeon).
// Version 1.2.
2
// Generated on
Tue Dec 16 2014 12:13:47 GMT+0100 (CET) by Charlie Robbins, Paolo Fragomeni & the Contributors
(Using Codesurgeon).
// Version 1.2.
6
//
(
function
(
exports
)
{
...
...
@@ -10,29 +10,11 @@
/*
* browser.js: Browser specific functionality for director.
*
* (C) 2011,
Nodejitsu Inc
.
* (C) 2011,
Charlie Robbins, Paolo Fragomeni, & the Contributors
.
* MIT LICENSE
*
*/
if
(
!
Array
.
prototype
.
filter
)
{
Array
.
prototype
.
filter
=
function
(
filter
,
that
)
{
var
other
=
[],
v
;
for
(
var
i
=
0
,
n
=
this
.
length
;
i
<
n
;
i
++
)
{
if
(
i
in
this
&&
filter
.
call
(
that
,
v
=
this
[
i
],
i
,
this
))
{
other
.
push
(
v
);
}
}
return
other
;
};
}
if
(
!
Array
.
isArray
){
Array
.
isArray
=
function
(
obj
)
{
return
Object
.
prototype
.
toString
.
call
(
obj
)
===
'
[object Array]
'
;
};
}
var
dloc
=
document
.
location
;
function
dlocHashEmpty
()
{
...
...
@@ -196,7 +178,8 @@ var Router = exports.Router = function (routes) {
};
Router
.
prototype
.
init
=
function
(
r
)
{
var
self
=
this
;
var
self
=
this
,
routeTo
;
this
.
handler
=
function
(
onChangeEvent
)
{
var
newURL
=
onChangeEvent
&&
onChangeEvent
.
newURL
||
window
.
location
.
hash
;
var
url
=
self
.
history
===
true
?
self
.
getPath
()
:
newURL
.
replace
(
/.*#/
,
''
);
...
...
@@ -213,9 +196,16 @@ Router.prototype.init = function (r) {
}
}
else
{
var
routeTo
=
dlocHashEmpty
()
&&
r
?
r
:
!
dlocHashEmpty
()
?
dloc
.
hash
.
replace
(
/^#/
,
''
)
:
null
;
if
(
routeTo
)
{
window
.
history
.
replaceState
({},
document
.
title
,
routeTo
);
if
(
this
.
convert_hash_in_init
)
{
// Use hash as route
routeTo
=
dlocHashEmpty
()
&&
r
?
r
:
!
dlocHashEmpty
()
?
dloc
.
hash
.
replace
(
/^#/
,
''
)
:
null
;
if
(
routeTo
)
{
window
.
history
.
replaceState
({},
document
.
title
,
routeTo
);
}
}
else
{
// Use canonical url
routeTo
=
this
.
getPath
();
}
// Router has been initialized, but due to the chrome bug it will not
...
...
@@ -351,7 +341,7 @@ function paramifyString(str, params, mod) {
}
}
}
return
mod
===
str
?
"
([._a-zA-Z0-9-]+)
"
:
mod
;
return
mod
===
str
?
"
([._a-zA-Z0-9-
%()
]+)
"
:
mod
;
}
function
regifyString
(
str
,
params
)
{
...
...
@@ -397,6 +387,8 @@ function terminator(routes, delimiter, start, stop) {
return
routes
;
}
var
QUERY_SEPARATOR
=
/
\?
.*/
;
Router
.
prototype
.
configure
=
function
(
options
)
{
options
=
options
||
{};
for
(
var
i
=
0
;
i
<
this
.
methods
.
length
;
i
++
)
{
...
...
@@ -410,6 +402,7 @@ Router.prototype.configure = function(options) {
this
.
resource
=
options
.
resource
;
this
.
history
=
options
.
html5history
&&
this
.
historySupport
||
false
;
this
.
run_in_init
=
this
.
history
===
true
&&
options
.
run_handler_in_init
!==
false
;
this
.
convert_hash_in_init
=
this
.
history
===
true
&&
options
.
convert_hash_in_init
!==
false
;
this
.
every
=
{
after
:
options
.
after
||
null
,
before
:
options
.
before
||
null
,
...
...
@@ -426,6 +419,7 @@ Router.prototype.param = function(token, matcher) {
this
.
params
[
token
]
=
function
(
str
)
{
return
str
.
replace
(
compiled
,
matcher
.
source
||
matcher
);
};
return
this
;
};
Router
.
prototype
.
on
=
Router
.
prototype
.
route
=
function
(
method
,
path
,
route
)
{
...
...
@@ -453,8 +447,20 @@ Router.prototype.on = Router.prototype.route = function(method, path, route) {
this
.
insert
(
method
,
this
.
scope
.
concat
(
path
),
route
);
};
Router
.
prototype
.
path
=
function
(
path
,
routesFn
)
{
var
self
=
this
,
length
=
this
.
scope
.
length
;
if
(
path
.
source
)
{
path
=
path
.
source
.
replace
(
/
\\\/
/ig
,
"
/
"
);
}
path
=
path
.
split
(
new
RegExp
(
this
.
delimiter
));
path
=
terminator
(
path
,
this
.
delimiter
);
this
.
scope
=
this
.
scope
.
concat
(
path
);
routesFn
.
call
(
this
,
this
);
this
.
scope
.
splice
(
length
,
path
.
length
);
};
Router
.
prototype
.
dispatch
=
function
(
method
,
path
,
callback
)
{
var
self
=
this
,
fns
=
this
.
traverse
(
method
,
path
,
this
.
routes
,
""
),
invoked
=
this
.
_invoked
,
after
;
var
self
=
this
,
fns
=
this
.
traverse
(
method
,
path
.
replace
(
QUERY_SEPARATOR
,
""
)
,
this
.
routes
,
""
),
invoked
=
this
.
_invoked
,
after
;
this
.
_invoked
=
true
;
if
(
!
fns
||
fns
.
length
===
0
)
{
this
.
last
=
[];
...
...
@@ -495,7 +501,7 @@ Router.prototype.invoke = function(fns, thisArg, callback) {
if
(
Array
.
isArray
(
fn
))
{
return
_asyncEverySeries
(
fn
,
apply
,
next
);
}
else
if
(
typeof
fn
==
"
function
"
)
{
fn
.
apply
(
thisArg
,
fns
.
captures
.
concat
(
next
));
fn
.
apply
(
thisArg
,
(
fns
.
captures
||
[])
.
concat
(
next
));
}
};
_asyncEverySeries
(
fns
,
apply
,
function
()
{
...
...
examples/jquery/
bower_components/handlebars
/handlebars.js
→
examples/jquery/
node_modules/handlebars/dist
/handlebars.js
View file @
410b0357
File moved
examples/jquery/
bower_component
s/jquery/dist/jquery.js
→
examples/jquery/
node_module
s/jquery/dist/jquery.js
View file @
410b0357
This diff is collapsed.
Click to expand it.
examples/jquery/
bower_component
s/todomvc-app-css/index.css
→
examples/jquery/
node_module
s/todomvc-app-css/index.css
View file @
410b0357
File moved
examples/jquery/
bower_component
s/todomvc-common/base.css
→
examples/jquery/
node_module
s/todomvc-common/base.css
View file @
410b0357
File moved
examples/jquery/
bower_component
s/todomvc-common/base.js
→
examples/jquery/
node_module
s/todomvc-common/base.js
View file @
410b0357
File moved
examples/jquery/
bower
.json
→
examples/jquery/
package
.json
View file @
410b0357
{
"name"
:
"todomvc-jquery"
,
"description"
:
"TodoMVC implementation in Ampersand.js"
,
"private"
:
true
,
"dependencies"
:
{
"todomvc-common"
:
"~1.0.1"
,
"todomvc-app-css"
:
"~1.0.1"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment