我不是狼吞虎咽的专家,我只是在学习它是如何工作的,我学习了关于laracast的教程,还有一些奇怪的事情正在发生,我把它放在我的app.scss中。
// Bootstrap
@import "node_modules/bootstrap-sass/assets/stylesheets/bootstrap";
$color:red;
body{
color:$color
}和gulpfile我有这样的:
const elixir = require('laravel-elixir');要求(‘laravel-灵丹妙药-vue-2’);
/*
|--------------------------------------------------------------------------
| Elixir Asset Management
|--------------------------------------------------------------------------
|
| Elixir provides a clean, fluent API for defining some basic Gulp tasks
| for your Laravel application. By default, we are compiling the Sass
| file for our application, as well as publishing vendor resources.
|
*/
elixir(mix => {
mix.sass('app.scss');
});但不知怎么的,当我在cmd上运行gulp时,我得到了一个包含大约5000行代码的app.css,而不仅仅是我定义的样式:S,我得到了如下内容:
@charset "UTF-8";
/*!
* Bootstrap v3.3.7 (http://getbootstrap.com)
* Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */
html {
font-family: sans-serif;
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%; }
body {
margin: 0; }
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
menu,
nav,
section,
summary {
display: block; }
audio,
canvas,
progress,
video {
display: inline-block;
vertical-align: baseline; }
audio:not([controls]) {
display: none;
height: 0; }
[hidden],
template {
display: none; }如果有人能给我一个我很感激的建议,我不知道发生了什么。
发布于 2016-10-28 15:09:03
这是因为代码
@import "node_modules/bootstrap-sass/assets/stylesheets/bootstrap";在app.scss文件中。
Gulp也在您的最终结果中添加了引导文件。这是正常的行为。
https://stackoverflow.com/questions/40307862
复制相似问题