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..6b65857
--- /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/form/form.shared-is-test.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",
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