Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ceee3c1

Browse files
author
Vaibhav Singh
committed
feat: add nightwatch in extension recommendation
1 parent faff3f5 commit ceee3c1

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"recommendations": ["browserstackcom.nightwatch"]
3+
}

‎utils/renderTemplate.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,15 @@ function renderTemplate(src, dest) {
4141
return
4242
}
4343

44+
if (filename === 'extensions.json' && fs.existsSync(dest)) {
45+
// merge instead of overwriting
46+
const existing = JSON.parse(fs.readFileSync(dest, 'utf8'))
47+
const newExtensionJson = JSON.parse(fs.readFileSync(src, 'utf8'))
48+
const pkg = sortDependencies(deepMerge(existing, newExtensionJson))
49+
fs.writeFileSync(dest, JSON.stringify(pkg, null, 2) + '\n')
50+
return
51+
}
52+
4453
if (filename.startsWith('_')) {
4554
// rename `_file` to `.file`
4655
dest = path.resolve(path.dirname(dest), filename.replace(/^_/, '.'))

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /