tingle-style
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -33,9 +33,11 @@ // https://github.com/gulpjs/gulp/tree/master/docs | ||
// 清空build目录 | ||
gulp.task('clear', function () { | ||
gulp.task('clear', function (cb) { | ||
del(['dist/*'], function (err, deletedFiles) { | ||
console.log('###### clear dist done ######'); | ||
}); | ||
cb(); | ||
}); | ||
gulp.task('stylus', function() { | ||
// 编译tingle style源码 | ||
gulp.task('stylus_tingle', function(cb) { | ||
gulp.src(['./src/**/*.styl']) | ||
@@ -46,3 +48,4 @@ .pipe(sourcemaps.init()) | ||
.pipe(gulp.dest('./src')); | ||
console.info('###### stylus done ######'); | ||
console.info('###### stylus_tingle done ######'); | ||
cb(); | ||
}); | ||
@@ -52,4 +55,9 @@ | ||
var reload = browserSync.reload; | ||
gulp.task('reload_by_src', ['stylus_tingle'], function () { | ||
reload(); | ||
}); | ||
// 开发`Tingle component`时,执行`gulp develop` or `gulp d` | ||
gulp.task('develop', ['stylus'], function() { | ||
gulp.task('develop', ['stylus_tingle'], function() { | ||
browserSync({ | ||
@@ -61,10 +69,7 @@ server: { | ||
gulp.watch([ | ||
'index.html', | ||
'src/**/*.styl' | ||
], ['stylus', function () { | ||
setTimeout(function () { | ||
reload(); | ||
}, 600); | ||
}]); | ||
gulp.watch('index.html', function () { | ||
reload(); | ||
}); | ||
gulp.watch('src/**/*.styl', ['reload_by_src']); | ||
}); | ||
@@ -77,3 +82,3 @@ | ||
// 发布前执行build任务 | ||
gulp.task('publish', ['stylus'], function () { | ||
gulp.task('build', ['clear', 'stylus_tingle'], function (cb) { | ||
gulp.src(["src/tingle.css"]) | ||
@@ -98,6 +103,7 @@ .pipe(cssimport({})) | ||
.pipe(gulp.dest("dist/")); | ||
console.info('###### tingle style publish done ######'); | ||
console.info('###### tingle-style build done ######'); | ||
cb(); | ||
}); | ||
gulp.task('p', ['publish']); | ||
gulp.task('b', ['build']); | ||
@@ -104,0 +110,0 @@ |
{ | ||
"name": "tingle-style", | ||
"version": "0.0.1", | ||
"description": "base style for tinglejs", | ||
"version": "0.0.2", | ||
"description": "base style and style utils for tinglejs", | ||
"repository": "https://github.com/tinglejs/tingle-style", | ||
@@ -6,0 +6,0 @@ "dependencies": {}, |
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
83577
2556