repl.it
@DrankArizonaIce/

weebscript

Nodejs

a stupid "syntactic superset" of javascript. Pros: None. Cons: Template strings don't work. yet.

fork
loading
Files
  • index.js
  • src
  • weebscript
  • lLNbaG8.gif
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
const wsc = require("./weebscript/unweebify.js");
const fs = require("fs");
const srcDir = "./src";
var filePaths = fs.readdirSync("./src").map( (file)=>{
	
	return `src/${file}`;
})
const data = filePaths.map( (path)=>{
	var [ filename, extension ] = path.split(".");
	if(extension == "ws"){
		fs.writeFileSync(`${filename}.js`, wsc(fs.readFileSync(path).toString()));
		console.log(`${filename}.ws -> ${filename}.js`);
	}
})
?