mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-29 06:25:18 -04:00
Update deps. Fix version string.
This commit is contained in:
parent
2e8ae301c5
commit
0e5b463acf
4 changed files with 12 additions and 6 deletions
9
ghu.js
9
ghu.js
|
@ -1,7 +1,7 @@
|
||||||
const {resolve, join} = require('path');
|
const {resolve, join} = require('path');
|
||||||
const {
|
const {
|
||||||
default: ghu,
|
ghu,
|
||||||
autoprefixer, cssmin, ife, includeit, jade, jszip,
|
autoprefixer, cssmin, each, ife, includeit, jade, jszip,
|
||||||
less, mapfn, newerThan, read, remove, run, uglify, watch, wrap, write
|
less, mapfn, newerThan, read, remove, run, uglify, watch, wrap, write
|
||||||
} = require('ghu');
|
} = require('ghu');
|
||||||
|
|
||||||
|
@ -88,6 +88,11 @@ ghu.task('build:copy', runtime => {
|
||||||
|
|
||||||
read(`${SRC}: **, ! **/*.js, ! **/*.less, ! **/*.jade, ! **/conf/*.json`)
|
read(`${SRC}: **, ! **/*.js, ! **/*.less, ! **/*.jade, ! **/conf/*.json`)
|
||||||
.then(newerThan(mapper))
|
.then(newerThan(mapper))
|
||||||
|
.then(each(obj => {
|
||||||
|
if (/index\.php$/.test(obj.source)) {
|
||||||
|
obj.content = obj.content.replace('{{VERSION}}', runtime.pkg.version);
|
||||||
|
}
|
||||||
|
}))
|
||||||
.then(write(mapper, {overwrite: true, cluster: true})),
|
.then(write(mapper, {overwrite: true, cluster: true})),
|
||||||
|
|
||||||
read(`${ROOT}/*.md`)
|
read(`${ROOT}/*.md`)
|
||||||
|
|
|
@ -16,11 +16,11 @@
|
||||||
"build": "npm run -s ghu release"
|
"build": "npm run -s ghu release"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"babel-core": "6.3.17",
|
"babel-core": "6.3.21",
|
||||||
"babel-eslint": "5.0.0-beta6",
|
"babel-eslint": "5.0.0-beta6",
|
||||||
"babel-preset-es2015": "6.3.13",
|
"babel-preset-es2015": "6.3.13",
|
||||||
"eslint": "1.10.3",
|
"eslint": "1.10.3",
|
||||||
"ghu": "0.2.2"
|
"ghu": "0.4.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=5.0.0"
|
"node": ">=5.0.0"
|
||||||
|
|
|
@ -75,7 +75,7 @@ class Setup {
|
||||||
private function add_app_metadata() {
|
private function add_app_metadata() {
|
||||||
|
|
||||||
$this->set('NAME', 'h5ai');
|
$this->set('NAME', 'h5ai');
|
||||||
$this->set('VERSION', '{{pkg.version}}');
|
$this->set('VERSION', H5AI_VERSION);
|
||||||
$this->set('FILE_PREFIX', '_h5ai');
|
$this->set('FILE_PREFIX', '_h5ai');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
define('MIN_PHP_VERSION', '5.4.0');
|
define('H5AI_VERSION', '{{VERSION}}');
|
||||||
|
define('MIN_PHP_VERSION', '5.5.0');
|
||||||
|
|
||||||
if (!function_exists('version_compare') || version_compare(PHP_VERSION, MIN_PHP_VERSION, '<')) {
|
if (!function_exists('version_compare') || version_compare(PHP_VERSION, MIN_PHP_VERSION, '<')) {
|
||||||
header('Content-type: text/plain;charset=utf-8');
|
header('Content-type: text/plain;charset=utf-8');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue