This file contains hidden or 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
import fs from 'fs'; | |
import path from 'path'; | |
import { Plugin } from 'vite'; | |
import packageJson from './package.json' with { type: 'json' }; | |
async function isCommonJS(depName: string) { | |
try { | |
const pkg = (await import(`./node_modules/${depName}/package.json`, { | |
with: { | |
type: 'json' |
This file contains hidden or 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
diff --git a/node_modules/react-d3-tree/lib/esm/Tree/index.js b/node_modules/react-d3-tree/lib/esm/Tree/index.js | |
index 650dd9a..a173e23 100644 | |
--- a/node_modules/react-d3-tree/lib/esm/Tree/index.js | |
+++ b/node_modules/react-d3-tree/lib/esm/Tree/index.js | |
@@ -301,7 +301,7 @@ class Tree extends React.Component { | |
const d = Array.isArray(data) ? data : [data]; | |
return d.map(n => { | |
const nodeDatum = n; | |
- nodeDatum.__rd3t = { id: null, depth: null, collapsed: false }; | |
+ nodeDatum.__rd3t = Object.assign({ id: null, depth: null, collapsed: false }, nodeDatum.__rd3t ? nodeDatum.__rd3t: {}) |
This file contains hidden or 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
export const valueIterator = (thing) => { | |
const values = [] | |
const normalize = (thing) => Array.isArray(thing) ? thing.entries() : Object.entries(thing) | |
const process = (thing) => { | |
for (const [index, item] of normalize(thing)) { | |
typeof item !== 'string' && typeof item !== 'number' ? process(item) : values.push(thing) | |
} | |
} |
This file contains hidden or 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
/** | |
* Convert form / POST data to object. | |
* Like: Tenants[0] = 'a' to { Tenants: ['a'] } | |
*/ | |
let formToObject = function (form) { | |
let formData = new FormData(form); | |
let formDataObject = {}; | |
formData.forEach(function(value, key){ | |
let keySplit = key.replace(/\]/g, '').split('['); | |
if (keySplit.length > 1) { |
This file contains hidden or 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
/** | |
* Returns a relative time string. | |
* @param epoch | |
* @param addPrefixOrSuffix | |
* @returns {string} | |
*/ | |
export let relativeTime = (epoch, addPrefixOrSuffix = true) => { | |
const rtf = new Intl.RelativeTimeFormat('nl', { | |
localeMatcher: "best fit", | |
numeric: "auto", |
This file contains hidden or 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
import {FormHelper} from './form_helper/FormHelper.js'; | |
class App { | |
constructor () { | |
this.data = { | |
name: 'Henk', | |
surname: 'Jansen', | |
isSuperman: true, | |
awesomeness: 32 |
This file contains hidden or 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
server { | |
server_name *.JOUWNAAM; | |
root /var/www/nginx/$http_host; | |
error_page 404 /404.html; | |
location / { | |
add_header Access-Control-Allow-Origin *; | |
try_files $uri $uri/index.html @rewrite; | |
} |
This file contains hidden or 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
<?php | |
/** | |
* @file | |
* Contains \Drupal\rest\Plugin\rest\resource\EntityResource. | |
*/ | |
namespace Drupal\gap_rest\Plugin\rest\resource; | |
use Drupal\Core\Entity\EntityInterface; |
This file contains hidden or 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
@mixin grid-block($gutter, $selector, $grids) { | |
margin: 0 -#{$gutter / 2}; | |
max-width: calc(100% + #{$gutter}); | |
@include clearfix; | |
#{$selector} { | |
margin: $gutter #{$gutter / 2}; | |
} | |
@each $grid in $grids { |
This file contains hidden or 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
module Jekyll | |
class PagesPageGenerator < Generator | |
safe true | |
priority :highest | |
def generate(site) | |
pages = site.collections['pages'].docs |
NewerOlder