Skip to content

Commit

Permalink
Merge pull request #4 from yupmin-ct/upgrade-multi-upload
Browse files Browse the repository at this point in the history
upgrade for multi upload
  • Loading branch information
yupmin-ct committed Mar 29, 2016
2 parents 87b7e27 + 07d4fa3 commit 81808b6
Show file tree
Hide file tree
Showing 12 changed files with 658 additions and 410 deletions.
12 changes: 0 additions & 12 deletions .editorconfig

This file was deleted.

8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
vendor/
node_modules/
bower_components/
public/
resources/assets/js/
resources/assets/less/bootstrap/
resources/assets/less/font-awesome/
!public/index.php
resources/assets/js
resources/assets/less/*
!resources/assets/less/default.less
composer.lock
config.yml
24 changes: 19 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,27 @@
# Kollus CORS Upload

## Requirement
* php 5.3 above
* npm (of node 4.2 above)
* composer
* bower
* jQuery
* bootstrap : for site's theme

## How to use
Attach below code to page's footer.
```html
<!--[if lt IE 10]>
<script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
<![endif]-->
<!--[if (gte IE 10)|!(IE)]><!-->
<script src="//code.jquery.com/jquery-2.1.4.min.js"></script>
<!--<![endif]-->
<script src="assets/js/cors-upload.js"></script>
```

# How to develop or test

## Requirement
* php 5.3 above
* composer
* npm (of node 4.2 above)

### 1. Install composer

Expand All @@ -19,7 +34,6 @@ curl -sS https://getcomposer.org/installer | php
```bash
php composer.phar install
npm install
`npm bin`/bower install
`npm bin`/.bin/gulp
```

Expand Down
4 changes: 0 additions & 4 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,7 @@
"tests"
],
"dependencies": {
"bootstrap": "~3.3.6",
"font-awesome": "fontawesome#~4.4.0",
"jquery": "~2.1.4"
},
"devDependencies": {
"ua-parser-js": "~0.7.9"
}
}
83 changes: 28 additions & 55 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,60 +1,33 @@
var fs = require('fs'),
path = require('path'),
gulp = require('gulp'),
concat = require('gulp-concat'),
header = require('gulp-header'),
less = require('gulp-less'),
pkg = JSON.parse(
fs.readFileSync(path.resolve(__dirname, './package.json'))
),
banner = ['/**',
' * Copyright (c) <%= new Date().getFullYear() %>',
' * <%= pkg.name %> - <%= pkg.description %>',
' * Built on <%= (new Date).toISOString().slice(0,10) %>',
' * ',
' * @version <%= pkg.version %>',
' * @link <%= pkg.repository.url %>',
' * @license <%= pkg.license %>',
' */',
''].join('\n') + '\n';

gulp.task('copy', function() {
// Copy jQuery, Bootstrap, and FontAwesome
gulp.src("bower_components/jquery/dist/jquery.js")
.pipe(gulp.dest("resources/assets/js/"));

gulp.src("bower_components/bootstrap/less/**")
.pipe(gulp.dest("resources/assets/less/bootstrap"));

gulp.src("bower_components/bootstrap/dist/js/bootstrap.js")
.pipe(gulp.dest("resources/assets/js/"));

gulp.src("bower_components/bootstrap/dist/fonts/**")
.pipe(gulp.dest("public/assets/fonts"));

gulp.src("bower_components/font-awesome/less/**")
.pipe(gulp.dest("resources/assets/less/font-awesome"));

gulp.src("bower_components/font-awesome/fonts/**")
.pipe(gulp.dest("public/assets/fonts"));

gulp.src("bower_components/ua-parser-js/src/ua-parser.js")
.pipe(gulp.dest("resources/assets/js/"));
});
path = require('path'),
gulp = require('gulp'),
concat = require('gulp-concat'),
header = require('gulp-header'),
less = require('gulp-less'),
pkg = JSON.parse(
fs.readFileSync(path.resolve(__dirname, './package.json'))
),
banner = ['/**',
' * Copyright (c) <%= new Date().getFullYear() %>',
' * <%= pkg.name %> - <%= pkg.description %>',
' * Built on <%= (new Date).toISOString().slice(0,10) %>',
' * ',
' * @version <%= pkg.version %>',
' * @link <%= pkg.repository.url %>',
' * @license <%= pkg.license %>',
' */',
''].join('\n') + '\n';

gulp.task('concat', function () {
gulp.src([
'resources/assets/js/jquery.js',
'resources/assets/js/bootstrap.js',
'resources/assets/js/ua-parser.js',
])
.pipe(concat('default.js'))
.pipe(header(banner, { pkg: pkg }))
.pipe(gulp.dest('public/assets/js'));

gulp.src(['resources/assets/less/default.less'])
.pipe(less())
.pipe(gulp.dest('public/assets/css'));
gulp.src([
'src/cors-upload.js'
])
.pipe(header(banner, {pkg: pkg}))
.pipe(gulp.dest("public/assets/js/"));

gulp.src(['resources/assets/less/default.less'])
.pipe(less())
.pipe(gulp.dest('public/assets/css'));
});

gulp.task('default', ['copy', 'concat']);
gulp.task('default', ['concat']);
153 changes: 0 additions & 153 deletions index.php

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "kollus-cors-upload",
"version": "0.0.1",
"version": "0.1.0",
"description": "Kollus CORS Upload",
"main": "gulpfile.js",
"dependencies": {},
Expand Down
23 changes: 23 additions & 0 deletions public/assets/css/default.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
@import "//fonts.googleapis.com/css?family=Roboto:400,300";
body {
font-weight: 300;
}
#alert_message {
position: fixed;
bottom: 1em;
left: 0;
right: 0;
margin-left: auto;
margin-right: auto;
}
#alert_message .alert {
position: relative;
z-index: 9999;
width: 400px;
left: 0;
right: 0;
margin-left: auto;
margin-right: auto;
margin-bottom: 5px;
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}
Loading

0 comments on commit 81808b6

Please sign in to comment.