Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import tmt
import os
import sys
class Project(tmt.TmtProject):
def getDependencies(self):
return [ tmt.TmtProject.projects['jsracer'] ]
def assertNodeInstallation(self):
retVal = 1
try:
retVal = tmt.runCmd([ 'npm', '-version' ], interactive=True)
except:
pass
if retVal != 0:
print()
print("It appears you do not have npm (node's package manager) installed.")
print("Install node (http://nodejs.org/, it should provide npm) and try again.")
sys.exit(1)
def compile(self):
def assertNodeInstallation(self):
retVal = 1
try:
retVal = tmt.runCmd([ 'npm', '-version' ], interactive=True)
except:
pass
if retVal != 0:
print()
print("It appears you do not have npm (node's package manager) installed.")
print("Install node (http://nodejs.org/, it should provide npm) and try again.")
sys.exit(1)
import tmt
import subprocess
from os.path import join, exists
class Project(tmt.EclipseProject):
def configure(self):
tmt.EclipseProject.configure(self)
self.main = "cs.threephase.Main"
self.threephase_tables = 'tpr_tables'
self.CACHED_THREEPHASE_TABLES = join(self.name, 'CACHED_THREEPHASE_TABLES_DELETE_TO_RECREATE')
Project(tmt.projectName(), description="A copy of Chen Shuang's 4x4 scrambler.")
os.chdir(tmt.projectName())
return oldDir
def run(self):
self.compile()
oldDir = self._chdir()
tmt.runCmd([ 'node', 'noderacer.js' ], interactive=True)
os.chdir(oldDir)
def clean(self):
pass
def check(self):
pass
Project(tmt.projectName(), description="A nodejs game server that multicasts turns to its clients")
return [ tmt.TmtProject.projects['scrambles'] ]
def runGradleTask(self, task):
retVal = os.system(self.gradlew % task)
assert retVal == 0
def compile(self):
self.runGradleTask("assemble")
def clean(self):
self.runGradleTask("clean")
def check(self):
pass
Project(tmt.projectName(), description="Android scrambling library")
def __init__(self):
tmt.EclipseProject.__init__(
self,
tmt.projectName(),
description=DESCRIPTION,
main='net.gnehzr.tnoodle.scrambles.Main')
import tmt
tmt.EclipseProject(tmt.projectName(), description="Dumping ground for useful Java functions used throughout tnoodle")
import tmt
import subprocess
class Project(tmt.EclipseProject):
def configure(self):
tmt.EclipseProject.configure(self)
tmt.WinstoneServer.addPlugin(self)
self.nonJavaResourceDeps |= tmt.glob(self.src, '.*html$', relativeTo=self.src)
Project(tmt.projectName(), description="A server plugin wrapper for scrambles that also draws pdfs.")
# - Start a tnt server in the background.
# - Then run unifyhtml.unify on everything in self.unifiedHtmlFiles
# This is easier than trying to follow the dependencies to extract
# js files like mootools. We just let the server do its job.
self.run(wait=False)
for fileName, url in self.unifiedHtmlFiles.items():
unifiedHtml = unifyhtml.unify(url, try_count=5)
unifiedHtml = tmt.doTextSubstitution(unifiedHtml)
with open(fileName, 'w') as out:
out.write(unifiedHtml)
tmt.notifyDist(fileName)
Project(tmt.projectName(), description="A Rubik's Cube timer.")
def getDependencies(self):
return [ tmt.TmtProject.projects['timer'],
tmt.TmtProject.projects['noderacer'],
tmt.TmtProject.projects['jracer'],
tmt.TmtProject.projects['quercus'],
]
def check(self):
return
def clean(self):
for dep in self.getDependencies():
dep.clean()
Project(tmt.projectName(), description="")