1
0
mirror of https://github.com/GenderDysphoria/GenderDysphoria.fyi.git synced 2025-11-25 20:42:40 +00:00

Site JS is now compiled inside of content. No more gulp streams.

This commit is contained in:
Jocelyn Badgley (Twipped)
2020-02-28 10:27:52 -08:00
parent 695637c3e7
commit 823f662743
13 changed files with 105 additions and 633 deletions

View File

@@ -2,7 +2,7 @@
const path = require('path');
const ROOT = path.resolve(__dirname, '../..');
const fs = require('fs-extra');
const { is: _is, re } = require('../lib/util');
const { is: _is } = require('../lib/util');
function is (...args) {
const fn = _is(...args);
@@ -135,10 +135,8 @@ exports.readFile = function readFile (fpath) {
exports.resolve = function resolve (...args) {
args = args.filter(Boolean);
let fpath = args.shift();
const fpath = args.shift();
if (!fpath) return ROOT;
if (fpath[0] === '/') throw new Error('Did you mean to resolve this? ' + fpath);
// if (fpath[0] === '/') fpath = fpath.slice(1);
return path.resolve(ROOT, fpath, ...args);
};