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
Eugene Shen
todomvc
Commits
7bad15e6
Commit
7bad15e6
authored
Feb 10, 2015
by
Ed Chatelain
Committed by
Sindre Sorhus
Feb 10, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Close #1149 PR: Update the dojo example to use the new UI and npm..
parent
75fced04
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
614 additions
and
41 deletions
+614
-41
examples/dojo/.gitignore
examples/dojo/.gitignore
+15
-2
examples/dojo/bower.json
examples/dojo/bower.json
+0
-13
examples/dojo/bower_components/todomvc-common/bg.png
examples/dojo/bower_components/todomvc-common/bg.png
+0
-0
examples/dojo/index.html
examples/dojo/index.html
+4
-3
examples/dojo/js/main.js
examples/dojo/js/main.js
+3
-3
examples/dojo/node_modules/todomvc-app-css/index.css
examples/dojo/node_modules/todomvc-app-css/index.css
+394
-0
examples/dojo/node_modules/todomvc-common/base.css
examples/dojo/node_modules/todomvc-common/base.css
+141
-0
examples/dojo/node_modules/todomvc-common/base.js
examples/dojo/node_modules/todomvc-common/base.js
+27
-0
examples/dojo/package.json
examples/dojo/package.json
+16
-7
examples/dojo/profiles/todomvc.profile.js
examples/dojo/profiles/todomvc.profile.js
+6
-6
examples/dojo/readme.md
examples/dojo/readme.md
+3
-2
examples/dojo/test/intern.js
examples/dojo/test/intern.js
+5
-5
No files found.
examples/dojo/.gitignore
View file @
7bad15e6
bower_components
html-report
node_modules
out
js/lib/*
!js/lib/dojo
js/lib/dojo/*
!js/lib/dojo/dojo.js
node_modules/dijit/*
node_modules/dojo/*
node_modules/dojo-util/*
node_modules/util/*
node_modules/dojox/*
node_modules/intern/*
node_modules/.bin/*
node_modules/todomvc-app-css/*
!node_modules/todomvc-app-css/index.css
node_modules/todomvc-common/*
!node_modules/todomvc-common/base.css
!node_modules/todomvc-common/base.js
examples/dojo/bower.json
deleted
100644 → 0
View file @
75fced04
{
"name"
:
"todomvc-dojo"
,
"dependencies"
:
{
"todomvc-common"
:
"~0.3.0"
},
"devDependencies"
:
{
"dojo"
:
"~1.10.0"
,
"dijit"
:
"~1.10.0"
,
"dojox"
:
"~1.10.0"
,
"util"
:
"dojo/util#~1.10.0"
},
"private"
:
true
}
examples/dojo/bower_components/todomvc-common/bg.png
deleted
100644 → 0
View file @
75fced04
2.08 KB
examples/dojo/index.html
View file @
7bad15e6
...
...
@@ -8,7 +8,8 @@
display
:
none
;
}
</style>
<link
rel=
"stylesheet"
href=
"bower_components/todomvc-common/base.css"
>
<link
rel=
"stylesheet"
href=
"node_modules/todomvc-common/base.css"
>
<link
rel=
"stylesheet"
href=
"node_modules/todomvc-app-css/index.css"
>
</head>
<body>
<script
type=
"dojo/require"
>
...
...
@@ -74,10 +75,10 @@
</p>
<p>
Part of
<a
href=
"http://todomvc.com"
>
TodoMVC
</a></p>
</footer>
<script
src=
"
bower_component
s/todomvc-common/base.js"
></script>
<script
src=
"
node_module
s/todomvc-common/base.js"
></script>
<script
src=
"js/main.js"
></script>
<script
src=
"js/lib/dojo/dojo.js"
></script>
<!-- Use below instead of above line to use non-built version of Dojo components. -->
<!-- <script src="
bower_component
s/dojo/dojo.js"></script> -->
<!-- <script src="
node_module
s/dojo/dojo.js"></script> -->
</body>
</html>
examples/dojo/js/main.js
View file @
7bad15e6
...
...
@@ -11,15 +11,15 @@
packages
:
[
{
name
:
'
dojo
'
,
location
:
'
./
bower_component
s/dojo
'
location
:
'
./
node_module
s/dojo
'
},
{
name
:
'
dijit
'
,
location
:
'
./
bower_component
s/dijit
'
location
:
'
./
node_module
s/dijit
'
},
{
name
:
'
dojox
'
,
location
:
'
./
bower_component
s/dojox
'
location
:
'
./
node_module
s/dojox
'
},
{
name
:
'
todo
'
,
...
...
examples/dojo/
bower_components/todomvc-common/base
.css
→
examples/dojo/
node_modules/todomvc-app-css/index
.css
View file @
7bad15e6
This diff is collapsed.
Click to expand it.
examples/dojo/node_modules/todomvc-common/base.css
0 → 100644
View file @
7bad15e6
hr
{
margin
:
20px
0
;
border
:
0
;
border-top
:
1px
dashed
#c5c5c5
;
border-bottom
:
1px
dashed
#f7f7f7
;
}
.learn
a
{
font-weight
:
normal
;
text-decoration
:
none
;
color
:
#b83f45
;
}
.learn
a
:hover
{
text-decoration
:
underline
;
color
:
#787e7e
;
}
.learn
h3
,
.learn
h4
,
.learn
h5
{
margin
:
10px
0
;
font-weight
:
500
;
line-height
:
1.2
;
color
:
#000
;
}
.learn
h3
{
font-size
:
24px
;
}
.learn
h4
{
font-size
:
18px
;
}
.learn
h5
{
margin-bottom
:
0
;
font-size
:
14px
;
}
.learn
ul
{
padding
:
0
;
margin
:
0
0
30px
25px
;
}
.learn
li
{
line-height
:
20px
;
}
.learn
p
{
font-size
:
15px
;
font-weight
:
300
;
line-height
:
1.3
;
margin-top
:
0
;
margin-bottom
:
0
;
}
#issue-count
{
display
:
none
;
}
.quote
{
border
:
none
;
margin
:
20px
0
60px
0
;
}
.quote
p
{
font-style
:
italic
;
}
.quote
p
:before
{
content
:
'“'
;
font-size
:
50px
;
opacity
:
.15
;
position
:
absolute
;
top
:
-20px
;
left
:
3px
;
}
.quote
p
:after
{
content
:
'”'
;
font-size
:
50px
;
opacity
:
.15
;
position
:
absolute
;
bottom
:
-42px
;
right
:
3px
;
}
.quote
footer
{
position
:
absolute
;
bottom
:
-40px
;
right
:
0
;
}
.quote
footer
img
{
border-radius
:
3px
;
}
.quote
footer
a
{
margin-left
:
5px
;
vertical-align
:
middle
;
}
.speech-bubble
{
position
:
relative
;
padding
:
10px
;
background
:
rgba
(
0
,
0
,
0
,
.04
);
border-radius
:
5px
;
}
.speech-bubble
:after
{
content
:
''
;
position
:
absolute
;
top
:
100%
;
right
:
30px
;
border
:
13px
solid
transparent
;
border-top-color
:
rgba
(
0
,
0
,
0
,
.04
);
}
.learn-bar
>
.learn
{
position
:
absolute
;
width
:
272px
;
top
:
8px
;
left
:
-300px
;
padding
:
10px
;
border-radius
:
5px
;
background-color
:
rgba
(
255
,
255
,
255
,
.6
);
transition-property
:
left
;
transition-duration
:
500ms
;
}
@media
(
min-width
:
899px
)
{
.learn-bar
{
width
:
auto
;
padding-left
:
300px
;
}
.learn-bar
>
.learn
{
left
:
8px
;
}
}
examples/dojo/
bower_component
s/todomvc-common/base.js
→
examples/dojo/
node_module
s/todomvc-common/base.js
View file @
7bad15e6
/* global _ */
(
function
()
{
'
use strict
'
;
/* jshint ignore:start */
// Underscore's Template Module
// Courtesy of underscorejs.org
var
_
=
(
function
(
_
)
{
...
...
@@ -114,6 +116,7 @@
if
(
location
.
hostname
===
'
todomvc.com
'
)
{
window
.
_gaq
=
[[
'
_setAccount
'
,
'
UA-31081062-1
'
],[
'
_trackPageview
'
]];(
function
(
d
,
t
){
var
g
=
d
.
createElement
(
t
),
s
=
d
.
getElementsByTagName
(
t
)[
0
];
g
.
src
=
'
//www.google-analytics.com/ga.js
'
;
s
.
parentNode
.
insertBefore
(
g
,
s
)}(
document
,
'
script
'
));
}
/* jshint ignore:end */
function
redirect
()
{
if
(
location
.
hostname
===
'
tastejs.github.io
'
)
{
...
...
@@ -175,13 +178,17 @@
if
(
learnJSON
.
backend
)
{
this
.
frameworkJSON
=
learnJSON
.
backend
;
this
.
frameworkJSON
.
issueLabel
=
framework
;
this
.
append
({
backend
:
true
});
}
else
if
(
learnJSON
[
framework
])
{
this
.
frameworkJSON
=
learnJSON
[
framework
];
this
.
frameworkJSON
.
issueLabel
=
framework
;
this
.
append
();
}
this
.
fetchIssueCount
();
}
Learn
.
prototype
.
append
=
function
(
opts
)
{
...
...
@@ -212,6 +219,26 @@
document
.
body
.
insertAdjacentHTML
(
'
afterBegin
'
,
aside
.
outerHTML
);
};
Learn
.
prototype
.
fetchIssueCount
=
function
()
{
var
issueLink
=
document
.
getElementById
(
'
issue-count-link
'
);
if
(
issueLink
)
{
var
url
=
issueLink
.
href
.
replace
(
'
https://github.com
'
,
'
https://api.github.com/repos
'
);
var
xhr
=
new
XMLHttpRequest
();
xhr
.
open
(
'
GET
'
,
url
,
true
);
xhr
.
onload
=
function
(
e
)
{
var
parsedResponse
=
JSON
.
parse
(
e
.
target
.
responseText
);
if
(
parsedResponse
instanceof
Array
)
{
var
count
=
parsedResponse
.
length
if
(
count
!==
0
)
{
issueLink
.
innerHTML
=
'
This app has
'
+
count
+
'
open issues
'
;
document
.
getElementById
(
'
issue-count
'
).
style
.
display
=
'
inline
'
;
}
}
};
xhr
.
send
();
}
};
redirect
();
getFile
(
'
learn.json
'
,
Learn
);
})();
examples/dojo/package.json
View file @
7bad15e6
{
"devDependencies"
:
{
"intern"
:
"^2.2.2"
},
"scripts"
:
{
"test"
:
"node node_modules/intern/bin/intern-runner.js config=test/intern reporters=runner reporters=lcovhtml"
}
}
"private"
:
true
,
"dependencies"
:
{
"todomvc-app-css"
:
"^1.0.0"
,
"todomvc-common"
:
"^1.0.1"
,
"dojo"
:
"1.10.2"
,
"dijit"
:
"git://github.com/dojo/dijit.git#1.10.2"
,
"dojox"
:
"git://github.com/dojo/dojox.git#1.10.2"
,
"util"
:
"git://github.com/dojo/util.git#1.10.2"
},
"devDependencies"
:
{
"intern"
:
"^2.2.2"
},
"scripts"
:
{
"test"
:
"node node_modules/intern/bin/intern-runner.js config=test/intern reporters=runner reporters=lcovhtml"
}
}
\ No newline at end of file
examples/dojo/profiles/todomvc.profile.js
View file @
7bad15e6
// Dojo build profile for TodoMVC.
// Usage:
// > cd /path/to/todomvc/examples/dojo
// >
bower
install
// > ./
bower_components/
util/buildscripts/build.sh --profile ./profiles/todomvc.profile.js --release
// >
npm
install
// > ./
node_modules/dojo-
util/buildscripts/build.sh --profile ./profiles/todomvc.profile.js --release
/*jshint unused:false*/
var
profile
=
{
...
...
@@ -20,15 +20,15 @@ var profile = {
packages
:
[
{
name
:
'
dojo
'
,
location
:
'
../
bower_component
s/dojo
'
location
:
'
../
node_module
s/dojo
'
},
{
name
:
'
dijit
'
,
location
:
'
../
bower_component
s/dijit
'
location
:
'
../
node_module
s/dijit
'
},
{
name
:
'
dojox
'
,
location
:
'
../
bower_component
s/dojox
'
location
:
'
../
node_module
s/dojox
'
}
],
...
...
@@ -64,7 +64,7 @@ var profile = {
},
staticHasFeatures
:
{
'
dojo-sync-loader
'
:
false
,
'
dojo-sync-loader
'
:
false
},
selectorEngine
:
'
lite
'
,
...
...
examples/dojo/readme.md
View file @
7bad15e6
...
...
@@ -32,8 +32,9 @@ To do so, do the following. You need either java or node on your system to run t
```
cd /path/to/todomvc/examples/dojo
bower install
./bower_components/util/buildscripts/build.sh --profile ./profiles/todomvc.profile.js --release
npm install
mv ./node_modules/dojo-util ./node_modules/util
./node_modules/util/buildscripts/build.sh --profile ./profiles/todomvc.profile.js --release
```
...
...
examples/dojo/test/intern.js
View file @
7bad15e6
...
...
@@ -23,15 +23,15 @@ define((function (global) {
packages
:
[
{
name
:
'
dojo
'
,
location
:
'
./
bower_component
s/dojo
'
location
:
'
./
node_module
s/dojo
'
},
{
name
:
'
dijit
'
,
location
:
'
./
bower_component
s/dijit
'
location
:
'
./
node_module
s/dijit
'
},
{
name
:
'
dojox
'
,
location
:
'
./
bower_component
s/dojox
'
location
:
'
./
node_module
s/dojox
'
},
{
name
:
'
todo
'
,
...
...
@@ -54,7 +54,7 @@ define((function (global) {
useLoader
:
{
'
host-node
'
:
'
dojo/dojo
'
,
'
host-browser
'
:
'
../../
bower_component
s/dojo/dojo.js
'
'
host-browser
'
:
'
../../
node_module
s/dojo/dojo.js
'
},
proxyPort
:
9000
,
...
...
@@ -84,6 +84,6 @@ define((function (global) {
suites
:
[
'
test/all
'
],
excludeInstrumentation
:
/^
(
bower_components|
node_modules|test
)
/
excludeInstrumentation
:
/^
(
node_modules|test
)
/
};
})(
this
));
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