mirror of
https://github.com/doctrine/doctrine-website.git
synced 2026-03-23 22:32:11 +01:00
Merge pull request #964 from doctrine/js-dev-deps
Update JS dev dependencies
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
module.exports = {
|
||||
verbose: true,
|
||||
rootDir: './',
|
||||
testURL: 'http://localhost/',
|
||||
testEnvironmentOptions: {
|
||||
url: 'http://localhost/'
|
||||
},
|
||||
testMatch: ['**/jest/**/*.test.js'],
|
||||
"transform": {
|
||||
"^.+\\.js$": "babel-jest",
|
||||
|
||||
19
package.json
19
package.json
@@ -1,14 +1,15 @@
|
||||
{
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.17.5",
|
||||
"@babel/node": "^7.16.8",
|
||||
"@babel/preset-env": "^7.16.11",
|
||||
"css-loader": "^6.8.1",
|
||||
"jest": "^27.5.1",
|
||||
"mini-css-extract-plugin": "^2.7.6",
|
||||
"prettier": "^3.0.2",
|
||||
"sass": "^1.44.0",
|
||||
"sass-loader": "^16.0.5",
|
||||
"@babel/core": "^7.29.0",
|
||||
"@babel/node": "^7.29.0",
|
||||
"@babel/preset-env": "^7.29.0",
|
||||
"css-loader": "^7.1.4",
|
||||
"jest": "^30.3.0",
|
||||
"jest-environment-jsdom": "^30.3.0",
|
||||
"mini-css-extract-plugin": "^2.10.1",
|
||||
"prettier": "^3.8.1",
|
||||
"sass": "^1.98.0",
|
||||
"sass-loader": "^16.0.7",
|
||||
"webpack": "^5.104.1",
|
||||
"webpack-cli": "^5.1.4"
|
||||
},
|
||||
|
||||
@@ -21,17 +21,23 @@ export default function () {
|
||||
|
||||
$(document).ready(function () {
|
||||
$('button[role="tab"]').on('click', function () {
|
||||
const tabId = $(this).attr('aria-controls');
|
||||
const tabContent = $('#' + tabId);
|
||||
const tabId = $(this).attr('aria-controls');
|
||||
const tabContent = $('#' + tabId);
|
||||
|
||||
$(this).closest('[role=tablist]').find('button[role="tab"]')
|
||||
.attr('data-active', null)
|
||||
.attr('aria-selected', 'false');
|
||||
$(this)
|
||||
.closest('[role=tablist]')
|
||||
.find('button[role="tab"]')
|
||||
.attr('data-active', null)
|
||||
.attr('aria-selected', 'false');
|
||||
|
||||
$(this).attr('data-active', 'true').attr('aria-selected', 'true');
|
||||
$(this).attr('data-active', 'true').attr('aria-selected', 'true');
|
||||
|
||||
$(this).closest('[role=tablist]').parent().find('div[role="tabpanel"]').hide();
|
||||
tabContent.show();
|
||||
$(this)
|
||||
.closest('[role=tablist]')
|
||||
.parent()
|
||||
.find('div[role="tabpanel"]')
|
||||
.hide();
|
||||
tabContent.show();
|
||||
});
|
||||
|
||||
$('button.copy-to-clipboard').on('click', async function () {
|
||||
@@ -42,14 +48,17 @@ export default function () {
|
||||
let copyText = '';
|
||||
if (copyElement) {
|
||||
const children = Array.from(copyElement.childNodes);
|
||||
copyText = children.map(node => {
|
||||
if (node.nodeType === Node.TEXT_NODE) {
|
||||
return node.textContent;
|
||||
} else if (node.nodeType === Node.ELEMENT_NODE) {
|
||||
return node.textContent;
|
||||
}
|
||||
return '';
|
||||
}).filter(Boolean).join('\n');
|
||||
copyText = children
|
||||
.map((node) => {
|
||||
if (node.nodeType === Node.TEXT_NODE) {
|
||||
return node.textContent;
|
||||
} else if (node.nodeType === Node.ELEMENT_NODE) {
|
||||
return node.textContent;
|
||||
}
|
||||
return '';
|
||||
})
|
||||
.filter(Boolean)
|
||||
.join('\n');
|
||||
}
|
||||
|
||||
await navigator.clipboard.writeText(copyText);
|
||||
|
||||
@@ -22,8 +22,8 @@ export default function (projectSlug, versionSlug, searchBoxSettings) {
|
||||
poweredBy: false,
|
||||
reset: false,
|
||||
searchClient: algoliasearch(
|
||||
'YVYTFT9XMW',
|
||||
'a6dada5f33f148586b92cc3afefeaaf6'
|
||||
'YVYTFT9XMW',
|
||||
'a6dada5f33f148586b92cc3afefeaaf6',
|
||||
),
|
||||
searchFunction: function (helper) {
|
||||
if (helper.state.query === '') {
|
||||
|
||||
@@ -643,15 +643,16 @@ a img.card-img-top {
|
||||
@import 'railscasts';
|
||||
@import 'carbonads';
|
||||
|
||||
pre.code-block-table{
|
||||
pre.code-block-table {
|
||||
counter-reset: line;
|
||||
}
|
||||
code.line{
|
||||
code.line {
|
||||
counter-increment: line;
|
||||
}
|
||||
|
||||
code.empty:before, code.line:before{
|
||||
content: " ";
|
||||
code.empty:before,
|
||||
code.line:before {
|
||||
content: ' ';
|
||||
display: inline-block;
|
||||
width: 38px;
|
||||
background: #333;
|
||||
@@ -665,19 +666,21 @@ code.line:before {
|
||||
content: counter(line);
|
||||
}
|
||||
|
||||
.footnote-label, .footnote-content {
|
||||
display: inline;
|
||||
.footnote-label,
|
||||
.footnote-content {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.footnote-label {
|
||||
vertical-align: super;
|
||||
font-size: .75em;
|
||||
vertical-align: super;
|
||||
font-size: 0.75em;
|
||||
}
|
||||
|
||||
div.row table:not([width]) {
|
||||
border: 1px solid #dee2e6;
|
||||
|
||||
td, th {
|
||||
td,
|
||||
th {
|
||||
padding: 0.5em;
|
||||
border: 1px solid #dee2e6;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user