1
0
mirror of https://github.com/locomotivemtl/locomotive-boilerplate.git synced 2026-01-15 00:55:08 +08:00

grid helper refactoring + prepare JS dynamic import + add app-env function for Sass conditions

This commit is contained in:
arnvvd
2022-10-06 12:28:02 -04:00
committed by Deven Caron
parent ebcbb6dc84
commit 9c478f5f7d
11 changed files with 173 additions and 125 deletions

View File

@@ -6,7 +6,7 @@ import resolve from '../utils/template.js';
import { writeFile } from 'node:fs/promises';
import { basename } from 'node:path';
import { promisify } from 'node:util';
import sass from 'node-sass';
import sass, { types } from 'node-sass';
import { PurgeCSS } from 'purgecss';
const sassRender = promisify(sass.render);
@@ -23,8 +23,14 @@ export const defaultSassOptions = {
sourceMap: true,
sourceMapContents: true,
};
export const developmentSassOptions = Object.assign({}, defaultSassOptions, {
outputStyle: 'expanded',
functions: {
'app-env()': function () {
return (new types.String('development'))
}
}
});
export const productionSassOptions = Object.assign({}, defaultSassOptions, {
outputStyle: 'compressed',