Skip to content

Commit f589ebf

Browse files
committed
li scss
1 parent 4701b6f commit f589ebf

File tree

6 files changed

+35
-1
lines changed

6 files changed

+35
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
- `gulp myscss` :: compile myscss `**/myscss/*.scss`
77
- `gulp myvendorsjs` :: minimize vendor js files
88
- `node_modules/owl.carousel/owl.carousel.js` are saved to `assets/js/owl.carousel/owl.carousel.js` and `assets/js/owl.carousel/owl.carousel.min.js` (generated by this Gulp). `assets/js/owl.carouse` is taken from original js file base name `owl.carousel`
9-
- `gulp watch` only does `gulp myscss` for now..
9+
- `gulp watch` only does `gulp myscss` for now
1010

1111
# Config
1212
## Browserslist

bootstrap/myscss/li.css

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bootstrap/myscss/li.css.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bootstrap/myscss/li.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@import "li/reboot";

bootstrap/myscss/li/_reboot.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
*,
2+
*::before,
3+
*::after {
4+
box-sizing: border-box; // 1
5+
}

gulpfile.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ var scssPath = [
3939
];
4040
// don't use ** at the beginning as it will contain a lot of folders in node_modules
4141

42+
// // `gulp myscss` :: compile myscss `**/myscss/*.scss`
43+
// create sourcemap, convert scss to css, autoprefixer, minify css
44+
// Used in Watch :: won't run if scss file is not updated
4245
gulp.task('myscss', () => {
4346
return gulp.src(scssPath, { base: '.', since: gulp.lastRun('myscss') }).
4447
pipe(gDebug()).
@@ -60,6 +63,27 @@ gulp.task('myscss', () => {
6063
pipe(gulp.dest('.'))
6164
})
6265

66+
// create sourcemap, convert scss to css, autoprefixer
67+
gulp.task('myscssNoMinify', () => {
68+
return gulp.src(['bootstrap/myscss/li.scss'], { base: '.', since: gulp.lastRun('myscss') }).
69+
pipe(gDebug()).
70+
pipe(sourcemaps.init()).
71+
pipe(
72+
sass({
73+
errLogToConsole: config.errLogToConsole,
74+
outputStyle: config.outputStyle,
75+
precision: config.precision,
76+
}),
77+
).
78+
on('error', sass.logError).
79+
pipe(gPostcss([autoprefixer()])).
80+
pipe(rename((path) => {
81+
path.extname = '.css'
82+
})).
83+
pipe(sourcemaps.write('.')).
84+
pipe(gulp.dest('.'))
85+
})
86+
6387
gulp.task('myvendorsjs', function () {
6488
return gulp.src(config.jsVendorSRC, { since: gulp.lastRun('myvendorsjs') })
6589
.pipe(

0 commit comments

Comments
 (0)