From e6f3029f874bbcdba0e39798ba879ac147d375e0 Mon Sep 17 00:00:00 2001
From: Antonio R <22479344+a133xz@users.noreply.github.com>
Date: Thu, 25 Mar 2021 13:36:00 +0000
Subject: [PATCH 1/5] chore: add gulp
---
.gitignore | 1 +
gulpfile.js | 26 ++++++++++++++++++++++++++
package.json | 8 ++++++--
3 files changed, 33 insertions(+), 2 deletions(-)
create mode 100644 gulpfile.js
diff --git a/.gitignore b/.gitignore
index 612fafe..0182296 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@ package-lock.json
dist/
.vscode/
*.log
+yarn.lock
diff --git a/gulpfile.js b/gulpfile.js
new file mode 100644
index 0000000..34a6cb0
--- /dev/null
+++ b/gulpfile.js
@@ -0,0 +1,26 @@
+import gulp from 'gulp'
+import cssSelectorExtract from 'css-selector-extract'
+import through2 from 'through2'
+
+var extract = function() {
+ return gulp
+ .src('src/elements/select.shared.css')
+ .pipe(
+ through2.obj(function(file, _, cb) {
+ if (file.isBuffer()) {
+ const code = file.contents.toString()
+ const extractedCss = cssSelectorExtract.processSync({
+ // CSS source code as string.
+ css: code,
+ // Array of selectors which should get extracted.
+ filters: [/^(.*)select(.*)/],
+ })
+ file.contents = Buffer.from(extractedCss)
+ }
+ cb(null, file)
+ }),
+ )
+ .pipe(gulp.dest('dist/'))
+}
+
+gulp.task('default', extract)
diff --git a/package.json b/package.json
index 2cccc41..58e4c4b 100644
--- a/package.json
+++ b/package.json
@@ -25,13 +25,17 @@
"version": "lume versionHook",
"postversion": "lume postVersionHook",
"OTHER SCRIPTS XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX": "",
- "examples": "live-server --open=playground --no-css-inject"
+ "examples": "live-server --open=playground --no-css-inject",
+ "gulp": "gulp"
},
"dependencies": {},
"devDependencies": {
"@lume/cli": "^0.3.0",
"live-server": "^1.2.1",
- "prettier": "^1.19.1"
+ "prettier": "^1.19.1",
+ "gulp": "^4.0.2",
+ "css-selector-extract": "^4.0.0",
+ "through2": "^4.0.2"
},
"repository": {
"type": "git",
From 46c821583810925d36a103c51bcdca604cee0403 Mon Sep 17 00:00:00 2001
From: Antonio R <22479344+a133xz@users.noreply.github.com>
Date: Thu, 25 Mar 2021 17:52:33 +0000
Subject: [PATCH 2/5] folder structure updated and select included
---
playground/index.html | 11 +-
src/clickables.css | 21 --
src/elements/body.css | 4 -
src/elements/button.css | 2 -
src/elements/form/form.shared-is-test.css | 205 ++++++++++++++++++
.../{input => form}/input-checkbox.css | 3 -
src/elements/{input => form}/input-color.css | 2 -
src/elements/{input => form}/input-radio.css | 3 -
src/elements/{input => form}/input.shared.css | 21 +-
src/elements/form/label.css | 10 +
src/elements/form/select.css | 130 +++++++++++
src/elements/index.css | 10 +-
src/elements/input/index.css | 3 -
src/elements/label.css | 4 -
src/extra/utils.css | 7 -
src/index.css | 6 +-
src/shared/variables.css | 0
src/utils/utils.css | 17 ++
18 files changed, 402 insertions(+), 57 deletions(-)
delete mode 100644 src/clickables.css
delete mode 100644 src/elements/body.css
create mode 100644 src/elements/form/form.shared-is-test.css
rename src/elements/{input => form}/input-checkbox.css (81%)
rename src/elements/{input => form}/input-color.css (81%)
rename src/elements/{input => form}/input-radio.css (89%)
rename src/elements/{input => form}/input.shared.css (88%)
create mode 100644 src/elements/form/label.css
create mode 100644 src/elements/form/select.css
delete mode 100644 src/elements/input/index.css
delete mode 100644 src/elements/label.css
delete mode 100644 src/extra/utils.css
create mode 100644 src/shared/variables.css
create mode 100644 src/utils/utils.css
diff --git a/playground/index.html b/playground/index.html
index e324be2..62a34d3 100644
--- a/playground/index.html
+++ b/playground/index.html
@@ -8,10 +8,10 @@
Playground
@@ -19,7 +19,6 @@
-
LUME Basicss Playground