Browse Source

Bower support

master
Geoffrey Frogeye 4 years ago
parent
commit
8c32387f4a
6 changed files with 39 additions and 6 deletions
  1. +3
    -0
      .bowerrc
  2. +2
    -1
      .gitignore
  3. +3
    -3
      app.html
  4. +20
    -0
      bower.json
  5. +9
    -2
      gulpfile.js
  6. +2
    -0
      package.json

+ 3
- 0
.bowerrc View File

@@ -0,0 +1,3 @@
{
"directory" : "libs"
}

+ 2
- 1
.gitignore View File

@@ -1,2 +1,3 @@
out.js*
node_modules
node_modules/
libs/

+ 3
- 3
app.html View File

@@ -4,9 +4,9 @@
<head>
<meta charset=utf-8 />
<title>agario-webclient</title>
<script src="http://cdnjs.cloudflare.com/ajax/libs/pixi.js/3.0.6/pixi.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/dat-gui/0.5/dat.gui.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/stats.js/r11/Stats.js"></script>
<script src="libs/pixi.js/bin/pixi.js"></script>
<script src="libs/dat.gui/dat.gui.min.js"></script>
<script src="libs/stats.js/build/stats.min.js"></script>
<script src="out.js"></script>
<link rel="stylesheet" type="text/css" href="style.css">
</style>

+ 20
- 0
bower.json View File

@@ -0,0 +1,20 @@
{
"name": "agario-webclient",
"version": "0.0.0",
"homepage": "https://github.com/GeoffreyFrogeye/agario-webclient",
"authors": [
"Geoffrey Frogeye <geoffrey@frogeye.fr>"
],
"description": "Web-based agar.io client implementation with graphical display'",
"keywords": [
"agar.io",
"pixijs"
],
"license": "MIT",
"dependencies": {
"pixijs": "~1.3.0",
"dat.gui": "*",
"stats.js": "*",
"pixi.js": "~3.0.6"
}
}

+ 9
- 2
gulpfile.js View File

@@ -6,6 +6,7 @@ var gutil = require('gulp-util');
var uglify = require('gulp-uglify');
var sourcemaps = require('gulp-sourcemaps');
var reactify = require('reactify');
var bower = require('gulp-bower');

gulp.task('javascript', function () {
// set up the browserify instance on a task basis
@@ -13,7 +14,7 @@ gulp.task('javascript', function () {
entries: './script.js',
debug: true,
// defining transforms here will avoid crashing your stream
// transform: [reactify]
transform: [reactify]
});

return b.bundle()
@@ -27,4 +28,10 @@ gulp.task('javascript', function () {
.pipe(gulp.dest('./'));
});

gulp.task('default', ['javascript']);

gulp.task('bower', function() {
return bower()
.pipe(gulp.dest('libs/'));
});

gulp.task('default', ['javascript', 'bower']);

+ 2
- 0
package.json View File

@@ -6,8 +6,10 @@
"agario-client": "^0.0.8"
},
"devDependencies": {
"bower": "^1.4.1",
"browserify": "^10.2.4",
"gulp": "^3.9.0",
"gulp-bower": "0.0.10",
"gulp-sourcemaps": "^1.5.2",
"gulp-uglify": "^1.2.0",
"gulp-util": "^3.0.5",