Skip to content
Snippets Groups Projects
Commit 3968c1ee authored by Markus Kaarto's avatar Markus Kaarto
Browse files

disable shadow dom

parent 3a633c9e
No related branches found
No related tags found
No related merge requests found
......@@ -13,6 +13,11 @@
"typescript": "3.7.2"
}
},
"minimist": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ="
},
"typescript": {
"version": "3.7.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.7.2.tgz",
......
......@@ -25,5 +25,8 @@
"@stencil/core": "^1.8.3",
"@types/jest": "^24.9.0"
},
"license": "MIT"
"license": "MIT",
"dependencies": {
"minimist": "^1.2.0"
}
}
......@@ -11,7 +11,7 @@ const fillcolors = {
@Component({
tag: "hy-button",
styleUrl: "button.css",
shadow: true
shadow: false
})
export class Button {
@Prop() variant: ButtonVariants = ButtonVariants.default;
......
......@@ -14,7 +14,7 @@ const iconNames: IconName = {
@Component({
tag: "hy-icon",
styleUrl: "icon.css",
shadow: true
shadow: false
})
export class Icon {
@Prop() icon: string;
......
var argv = require("minimist")(process.argv.slice(2));
const fs = require("fs");
const folder = "./src/components/";
if (!argv["target"]) {
console.error(
"please provide Vuepress folder address as an argument. i.e '--target ../documentation/docs'"
);
process.exit();
}
const target = argv["target"];
function readFolder(folder, subName) {
const files = fs.readdirSync(folder);
var list = [];
files.forEach(file => {
const stat = fs.statSync(folder + "/" + file);
if (stat.isDirectory()) {
const dir = `${folder}/${file}/`;
list = list.concat(readFolder(dir, file));
} else {
if (file.includes(".md") && !!subName) {
list.push({
file: fs.readFileSync(`${folder}/${file}`),
name: subName
});
}
}
});
return list;
}
function watchFolder(folder, cb) {
const files = fs.readdirSync(folder);
files.forEach(file => {
const stat = fs.statSync(folder + "/" + file);
if (stat.isDirectory()) {
const dir = `${folder}${file}/`;
debouncedWatch(dir, cb);
}
});
}
function debouncedWatch(dir, cb) {
let fsWait = false;
fs.watch(dir, (_, filename) => {
if (filename) {
if (fsWait) return;
fsWait = setTimeout(() => {
fsWait = false;
}, 100);
console.log(`${filename} file Changed`);
cb();
}
});
}
watchFolder(folder, () => {
const files = readFolder(folder);
files.forEach(file => {
console.log("writing docs for: ", file.name);
fs.writeFileSync(`${target}${file.name}.md`, file.file);
});
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment