Added gulp-inject
This commit is contained in:
parent
7103e854ab
commit
895b82edd0
BIN
dist/main.css
vendored
BIN
dist/main.css
vendored
Binary file not shown.
47
index.html
47
index.html
File diff suppressed because one or more lines are too long
@ -54,6 +54,9 @@ gulp.task('view--scripts', ['view--js'], function() {
|
|||||||
/* Main ----------------------------------------- */
|
/* Main ----------------------------------------- */
|
||||||
|
|
||||||
paths.main = {
|
paths.main = {
|
||||||
|
html: [
|
||||||
|
'../index.html'
|
||||||
|
],
|
||||||
js: [
|
js: [
|
||||||
'../src/scripts/*.js'
|
'../src/scripts/*.js'
|
||||||
],
|
],
|
||||||
@ -72,6 +75,10 @@ paths.main = {
|
|||||||
'bower_components/basicContext/src/styles/main.scss',
|
'bower_components/basicContext/src/styles/main.scss',
|
||||||
'bower_components/basicModal/src/styles/main.scss',
|
'bower_components/basicModal/src/styles/main.scss',
|
||||||
'../src/styles/main.scss'
|
'../src/styles/main.scss'
|
||||||
|
],
|
||||||
|
svg: [
|
||||||
|
'./images/iconic.svg',
|
||||||
|
'./images/ionicons.svg'
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -116,6 +123,18 @@ gulp.task('main--styles', function() {
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
gulp.task('main--svg', function() {
|
||||||
|
|
||||||
|
var stream =
|
||||||
|
gulp.src(paths.main.html)
|
||||||
|
.pipe(plugins.inject(gulp.src(paths.main.svg), {
|
||||||
|
starttag: '<!-- inject:svg -->',
|
||||||
|
transform: function(filePath, file) { return file.contents.toString('utf8') }
|
||||||
|
}))
|
||||||
|
.pipe(gulp.dest('../'));
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
/* Clean ----------------------------------------- */
|
/* Clean ----------------------------------------- */
|
||||||
|
|
||||||
gulp.task('clean', function() {
|
gulp.task('clean', function() {
|
||||||
@ -131,7 +150,7 @@ gulp.task('clean', function() {
|
|||||||
|
|
||||||
/* Tasks ----------------------------------------- */
|
/* Tasks ----------------------------------------- */
|
||||||
|
|
||||||
gulp.task('default', ['view--scripts', 'main--scripts', 'main--styles'], function() {
|
gulp.task('default', ['view--scripts', 'main--svg', 'main--scripts', 'main--styles'], function() {
|
||||||
|
|
||||||
gulp.start('clean');
|
gulp.start('clean');
|
||||||
|
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
"gulp-autoprefixer": "2.1.0",
|
"gulp-autoprefixer": "2.1.0",
|
||||||
"gulp-babel": "^4.0.0",
|
"gulp-babel": "^4.0.0",
|
||||||
"gulp-concat": "^2.5.2",
|
"gulp-concat": "^2.5.2",
|
||||||
|
"gulp-inject": "^1.2.0",
|
||||||
"gulp-load-plugins": "^0.9.0",
|
"gulp-load-plugins": "^0.9.0",
|
||||||
"gulp-minify-css": "^1.0.0",
|
"gulp-minify-css": "^1.0.0",
|
||||||
"gulp-rimraf": "^0.1.1",
|
"gulp-rimraf": "^0.1.1",
|
||||||
|
Loading…
Reference in New Issue
Block a user