- Copy the file below into one called
testez.yml
- In
selene.toml
, replacestd = "roblox"
withstd = "roblox+testez"
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
local ESCAPES: { [string]: string? } = { | |
["&"] = "&", | |
["<"] = "<", | |
[">"] = ">", | |
['"'] = """, | |
["'"] = "'", | |
} | |
local function escapeRichText(text: string): string | |
local start, finish = 1, 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
{ | |
// Place your snippets for luau here. Each snippet is defined under a snippet name and has a prefix, body and | |
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are: | |
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the | |
// same ids are connected. | |
// Example: | |
// "Print to console": { | |
// "prefix": "log", | |
// "body": [ | |
// "console.log('$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
local function graphemeCount(text: string): number | |
local count = 0 | |
for _ in utf8.graphemes(text) do | |
count += 1 | |
end | |
return count | |
end |
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
# This file was @generated by generate-roblox-std at 2022-06-04 18:09:36.972430600 -07:00 | |
--- | |
base: lua51 | |
name: roblox | |
globals: | |
Axes.new: | |
args: | |
- type: "..." | |
BrickColor.Black: | |
args: [] |
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
local function curryWithNumberOfArgs(callback, numArgs) | |
local function curried(...) | |
local passedArgs = table.pack(...) | |
if passedArgs.n > numArgs then | |
error("too many arguments passed to curried function (called after already ran)") | |
elseif passedArgs.n == numArgs then | |
return callback(...) | |
end |
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
local weakInstanceTable = {} | |
weakInstanceTable.__tostring = "<Weak Instance Table>" | |
function weakInstanceTable:__newindex(key, value) | |
assert(typeof(key) == "Instance", "keys need to be an Instance") | |
assert(key:IsDescendantOf(game), "key is not a descendant of the DataModel") | |
rawset(self, key, value) | |
key.AncestryChanged:connect(function() | |
if not key:IsDescendantOf(game) then |
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
use lazy_static::lazy_static; | |
use std::collections::{HashMap, HashSet}; | |
use std::env; | |
use std::fs; | |
use std::path::{Component, Path}; | |
use std::process; | |
use walkdir::WalkDir; | |
lazy_static! { | |
static ref SOURCE: &'static str = option_env!("SOURCE_LANGUAGE").unwrap_or("en-us"); |
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
extern crate walkdir; | |
use std::env; | |
use std::fs; | |
use std::path::Path; | |
use walkdir::WalkDir; | |
fn main() -> std::io::Result<()> { | |
println!("RbxSync -> Rojo name format"); |
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
extern crate regex; | |
extern crate serde_json; | |
extern crate walkdir; | |
use regex::Regex; | |
use serde_json::{ Value }; | |
use std::env; | |
use std::fs; | |
use std::path::Path; | |
use walkdir::WalkDir; |
NewerOlder