Convert sass files to scss files

This commit is contained in:
Jeremy Thomas
2022-11-23 17:44:02 +00:00
parent bd2e065ab7
commit dafc032ff0
140 changed files with 8331 additions and 5619 deletions

View File

@@ -1,26 +1,26 @@
const fs = require('fs');
const path = require('path');
const sass = require('sass');
const utils = require('../utils');
const fs = require("fs");
const path = require("path");
const sass = require("sass");
const utils = require("../utils");
const DART_BASE_PATH = 'test/dart-sass/build/';
const DART_BASE_PATH = "test/dart-sass/build/";
fs.mkdir(DART_BASE_PATH, { recursive: true }, (err) => {
if (err) throw err;
});
const exportDartCSS = (filepath, options) => {
utils.exportCSS(sass, fs, DART_BASE_PATH, filepath, options)
}
utils.exportCSS(sass, fs, DART_BASE_PATH, filepath, options);
};
// Full import
exportDartCSS('bulma', {
file: './bulma.sass',
exportDartCSS("bulma", {
file: "./bulma.scss",
});
exportDartCSS('bulma-rtl', {
file: './bulma-rtl.sass',
exportDartCSS("bulma-rtl", {
file: "./bulma-rtl.scss",
});
// Custom import
@@ -29,8 +29,8 @@ fs.mkdir(`${DART_BASE_PATH}custom`, { recursive: true }, (err) => {
if (err) throw err;
});
utils.exportCSS(sass, fs, DART_BASE_PATH, 'custom/navbar', {
data: '@use "./sass/components/navbar.sass" with ( $scheme-main: red );',
utils.exportCSS(sass, fs, DART_BASE_PATH, "custom/navbar", {
data: '@use "./sass/components/navbar.scss" with ( $scheme-main: red );',
});
// Single imports

View File

@@ -1,26 +1,26 @@
const fs = require('fs');
const path = require('path');
const sass = require('node-sass');
const utils = require('../utils');
const fs = require("fs");
const path = require("path");
const sass = require("node-sass");
const utils = require("../utils");
const NODE_SASS_BASE_PATH = 'test/node-sass/build/';
const NODE_SASS_BASE_PATH = "test/node-sass/build/";
fs.mkdir(NODE_SASS_BASE_PATH, { recursive: true }, (err) => {
if (err) throw err;
});
const exportNodeSassCSS = (filepath, options) => {
utils.exportCSS(sass, fs, NODE_SASS_BASE_PATH, filepath, options)
}
utils.exportCSS(sass, fs, NODE_SASS_BASE_PATH, filepath, options);
};
// Full import
exportNodeSassCSS('bulma', {
file: './bulma.sass',
exportNodeSassCSS("bulma", {
file: "./bulma.scss",
});
exportNodeSassCSS('bulma-rtl', {
file: './bulma-rtl.sass',
exportNodeSassCSS("bulma-rtl", {
file: "./bulma-rtl.scss",
});
// Single imports
@@ -30,9 +30,13 @@ const BULMA_IMPORT_PATH = `./sass/`;
utils.SOURCES.forEach((source) => {
const parsed = path.parse(source);
fs.mkdir(`${NODE_SASS_BASE_PATH}${parsed.dir}`, { recursive: true }, (err) => {
if (err) throw err;
});
fs.mkdir(
`${NODE_SASS_BASE_PATH}${parsed.dir}`,
{ recursive: true },
(err) => {
if (err) throw err;
}
);
exportNodeSassCSS(`${parsed.dir}/${parsed.name}`, {
data: `@import "${BULMA_IMPORT_PATH}${source}";`,

View File

@@ -1,14 +1,14 @@
@charset "utf-8";
// Import a Google Font
@import url('https://fonts.googleapis.com/css?family=Nunito:400,700');
@import url("https://fonts.googleapis.com/css?family=Nunito:400,700");
// Set your brand colors
$purple: #8A4D76;
$pink: #FA7C91;
$purple: #8a4d76;
$pink: #fa7c91;
$brown: #757763;
$beige-light: #D0D1CD;
$beige-lighter: #EFF0EB;
$beige-light: #d0d1cd;
$beige-lighter: #eff0eb;
// Update Bulma's global variables
$family-sans-serif: "Nunito", sans-serif;
@@ -26,12 +26,12 @@ $input-border-color: transparent;
$input-shadow: none;
// Import only what you need from Bulma
@import "../../../sass/utilities/_all.sass";
@import "../../../sass/base/_all.sass";
@import "../../../sass/elements/button.sass";
@import "../../../sass/elements/container.sass";
@import "../../../sass/elements/title.sass";
@import "../../../sass/form/_all.sass";
@import "../../../sass/components/navbar.sass";
@import "../../../sass/layout/hero.sass";
@import "../../../sass/layout/section.sass";
@import "../../../sass/utilities/_all";
@import "../../../sass/base/_all";
@import "../../../sass/elements/button";
@import "../../../sass/elements/container";
@import "../../../sass/elements/title";
@import "../../../sass/form/_all";
@import "../../../sass/components/navbar";
@import "../../../sass/layout/hero";
@import "../../../sass/layout/section";

View File

@@ -1,15 +1,15 @@
@charset "utf-8";
// Import the variables
@import "../../../sass/utilities/initial-variables.sass";
@import "../../../sass/utilities/initial-variables";
$blue: #00f;
$purple: #8A4D76;
$pink: #FA7C91;
$purple: #8a4d76;
$pink: #fa7c91;
$brown: #757763;
$beige-light: #D0D1CD;
$beige-lighter: #EFF0EB;
$beige-light: #d0d1cd;
$beige-lighter: #eff0eb;
$grey-dark: $brown;
$grey-light: $beige-light;
@@ -26,16 +26,36 @@ $lavender-light: hsl(240, 56%, 98%);
$lavender-dark: hsl(240, 31%, 24%);
$custom-colors: (
"lime": (lime),
"tomato": (tomato, white),
"orange": ($orange, $orange-invert, $orange-light),
"lavender": ($lavender, $lavender-invert, $lavender-light, $lavender-dark)
"lime": (
lime
),
"tomato": (
tomato,
white
),
"orange": (
$orange,
$orange-invert,
$orange-light
),
"lavender": (
$lavender,
$lavender-invert,
$lavender-light,
$lavender-dark
)
);
$spacing-shortcuts: ("margin": "mg");
$spacing-shortcuts: (
"margin": "mg"
);
$spacing-horizontal: "h";
$spacing-vertical: null;
$spacing-values: ("small": 10px, "medium": 30px, "large": 60px);
$spacing-values: (
"small": 10px,
"medium": 30px,
"large": 60px
);
// Import the rest of Bulma
@import "../../../bulma";