Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
bower_randomizer
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Evgeny
bower_randomizer
Commits
c749fcc1
Commit
c749fcc1
authored
Jul 17, 2015
by
missingdays
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add randomizer module
parent
ce5d0ea3
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
71 additions
and
0 deletions
+71
-0
index.html
index.html
+13
-0
config.js
scripts/config.js
+10
-0
main.js
scripts/main.js
+10
-0
main.js
scripts/randomizer/main.js
+18
-0
main.js
scripts/randomizer/module1/main.js
+10
-0
main.js
scripts/randomizer/module2/main.js
+10
-0
No files found.
index.html
0 → 100644
View file @
c749fcc1
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"utf-8"
/>
<script
scr=
"scripts/config.js"
></script>
<script
data-main=
"scripts/main"
src=
"scripts/require.js"
></script>
<title>
Index
</title>
</head>
<body>
</body>
</html>
scripts/config.js
0 → 100644
View file @
c749fcc1
/*
* config.js
* Copyright (C) 2015 missingdays <missingdays@missingdays>
*
* Distributed under terms of the MIT license.
*/
var
require
=
{
baseUrl
:
'scripts'
}
scripts/main.js
0 → 100644
View file @
c749fcc1
/*
* main.js
* Copyright (C) 2015 missingdays <missingdays@missingdays>
*
* Distributed under terms of the MIT license.
*/
require
([
'scripts/randomizer/main.js'
],
function
(
randomizer
){
document
.
write
(
randomizer
()
+
" is loaded"
);
});
scripts/randomizer/main.js
0 → 100644
View file @
c749fcc1
/*
* main.js
* Copyright (C) 2015 missingdays <missingdays@missingdays>
*
* Distributed under terms of the MIT license.
*/
define
([
'../../randomizer/module1/main'
,
'../../randomizer/module2/main'
],
function
(
module1
,
module2
){
return
function
()
{
if
(
Math
.
random
()
>
0.5
)
{
return
module1
.
name
;
}
else
{
return
module2
.
name
;
}
}
});
scripts/randomizer/module1/main.js
0 → 100644
View file @
c749fcc1
/*
* module1.js
* Copyright (C) 2015 missingdays <missingdays@missingdays>
*
* Distributed under terms of the MIT license.
*/
define
({
name
:
'Module 1'
});
scripts/randomizer/module2/main.js
0 → 100644
View file @
c749fcc1
/*
* module2.js
* Copyright (C) 2015 missingdays <missingdays@missingdays>
*
* Distributed under terms of the MIT license.
*/
define
({
name
:
'Module 2'
});
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