Reorganize file structure.
16
mkrfile.js
|
@ -60,7 +60,7 @@ module.exports = function (suite) {
|
||||||
var fs = require('fs');
|
var fs = require('fs');
|
||||||
var jshint = JSON.parse(fs.readFileSync('.jshintrc', 'utf8'));
|
var jshint = JSON.parse(fs.readFileSync('.jshintrc', 'utf8'));
|
||||||
|
|
||||||
$(src + '/_h5ai/js: **/*.js, ! lib/**')
|
$(src + '/_h5ai/public/js: **/*.js, ! lib/**')
|
||||||
.jshint(jshint, jshint.globals);
|
.jshint(jshint, jshint.globals);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -72,15 +72,15 @@ module.exports = function (suite) {
|
||||||
var mapSrc = $.map.p(src, build).s('.less', '.css').s('.jade', '');
|
var mapSrc = $.map.p(src, build).s('.less', '.css').s('.jade', '');
|
||||||
var mapRoot = $.map.p(root, path.join(build, '_h5ai'));
|
var mapRoot = $.map.p(root, path.join(build, '_h5ai'));
|
||||||
|
|
||||||
$(src + ': _h5ai/js/*.js')
|
$(src + ': _h5ai/public/js/*.js')
|
||||||
.newerThan(mapSrc, $(src + ': _h5ai/js/**'))
|
.newerThan(mapSrc, $(src + ': _h5ai/public/js/**'))
|
||||||
.includeit()
|
.includeit()
|
||||||
.if(!suite.args.uncompressed, function () { this.uglifyjs(); })
|
.if(!suite.args.uncompressed, function () { this.uglifyjs(); })
|
||||||
.wrap(header)
|
.wrap(header)
|
||||||
.write(mapSrc, true);
|
.write(mapSrc, true);
|
||||||
|
|
||||||
$(src + ': _h5ai/css/*.less')
|
$(src + ': _h5ai/public/css/*.less')
|
||||||
.newerThan(mapSrc, $(src + ': _h5ai/css/**'))
|
.newerThan(mapSrc, $(src + ': _h5ai/public/css/**'))
|
||||||
.includeit()
|
.includeit()
|
||||||
.less()
|
.less()
|
||||||
.autoprefixer()
|
.autoprefixer()
|
||||||
|
@ -93,7 +93,7 @@ module.exports = function (suite) {
|
||||||
.jade(env)
|
.jade(env)
|
||||||
.write(mapSrc, true);
|
.write(mapSrc, true);
|
||||||
|
|
||||||
$(src + ': **, ! _h5ai/js/**, ! _h5ai/css/**, ! **/*.jade')
|
$(src + ': **, ! _h5ai/public/js/**, ! _h5ai/public/css/**, ! **/*.jade')
|
||||||
.newerThan(mapSrc)
|
.newerThan(mapSrc)
|
||||||
.handlebars(env)
|
.handlebars(env)
|
||||||
.write(mapSrc, true);
|
.write(mapSrc, true);
|
||||||
|
@ -135,13 +135,13 @@ module.exports = function (suite) {
|
||||||
|
|
||||||
var env = {pkg: pkg};
|
var env = {pkg: pkg};
|
||||||
|
|
||||||
$(src + '/_h5ai/css/styles.less')
|
$(src + '/_h5ai/public/css/styles.less')
|
||||||
.includeit()
|
.includeit()
|
||||||
.less()
|
.less()
|
||||||
.autoprefixer()
|
.autoprefixer()
|
||||||
.write(build + '/test/h5ai-styles.css', true);
|
.write(build + '/test/h5ai-styles.css', true);
|
||||||
|
|
||||||
$(src + '/_h5ai/js/scripts.js')
|
$(src + '/_h5ai/public/js/scripts.js')
|
||||||
.includeit()
|
.includeit()
|
||||||
.write(build + '/test/h5ai-scripts.js', true);
|
.write(build + '/test/h5ai-scripts.js', true);
|
||||||
|
|
||||||
|
|
|
@ -1,27 +1,3 @@
|
||||||
Satisfy all
|
Satisfy all
|
||||||
Order allow,deny
|
Order deny,allow
|
||||||
Allow from all
|
Deny from all
|
||||||
|
|
||||||
DirectoryIndex disabled
|
|
||||||
|
|
||||||
<IfModule mod_autoindex.c>
|
|
||||||
Options -Indexes
|
|
||||||
</IfModule>
|
|
||||||
|
|
||||||
AddDefaultCharset utf-8
|
|
||||||
|
|
||||||
<IfModule mod_mime.c>
|
|
||||||
AddCharset utf-8 .css .html .js .json .php .svg
|
|
||||||
</IfModule>
|
|
||||||
|
|
||||||
<IfModule mod_expires.c>
|
|
||||||
ExpiresActive on
|
|
||||||
ExpiresDefault "access plus 1 month"
|
|
||||||
|
|
||||||
ExpiresByType text/html "access plus 0 seconds"
|
|
||||||
ExpiresByType application/json "access plus 0 seconds"
|
|
||||||
|
|
||||||
ExpiresByType text/css "access plus 1 week"
|
|
||||||
ExpiresByType application/javascript "access plus 1 week"
|
|
||||||
ExpiresByType image/x-icon "access plus 1 week"
|
|
||||||
</IfModule>
|
|
||||||
|
|
|
@ -102,14 +102,14 @@ class Setup {
|
||||||
$script_name = preg_replace('#^.*?//#', '/', $script_name);
|
$script_name = preg_replace('#^.*?//#', '/', $script_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->set('H5AI_HREF', Util::normalize_path(dirname($script_name), true));
|
$this->set('H5AI_HREF', Util::normalize_path(dirname(dirname($script_name)), true));
|
||||||
$this->set('H5AI_PATH', Util::normalize_path(dirname(dirname(dirname(dirname(__FILE__)))), false));
|
$this->set('H5AI_PATH', Util::normalize_path(dirname(dirname(dirname(dirname(__FILE__)))), false));
|
||||||
|
|
||||||
$this->set('ROOT_HREF', Util::normalize_path(dirname($this->get('H5AI_HREF')), true));
|
$this->set('ROOT_HREF', Util::normalize_path(dirname($this->get('H5AI_HREF')), true));
|
||||||
$this->set('ROOT_PATH', Util::normalize_path(dirname($this->get('H5AI_PATH')), false));
|
$this->set('ROOT_PATH', Util::normalize_path(dirname($this->get('H5AI_PATH')), false));
|
||||||
|
|
||||||
$this->set('PUBLIC_HREF', Util::normalize_path($this->get('H5AI_HREF') . '/', true));
|
$this->set('PUBLIC_HREF', Util::normalize_path($this->get('H5AI_HREF') . '/public/', true));
|
||||||
$this->set('PUBLIC_PATH', Util::normalize_path($this->get('H5AI_PATH') . '/', false));
|
$this->set('PUBLIC_PATH', Util::normalize_path($this->get('H5AI_PATH') . '/public/', false));
|
||||||
|
|
||||||
$this->set('INDEX_HREF', Util::normalize_path($this->get('PUBLIC_HREF') . '/index.php', false));
|
$this->set('INDEX_HREF', Util::normalize_path($this->get('PUBLIC_HREF') . '/index.php', false));
|
||||||
$this->set('CACHE_PUB_HREF', Util::normalize_path($this->get('PUBLIC_HREF') . '/cache', true));
|
$this->set('CACHE_PUB_HREF', Util::normalize_path($this->get('PUBLIC_HREF') . '/cache', true));
|
||||||
|
|
27
src/_h5ai/public/.htaccess
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
Satisfy all
|
||||||
|
Order allow,deny
|
||||||
|
Allow from all
|
||||||
|
|
||||||
|
DirectoryIndex disabled
|
||||||
|
|
||||||
|
<IfModule mod_autoindex.c>
|
||||||
|
Options -Indexes
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
AddDefaultCharset utf-8
|
||||||
|
|
||||||
|
<IfModule mod_mime.c>
|
||||||
|
AddCharset utf-8 .css .html .js .json .php .svg
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
<IfModule mod_expires.c>
|
||||||
|
ExpiresActive on
|
||||||
|
ExpiresDefault "access plus 1 month"
|
||||||
|
|
||||||
|
ExpiresByType text/html "access plus 0 seconds"
|
||||||
|
ExpiresByType application/json "access plus 0 seconds"
|
||||||
|
|
||||||
|
ExpiresByType text/css "access plus 1 week"
|
||||||
|
ExpiresByType application/javascript "access plus 1 week"
|
||||||
|
ExpiresByType image/x-icon "access plus 1 week"
|
||||||
|
</IfModule>
|
Before Width: | Height: | Size: 131 B After Width: | Height: | Size: 131 B |
Before Width: | Height: | Size: 140 B After Width: | Height: | Size: 140 B |
Before Width: | Height: | Size: 117 B After Width: | Height: | Size: 117 B |
Before Width: | Height: | Size: 228 B After Width: | Height: | Size: 228 B |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 115 B After Width: | Height: | Size: 115 B |
Before Width: | Height: | Size: 125 B After Width: | Height: | Size: 125 B |
Before Width: | Height: | Size: 148 B After Width: | Height: | Size: 148 B |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 260 B After Width: | Height: | Size: 260 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 636 B After Width: | Height: | Size: 636 B |
Before Width: | Height: | Size: 696 B After Width: | Height: | Size: 696 B |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 158 B After Width: | Height: | Size: 158 B |
Before Width: | Height: | Size: 130 B After Width: | Height: | Size: 130 B |
Before Width: | Height: | Size: 693 B After Width: | Height: | Size: 693 B |
Before Width: | Height: | Size: 150 B After Width: | Height: | Size: 150 B |
Before Width: | Height: | Size: 153 B After Width: | Height: | Size: 153 B |
Before Width: | Height: | Size: 163 B After Width: | Height: | Size: 163 B |
Before Width: | Height: | Size: 137 B After Width: | Height: | Size: 137 B |
Before Width: | Height: | Size: 175 B After Width: | Height: | Size: 175 B |
Before Width: | Height: | Size: 165 B After Width: | Height: | Size: 165 B |
Before Width: | Height: | Size: 130 B After Width: | Height: | Size: 130 B |
Before Width: | Height: | Size: 150 B After Width: | Height: | Size: 150 B |
Before Width: | Height: | Size: 241 B After Width: | Height: | Size: 241 B |
Before Width: | Height: | Size: 213 B After Width: | Height: | Size: 213 B |
Before Width: | Height: | Size: 217 B After Width: | Height: | Size: 217 B |
Before Width: | Height: | Size: 443 B After Width: | Height: | Size: 443 B |
Before Width: | Height: | Size: 331 B After Width: | Height: | Size: 331 B |
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 267 B After Width: | Height: | Size: 267 B |
Before Width: | Height: | Size: 255 B After Width: | Height: | Size: 255 B |
Before Width: | Height: | Size: 213 B After Width: | Height: | Size: 213 B |
Before Width: | Height: | Size: 253 B After Width: | Height: | Size: 253 B |
Before Width: | Height: | Size: 214 B After Width: | Height: | Size: 214 B |
Before Width: | Height: | Size: 217 B After Width: | Height: | Size: 217 B |
Before Width: | Height: | Size: 443 B After Width: | Height: | Size: 443 B |
Before Width: | Height: | Size: 217 B After Width: | Height: | Size: 217 B |
Before Width: | Height: | Size: 222 B After Width: | Height: | Size: 222 B |
Before Width: | Height: | Size: 213 B After Width: | Height: | Size: 213 B |
Before Width: | Height: | Size: 423 B After Width: | Height: | Size: 423 B |
Before Width: | Height: | Size: 213 B After Width: | Height: | Size: 213 B |
Before Width: | Height: | Size: 309 B After Width: | Height: | Size: 309 B |
Before Width: | Height: | Size: 224 B After Width: | Height: | Size: 224 B |
Before Width: | Height: | Size: 274 B After Width: | Height: | Size: 274 B |
Before Width: | Height: | Size: 239 B After Width: | Height: | Size: 239 B |
|
@ -8,5 +8,5 @@ if (!function_exists('version_compare') || version_compare(PHP_VERSION, MIN_PHP_
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once __DIR__ . '/private/php/class-bootstrap.php';
|
require_once __DIR__ . '/../private/php/class-bootstrap.php';
|
||||||
Bootstrap::run();
|
Bootstrap::run();
|