Skip to content
This repository has been archived by the owner on Mar 26, 2021. It is now read-only.

Commit

Permalink
Now using a "requireLocal" function to use local modules (fuck you, N…
Browse files Browse the repository at this point in the history
…ode.js)
  • Loading branch information
Sonotsugipaa committed Oct 19, 2020
1 parent b1e5f02 commit 1de5008
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
global.requireLocal;
requireLocal = function requireLocal(mod) {
return require(__dirname+'/project_modules/'+mod); }



const Express = require('express');
const Webpage = require('./webpage.js');
const Webpage = requireLocal('webpage.js');
const Fs = require('fs');

const verbose = false;
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion routes/raycast/route.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const Express = require('express');
const Webpage = require('../../webpage.js');
const Webpage = requireLocal('webpage');

const pageTemplate = Webpage.Template.fromFile(
__dirname + '/index.html');
Expand Down

0 comments on commit 1de5008

Please sign in to comment.