dojo-theme-bigur
Advanced tools
Comparing version 0.0.3 to 0.0.4
116
gulpfile.js
@@ -0,24 +1,42 @@ | ||
// =========================================================================== | ||
// Инициализируем плагины | ||
// =========================================================================== | ||
var gulp = require('gulp'), | ||
uglify = require('gulp-uglify'), | ||
sass = require('gulp-sass'), | ||
cssmin = require('gulp-clean-css'), | ||
sourcemaps = require('gulp-sourcemaps'), | ||
browserSync = require('browser-sync'), | ||
reload = browserSync.reload; | ||
uglify = require('gulp-uglify'), | ||
sass = require('gulp-sass'), | ||
cssmin = require('gulp-clean-css'), | ||
sourcemaps = require('gulp-sourcemaps'), | ||
browserSync = require('browser-sync'), | ||
clean = require('gulp-clean'), | ||
sequence = require('gulp-sequence'), | ||
fontgen = require('gulp-fontgen'), | ||
pug = require('gulp-pug'), | ||
reload = browserSync.reload; | ||
// =========================================================================== | ||
// Настройки | ||
// =========================================================================== | ||
var config = { | ||
theme: 'default', | ||
src: { | ||
html : './test/index.html', | ||
html : './test/**/*.pug', | ||
css : './src/**/*.scss', | ||
fonts : './fonts/**/*.*', | ||
images : './test/**/*.png', | ||
fonts : { | ||
gilroy : 'fonts/**/*.otf', | ||
awesome : 'node_modules/font-awesome/fonts/*.*', | ||
}, | ||
}, | ||
watch: { | ||
index : './test/index.html', | ||
html : './test/**/*.pug', | ||
css : './src/**/*.scss', | ||
}, | ||
build: { | ||
root : './build', | ||
html : './build', | ||
css : './build', | ||
images : './build', | ||
fonts : './build/fonts', | ||
@@ -30,2 +48,3 @@ }, | ||
routes: { | ||
'/lib/dojo-theme-bigur' : './build', | ||
'/lib/dojo' : './node_modules/dojo', | ||
@@ -38,10 +57,43 @@ '/lib/dijit' : './node_modules/dijit', | ||
tunnel: false, | ||
host: 'localhost', | ||
port: 9000, | ||
logPrefix: 'app', | ||
open: false, | ||
port: 9001, | ||
} | ||
} | ||
gulp.task('build:index', function () { | ||
gulp.src(config.src.html) | ||
// =========================================================================== | ||
// Очистка сборки | ||
// =========================================================================== | ||
gulp.task('clean', function() { | ||
return gulp.src([config.build.root], {read: false}).pipe(clean()); | ||
}); | ||
// =========================================================================== | ||
// Сборка шрифтов | ||
// =========================================================================== | ||
gulp.task('build:fonts:awesome', function() { | ||
return gulp.src(config.src.fonts.awesome) | ||
.pipe(gulp.dest(config.build.fonts)); | ||
}); | ||
gulp.task('build:fonts:gilroy', function() { | ||
return gulp.src(config.src.fonts.gilroy) | ||
.pipe(fontgen({dest: config.build.fonts})); | ||
}); | ||
gulp.task('build:fonts', sequence([ | ||
'build:fonts:awesome', | ||
'build:fonts:gilroy', | ||
])); | ||
// =========================================================================== | ||
// Сборка проекта | ||
// =========================================================================== | ||
gulp.task('build:html', function() { | ||
return gulp.src(config.src.html) | ||
.pipe(pug({pretty:true})) | ||
.pipe(gulp.dest(config.build.html)) | ||
@@ -51,20 +103,26 @@ .pipe(reload({stream: true})); | ||
gulp.task('build:css', function () { | ||
gulp.src(config.src.css) | ||
.pipe(sourcemaps.init()) | ||
.pipe(sass({includePaths: './src/variants/' + config.theme})) | ||
.pipe(cssmin()) | ||
.pipe(sourcemaps.write('maps')) | ||
.pipe(gulp.dest(config.build.css)) | ||
.pipe(reload({stream: true})); | ||
gulp.task('build:css', function() { | ||
return gulp.src(config.src.css) | ||
.pipe(sourcemaps.init()) | ||
.pipe(sass({ | ||
includePaths: [ | ||
'./src/variants/' + config.theme, | ||
'./src/fonts', | ||
'./node_modules/font-awesome/scss', | ||
] | ||
})) | ||
.pipe(cssmin()) | ||
.pipe(sourcemaps.write('maps')) | ||
.pipe(gulp.dest(config.build.css)) | ||
.pipe(reload({stream: true})); | ||
}); | ||
gulp.task('build:fonts', function () { | ||
gulp.src(config.src.fonts) | ||
.pipe(gulp.dest(config.build.fonts)) | ||
.pipe(reload({stream: true})); | ||
gulp.task('build:images', function() { | ||
return gulp.src(config.src.images) | ||
.pipe(gulp.dest(config.build.images)) | ||
.pipe(reload({stream: true})); | ||
}); | ||
gulp.task('watch', function () { | ||
gulp.watch(config.watch.index, ['build:index']); | ||
gulp.watch(config.watch.html, ['build:html']); | ||
gulp.watch(config.watch.css, ['build:css']); | ||
@@ -77,3 +135,3 @@ }); | ||
gulp.task('build', ['build:index', 'build:css', 'build:fonts']); | ||
gulp.task('default', ['build', 'server', 'watch']); | ||
gulp.task('build', ['build:html', 'build:css', 'build:images']); | ||
gulp.task('default', sequence('build', ['server', 'watch'])); |
{ | ||
"name": "dojo-theme-bigur", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "Theme for dojo & dijit", | ||
@@ -33,7 +33,15 @@ "author": "Gennady Kovalev <gik@bigur.ru> (http://bigur.com/)", | ||
"gulp": "^3.9.1", | ||
"gulp-clean": "^0.3.2", | ||
"gulp-clean-css": "^2.3.2", | ||
"gulp-fontgen": "^0.2.5", | ||
"gulp-pug": "^3.3.0", | ||
"gulp-sass": "^3.1.0", | ||
"gulp-sourcemaps": "^2.4.0", | ||
"gulp-uglify": "^2.0.0" | ||
"gulp-sequence": "^0.4.6", | ||
"gulp-sourcemaps": "2.4.0", | ||
"gulp-uglify": "^2.0.0", | ||
"normalize-css": "^2.3.1" | ||
}, | ||
"dependencies": { | ||
"font-awesome": "^4.7.0" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
3162981
74
114
0
1
16
+ Addedfont-awesome@^4.7.0
+ Addedfont-awesome@4.7.0(transitive)