git - 使用 git 设置开发环境但不加载引导程序和字体真棒
问题描述
所以我试图设置我的开发环境,因为我正在关注教程中的人,他使用的是旧版本的 gulp,它适用于旧版本的 Node.js,但新版本不能......我目前正在运行gulp v4 和 node 是最新版本,它只是不想合作......使用 git 我想安装 bootstrap 和 fontawesome 因为我已经安装了 SASS 并且它正在工作,但我还没有找到用于引导和gulpfile.js 中的 fontawesome ......这是我的代码现在的样子,SASS 正在工作并且站点会自行更新,但我不知道如何导出引导程序和 fontawesome,因为在 gulp 4 中一切都发生了变化......
const gulp = require('gulp');
const sass = require('gulp-sass');
const browserSync = require('browser-sync').create();
//compile scss into css
function style() {
return gulp.src('src/scss/**/*.scss')
.pipe(sass().on('error', sass.logError))
.pipe(gulp.dest('src/css'))
.pipe(browserSync.stream());
}
function watch() {
browserSync.init({
server: {
baseDir: "./src",
index: "/index.html"
}
});
gulp.watch('src/scss/**/*.scss', style)
gulp.watch('./*.html').on('change', browserSync.reload);
gulp.watch('./js/**/*.js').on('change', browserSync.reload);
}
exports.style = style;
exports.watch = watch;
解决方案
推荐阅读
- javascript - 如何在多个页面中查找匹配的文本
- sql - 检查表 1 中的日期是否大于表 2 中的日期。如果是,则在名为 Status 的新创建列中返回“Sent”
- c - 如何删除链表中的多个结构?
- json - WCF JSON序列化忽略DataMember.Name?
- python - 如何在快速排序程序中实现递归调用
- linux - 在连续/实时数据流上使用 grep
- docker - 无法从 docker 容器连接到远程 MySQL 数据库
- typescript - 错误:在 typegraphql 中将数组作为输入类型传递时无法确定 GraphQL 输入类型
- c# - Windows 窗体 - 如何在拉伸窗体时向上移动图片框
- python - 是否有任何函数可以为 AWS RDS 数据 API 生成转义 sql 查询?