FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

chore: Remove globbing from pfe-sass by castastrophe · Pull Request #1507 · patternfly/patternfly-elements · GitHub

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .js  (1) .json  (2) .scss  (1) All 3 file types selected
Only manifest files
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
37 changes: 6 additions & 31 deletions elements/pfe-sass/gulpfile.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ const {
} = require("gulp");

const pfelementPackage = require("./package.json");
const version = pfelementPackage.version;
const elementName = pfelementPackage.pfelement.elementName;
// const version = pfelementPackage.version;
// const elementName = pfelementPackage.pfelement.elementName;
Comment thread
castastrophe marked this conversation as resolved.

const paths = {
source: "./",
Expand All @@ -18,56 +18,31 @@ const paths = {
};

const clean = require("gulp-clean");
const mergeStream = require("merge-stream");
const globSass = require("gulp-sass-globbing");
const sassdoc = require("sassdoc");

// Delete the temp directory
// Delete the demo assets
task("clean", () => {
return src(["__*.scss", "demo/*.html", "demo/assets"], {
return src(["demo/*.html", "demo/assets"], {
cwd: paths.compiled,
read: false,
allowEmpty: true
}).pipe(clean());
});

// Custom gulp for sass globbing
task("sass:globbing", () => {
let stream = mergeStream();
["extends", "functions", "maps", "mixins", "variables"].forEach(folder => {
stream.add(
src([
`${folder}/_*.scss`
// `!${folder}/_deprecated*.scss`,
])
.pipe(
globSass({
path: `__${folder}.scss`
}, {
signature: `// generated with sass globbing, v${version}`
})
)
.pipe(dest(paths.compiled))
);
});

return stream;
});

task("build:sassdoc", () => {
return src(["{extends,functions,maps,mixins,variables}/_*.scss", "pfe-sass.scss"], {
cwd: paths.compiled,
allowEmpty: true
}).pipe(sassdoc());
});

task("build", series("clean", parallel("build:sassdoc", "sass:globbing")));
task("build", series("clean", "build:sassdoc"));

task("watch", () => watch(
["{extends,functions,maps,mixins,variables}/_*.scss", "pfe-sass.scss"], {
cwd: paths.compiled
},
series("build")
series("build:sassdoc")
));

task("dev", parallel("build", "watch"));
Expand Down
30 changes: 25 additions & 5 deletions elements/pfe-sass/pfe-sass.scss
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -1,8 +1,28 @@
/// Documented using SassDoc format: http://sassdoc.com

@import "_variables";
@import "variables/1-definitions";
@import "variables/2-crayon";
@import "variables/3-colors";
@import "variables/4-sizes";

@import "@patternfly/patternfly/sass-utilities/functions";
@import "_functions";
@import "_maps";
@import "_mixins";
@import "_extends";
@import "functions/1-tools";
@import "functions/custom-properties";
@import "functions/general";

@import "maps/broadcasted";
@import "maps/colors";
@import "maps/general";
@import "maps/typography";
@import "maps/typography_deprecated";
@import "maps/zindex";

@import "mixins/components";
@import "mixins/containers";
@import "mixins/copy-mixins";
@import "mixins/custom-properties";
@import "mixins/mixins";

@import "extends/extends";
@import "extends/typography-deprecated";
@import "extends/typography_extends";
Loading

Back | FazBrowse Home | New Git URL