mirror of
https://github.com/GenZmeY/casper-i18n.git
synced 2024-11-12 19:38:04 +00:00
Clean up build tasks
This commit is contained in:
parent
1214676bd5
commit
b7a788f973
43
gulpfile.js
43
gulpfile.js
@ -1,15 +1,10 @@
|
|||||||
var gulp = require('gulp');
|
var gulp = require('gulp');
|
||||||
|
|
||||||
// gulp plugins and utils
|
// gulp plugins and utils
|
||||||
var csscomb = require('gulp-csscomb');
|
|
||||||
var del = require('del');
|
|
||||||
var extReplace = require('gulp-ext-replace');
|
|
||||||
var gutil = require('gulp-util');
|
var gutil = require('gulp-util');
|
||||||
var livereload = require('gulp-livereload');
|
var livereload = require('gulp-livereload');
|
||||||
var nodemon = require('gulp-nodemon');
|
var nodemon = require('gulp-nodemon');
|
||||||
var postcss = require('gulp-postcss');
|
var postcss = require('gulp-postcss');
|
||||||
var replace = require('gulp-replace');
|
|
||||||
var svgmin = require('gulp-svgmin');
|
|
||||||
var sourcemaps = require('gulp-sourcemaps');
|
var sourcemaps = require('gulp-sourcemaps');
|
||||||
|
|
||||||
// postcss plugins
|
// postcss plugins
|
||||||
@ -27,16 +22,9 @@ var swallowError = function swallowError(error) {
|
|||||||
|
|
||||||
var nodemonServerInit = function () {
|
var nodemonServerInit = function () {
|
||||||
livereload.listen(1234);
|
livereload.listen(1234);
|
||||||
|
|
||||||
return nodemon({
|
|
||||||
ignore: ['gulpfile.js', 'assets/', 'public/', 'cachefiles/', 'locales/']
|
|
||||||
}).on('restart', function () {
|
|
||||||
gulp.src('app.js')
|
|
||||||
.pipe(livereload());
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
gulp.task('build', ['css', 'icons'], function (/* cb */) {
|
gulp.task('build', ['css'], function (/* cb */) {
|
||||||
return nodemonServerInit();
|
return nodemonServerInit();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -57,37 +45,8 @@ gulp.task('css', function () {
|
|||||||
.pipe(livereload());
|
.pipe(livereload());
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('comb', function () {
|
|
||||||
return gulp.src('assets/css/**/*.css')
|
|
||||||
.pipe(csscomb())
|
|
||||||
.pipe(gulp.dest('assets/css/.'));
|
|
||||||
});
|
|
||||||
|
|
||||||
gulp.task('clean:icons', function () {
|
|
||||||
return del(['public/icons', 'views/partials/icons/*.hbs']);
|
|
||||||
});
|
|
||||||
|
|
||||||
gulp.task('icons', ['clean:icons'], function () {
|
|
||||||
gulp.src('assets/icons/**/*.svg')
|
|
||||||
.pipe(replace(/#(?:[0-9a-f]{3}){1,2}/gi, 'currentColor'))
|
|
||||||
.pipe(svgmin({
|
|
||||||
plugins: [{
|
|
||||||
removeDimensions: true
|
|
||||||
}, {
|
|
||||||
removeTitle: true
|
|
||||||
}]
|
|
||||||
}))
|
|
||||||
.pipe(gulp.dest('public/icons'))
|
|
||||||
.pipe(extReplace('.hbs'))
|
|
||||||
.pipe(gulp.dest('views/partials/icons'))
|
|
||||||
.on('end', function () {
|
|
||||||
livereload.reload();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
gulp.task('watch', function () {
|
gulp.task('watch', function () {
|
||||||
gulp.watch('assets/css/**', ['css']);
|
gulp.watch('assets/css/**', ['css']);
|
||||||
gulp.watch('assets/icons/**/*.svg', ['icons']);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('default', ['build'], function () {
|
gulp.task('default', ['build'], function () {
|
||||||
|
16
package.json
16
package.json
@ -2,9 +2,9 @@
|
|||||||
"name": "casper",
|
"name": "casper",
|
||||||
"description": "The default personal blogging theme for Ghost. Beautiful, minimal and responsive.",
|
"description": "The default personal blogging theme for Ghost. Beautiful, minimal and responsive.",
|
||||||
"demo": "https://demo.ghost.io",
|
"demo": "https://demo.ghost.io",
|
||||||
"version": "1.3.6",
|
"version": "2.0.0",
|
||||||
"engines": {
|
"engines": {
|
||||||
"ghost": ">=0.9.0 <1.0.0"
|
"ghost": ">=1.0.0"
|
||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"screenshots": {
|
"screenshots": {
|
||||||
@ -20,7 +20,7 @@
|
|||||||
"type": "theme",
|
"type": "theme",
|
||||||
"categories": [
|
"categories": [
|
||||||
"Minimal",
|
"Minimal",
|
||||||
"Personal Blogs"
|
"Magazine"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
@ -35,25 +35,17 @@
|
|||||||
"contributors": "https://github.com/TryGhost/Casper/graphs/contributors",
|
"contributors": "https://github.com/TryGhost/Casper/graphs/contributors",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"autoprefixer": "6.3.6",
|
"autoprefixer": "6.3.6",
|
||||||
"connect-livereload": "0.5.4",
|
|
||||||
"cssnano": "3.7.1",
|
"cssnano": "3.7.1",
|
||||||
"del": "2.2.1",
|
|
||||||
"gulp": "3.9.1",
|
"gulp": "3.9.1",
|
||||||
"gulp-csscomb": "3.0.7",
|
|
||||||
"gulp-ext-replace": "0.3.0",
|
|
||||||
"gulp-live-server": "0.0.30",
|
|
||||||
"gulp-livereload": "3.8.1",
|
"gulp-livereload": "3.8.1",
|
||||||
"gulp-nodemon": "2.1.0",
|
"gulp-nodemon": "2.1.0",
|
||||||
"gulp-postcss": "6.1.1",
|
"gulp-postcss": "6.1.1",
|
||||||
"gulp-replace": "0.5.4",
|
|
||||||
"gulp-sourcemaps": "1.6.0",
|
"gulp-sourcemaps": "1.6.0",
|
||||||
"gulp-svgmin": "1.2.2",
|
|
||||||
"gulp-util": "3.0.7",
|
"gulp-util": "3.0.7",
|
||||||
"gulp-watch": "4.3.8",
|
"gulp-watch": "4.3.8",
|
||||||
"postcss-color-function": "2.0.1",
|
"postcss-color-function": "2.0.1",
|
||||||
"postcss-custom-properties": "5.0.1",
|
"postcss-custom-properties": "5.0.1",
|
||||||
"postcss-easy-import": "1.0.1",
|
"postcss-easy-import": "1.0.1"
|
||||||
"postcss-import": "8.1.2"
|
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
"posts_per_page": 25
|
"posts_per_page": 25
|
||||||
|
Loading…
Reference in New Issue
Block a user