@ilo-org/styles 0.16.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/gulpfile.mjs DELETED
@@ -1,99 +0,0 @@
1
- import gulp from "gulp";
2
- import gulpSass from "gulp-sass";
3
- import dartSass from "sass";
4
- import rename from "gulp-rename";
5
- import cleanCSS from "gulp-clean-css";
6
- import { deleteAsync } from "del";
7
- import cssnano from "gulp-cssnano";
8
- import postcss from "gulp-postcss";
9
- import sourcemaps from "gulp-sourcemaps";
10
-
11
- const sass = gulpSass(dartSass);
12
-
13
- const SRC = "scss";
14
- const TEMP = "temp";
15
- const BUILD = "css";
16
- const COMPILABLE_COMPONENTS = `${TEMP}/compilable_components`;
17
- const COMPILED_COMPONENTS = `${BUILD}/components`;
18
-
19
- // Copy all files in the scss folder into a temp folder that's safe to work in
20
- gulp.task("create temp dir", function () {
21
- return gulp.src(`${SRC}/**/*`).pipe(gulp.dest(TEMP));
22
- });
23
-
24
- // Create stand-alone scss files for each of the components so they can be compiled individually
25
- gulp.task("create temp components", function () {
26
- return gulp
27
- .src(`${TEMP}/components/_*.scss`)
28
- .pipe(
29
- rename(function (path) {
30
- path.basename = path.basename.replace(/^_/, "");
31
- })
32
- )
33
- .pipe(gulp.dest(COMPILABLE_COMPONENTS));
34
- });
35
-
36
- // Compile the component partials into stand-alone css files
37
- gulp.task("compile components into css", function () {
38
- return gulp
39
- .src(`${COMPILABLE_COMPONENTS}/*.scss`)
40
- .pipe(sass({ includePaths: ["node_modules"] }).on("error", sass.logError))
41
- .pipe(cleanCSS())
42
- .pipe(
43
- rename(function (path) {
44
- path.basename = path.basename.replace(/\.scss$/, "css");
45
- })
46
- )
47
- .pipe(gulp.dest(COMPILED_COMPONENTS));
48
- });
49
-
50
- // Minify compiled css components
51
- gulp.task("minify css components", function () {
52
- return gulp
53
- .src(`${COMPILED_COMPONENTS}/*.css`)
54
- .pipe(postcss())
55
- .pipe(cssnano({ zindex: false }))
56
- .pipe(gulp.dest(COMPILED_COMPONENTS));
57
- });
58
-
59
- gulp.task("clean temp components", function () {
60
- return deleteAsync([TEMP]);
61
- });
62
-
63
- // Bundle the main scss file into a single css file
64
- gulp.task("bundle main css", function () {
65
- return gulp
66
- .src(`${SRC}/*.scss`)
67
- .pipe(sourcemaps.init()) // Initialize source maps
68
- .pipe(sass({ includePaths: ["node_modules"] }).on("error", sass.logError))
69
- .pipe(cleanCSS())
70
- .pipe(
71
- rename(function (path) {
72
- path.basename = path.basename.replace(/\.scss$/, "css");
73
- })
74
- )
75
- .pipe(sourcemaps.write(".")) // Write source maps
76
- .pipe(gulp.dest(BUILD));
77
- });
78
-
79
- // Minify compiled css files
80
- gulp.task("minify main css bundle", function () {
81
- return gulp
82
- .src(`${SRC}/*.css`)
83
- .pipe(postcss())
84
- .pipe(cssnano({ zindex: false }))
85
- .pipe(gulp.dest(BUILD));
86
- });
87
-
88
- gulp.task(
89
- "default",
90
- gulp.series(
91
- "create temp dir",
92
- "create temp components",
93
- "compile components into css",
94
- "minify css components",
95
- "clean temp components",
96
- "bundle main css",
97
- "minify main css bundle"
98
- )
99
- );
package/postcss.config.js DELETED
@@ -1 +0,0 @@
1
- module.exports = {};