Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Logs
logs
*.log
npm-debug.log*

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directory
# https://docs.npmjs.com/misc/faq#should-i-check-my-node-modules-folder-into-git
node_modules
40 changes: 40 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,43 @@ Alexandria Plays
Web client-side code for the Alexandria Plays web project.

Note that this does not include the server side. For that, look at the projectplay-server project.

##Getting started

To get up and running with the new scripts optimization process.

**Install [node.js](http://nodejs.org)**

Once you have installed node.js in the base folder of the project run:

```
npm install
```

##Adding new javascript files to the project
If you add a new file to the project, you must add it to the files array in gulpfile.js at the top of the file.

```
var files = [ "js/jquery.js", "js/jquery-migrate.min.js", ...
];

```

##Compiling / Creating a single javascript file for the project

Whenever you change (or add) any of the script files in the files array, you will
to concatenate and uglify the file (this takes all the files in the files array
and merges them into a single file and then minifies them, this process makes
the files smaller and creates less HTTP requests to the site).

```
gulp scripts

```

To setup a process that will automatically recompile the javascript files everytime you edit them:


```
gulp watch
```
26 changes: 26 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
var gulp = require("gulp");

var concat = require("gulp-concat");
var uglify = require("gulp-uglify");
var rename = require("gulp-rename");
var watch = require("gulp-watch");


var files = [ "js/jquery.js", "js/jquery-migrate.min.js",
"js/modernizr.custom.06523.js", "js/site-wide.js", "js/wait-for-images.js",
"js/background-image.js", "js/jquery.form.min.js",
"js/jquery.simplemodal.1.4.4.min.js", "js/scripts.js", "js/playSvc.js",
"js/app.js", "js/initialize.js"];
// Concatenate & Minify JS
gulp.task('scripts', function() {
return gulp.src(files)
.pipe(concat('all-scripts.js'))
.pipe(gulp.dest('js'))
.pipe(rename('script.js'))
.pipe(uglify())
.pipe(gulp.dest('js'));
});

gulp.task('watch', function(){
return gulp.watch(files, ['scripts']);
});
Binary file modified img/1680.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/favicon.ico
Binary file not shown.
1,196 changes: 1,196 additions & 0 deletions js/all-scripts.js

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions js/initialize.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
var $ = jQuery;
var app;
$(document).ready(function() {
app = playApp();
app.initialize();
$(window).resize(app.rightSizeListView);
});

var year = new Date().getFullYear();
$("#copyright span").text(year);
7 changes: 7 additions & 0 deletions js/script.js

Large diffs are not rendered by default.

28 changes: 28 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "projectplay-web-client",
"version": "1.0.0",
"description": "This is the front end for novaplays.org.",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/robbiethegeek/projectplay-web-client.git"
},
"author": "",
"license": "ISC",
"bugs": {
"url": "https://github.com/robbiethegeek/projectplay-web-client/issues"
},
"homepage": "https://github.com/robbiethegeek/projectplay-web-client#readme",
"devDependencies": {
"gulp": "^3.9.0",
"gulp-concat": "^2.6.0",
"gulp-eslint": "^1.0.0",
"gulp-rename": "^1.2.2",
"gulp-sourcemaps": "^1.5.2",
"gulp-uglify": "^1.2.0",
"gulp-watch": "^4.3.4"
}
}
39 changes: 7 additions & 32 deletions redesign2.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=978">

<link rel="icon" href="./favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="./favicon.ico" type="image/x-icon">
<link rel="icon" href="img/favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon">

<title>Project Play Alexandria</title>

Expand Down Expand Up @@ -59,7 +59,7 @@
</header>

</div>
<!------------ displaying gallery page --------------------------->


<div id="content-wrap">

Expand All @@ -70,7 +70,7 @@
<div id="content-main-fade-in" style="opacity: 1;">

<div id="map_canvas"></div>
<div id="copyright">©2014&nbsp;Project Play Alexandria.&nbsp;All rights reserved.</div>
<div id="copyright">&copy;<span>2015</span>&nbsp;Project Play Alexandria.&nbsp;All rights reserved.</div>
</div>

</div>
Expand Down Expand Up @@ -177,36 +177,11 @@ <h3 id='detail_title'></h3>
</tr>
</table>-->
</div>
<!--
<div class="modal-footer">
<a href="#" class="btn">Close</a>
</div>
-->
</div>

</div>

<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery-migrate.min.js"></script>
<script type="text/javascript" src="js/modernizr.custom.06523.js"></script>
<script type="text/javascript" src="js/site-wide.js"></script>
<script type="text/javascript" src="js/wait-for-images.js"></script>
<script type="text/javascript" src="js/background-image.js"></script>
<script type="text/javascript" src="js/jquery.form.min.js"></script>
<script type="text/javascript" src="js/jquery.simplemodal.1.4.4.min.js"></script>
<script type="text/javascript" src="js/scripts.js"></script>
<script src="https://maps.googleapis.com/maps/api/js?sensor=false&libraries=places,geometry" ></script>
<script src ="js/playSvc.js"></script>
<script src="js/app.js" ></script>
<script>
var $ = jQuery;
var app;
$(document).ready(function() {
app = playApp();
app.initialize();
$(window).resize(app.rightSizeListView);
});
</script>

<script type="text/javascript" src="js/script.js"></script>

</body>
</html>
</html>