Skip to content

Removed node-sass and use dart-sass as a default #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,6 @@ Check `config/themes.json.sample` to get samples.
Check `config/watcher.json.sample` to get samples.
- `usePolling` - set this to `true` to successfully watch files over a network (i.e. Docker or Vagrant) or when your watcher dosen't work well. Warning, enabling this option may lead to high CPU utilization! [chokidar docs](https://github.com/paulmillr/chokidar#performance)

## `sass-compiler.json` structure
You can choose Sass compiler between the default, but [already deprecated](https://github.com/sass/node-sass/issues/2952), `node-sass` or a newer and faster `dart-sass`.

Since the Dart Sass does not have the same set of features as Node Sass, for now we will keep the older version as default.

## Optional configurations for 3rd party plugins
You will find sample config files for theses plugins in `vendor/creaminternet/frontools/config` directory.
* Create [browserSync](https://www.browsersync.io/) configuration
Expand Down
1 change: 0 additions & 1 deletion config/sass-compiler.json.sample

This file was deleted.

4 changes: 1 addition & 3 deletions helpers/scss.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import gulp from 'gulp'
import path from 'path'
import gulpIf from 'gulp-if'
import dartSass from 'sass'
import nodeSass from 'node-sass'
import gulpSass from 'gulp-sass'
import rename from 'gulp-rename'
import multiDest from './multi-dest.mjs'
Expand All @@ -28,7 +27,6 @@ export default function(name, file) {
const includePaths = theme.includePaths ? theme.includePaths : []
const postcssConfig = []
const disableSuffix = theme.disableSuffix || false
const sassCompiler = configLoader('sass-compiler.json', false)

configLoader('.browserslistrc')

Expand Down Expand Up @@ -68,7 +66,7 @@ export default function(name, file) {
)
)
.pipe(gulpIf(!disableMaps, sourcemaps.init()))
.pipe(gulpSass(sassCompiler === 'dart-sass' ? dartSass : nodeSass)({ includePaths: includePaths })
.pipe(gulpSass(dartSass)({ includePaths: includePaths })
.on('error', sassError(env.ci || false)))
.pipe(gulpIf(production, postcss([cssnano()])))
.pipe(gulpIf(postcssConfig.length, postcss(postcssConfig || [])))
Expand Down
Loading