-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(pv-stylemark): replaced stylemark with own impl
Removed 3rd party dependency stylemark with own imlementation and removed gulp build-wrappers BREAKING CHANGE: With removing stylemark the seperate lsg-assets folder is not needed anymore. If you want to use assets in your LSG you have to copy them seperatly, pv-scripts users can just use the resources folder in most cases. Also the minimal required node-version has changed to node 18.
- Loading branch information
Showing
49 changed files
with
8,352 additions
and
11,919 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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 +1 @@ | ||
v16.15.0 | ||
v18.19.0 |
This file contains 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
This file contains 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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module.exports = { | ||
semi: true, | ||
trailingComma: "all", | ||
printWidth: 120, | ||
tabWidth: 2, | ||
endOfLine: "auto", | ||
arrowParens: "avoid", | ||
}; |
This file contains 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
This file contains 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
17 changes: 0 additions & 17 deletions
17
packages/pv-stylemark/gulp-tasks/clickdummy_tasks/copyClickdummyFiles.js
This file was deleted.
Oops, something went wrong.
28 changes: 0 additions & 28 deletions
28
packages/pv-stylemark/gulp-tasks/lsg_tasks/assembleLSGComponents.js
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
packages/pv-stylemark/gulp-tasks/lsg_tasks/buildStylemark.js
This file was deleted.
Oops, something went wrong.
25 changes: 0 additions & 25 deletions
25
packages/pv-stylemark/gulp-tasks/lsg_tasks/copyStyleguideFiles.js
This file was deleted.
Oops, something went wrong.
This file contains 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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
const { readFile } = require("fs-extra"); | ||
const yaml = require("js-yaml"); | ||
|
||
const { resolveApp, getAppConfig } = require("./paths"); | ||
|
||
const getLsgConfig = async () => { | ||
const { lsgConfigPath } = getAppConfig(); | ||
try { | ||
const rawConfig = await readFile(resolveApp(lsgConfigPath), { | ||
encoding: "utf-8", | ||
}); | ||
const config = yaml.load(rawConfig); | ||
return config ?? {}; | ||
} catch (error) { | ||
console.warn("Error reading stylemark-config-file:", error); | ||
return {}; | ||
} | ||
}; | ||
|
||
module.exports = { | ||
getLsgConfig, | ||
}; |
This file contains 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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
const { ensureDir, writeFile: fsWriteFile, watchFile } = require("fs-extra"); | ||
const { glob } = require("glob"); | ||
const { resolve, normalize } = require("path"); | ||
|
||
const writeFile = async (target, reldir, filename, markup) => { | ||
await ensureDir(`${target}/${reldir}`); | ||
return await fsWriteFile(`${target}/${reldir}/${filename}.html`, markup, { | ||
encoding: "utf8", | ||
}); | ||
}; | ||
|
||
const watchGlob = async (curGlob, callback) => { | ||
const paths = await glob(curGlob); | ||
const normalizedPaths = paths.map(filePath => normalize(resolve(process.cwd(), filePath))); | ||
normalizedPaths.forEach(path => { | ||
watchFile(path, () => callback()); | ||
}); | ||
}; | ||
|
||
module.exports = { | ||
writeFile, | ||
watchGlob, | ||
}; |
This file contains 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
Oops, something went wrong.