Create 3rd party libraries with node instead of Python.
This commit is contained in:
Vendored
-45
@@ -1,45 +0,0 @@
|
||||
/*
|
||||
* Import often used libraries.
|
||||
*/
|
||||
import './jquery.js'
|
||||
import './optimal-select.js'
|
||||
import './hammer.js'
|
||||
import './d3/d3.v4.js'
|
||||
import './d3/d3.v4.selection-multi.js'
|
||||
import './highlight/highlight.pack.js'
|
||||
import './pixi/pixi.js'
|
||||
import './pixi/pixi-filters.js'
|
||||
import './pixi/pixi-particles.js'
|
||||
import './pixi/pixi-compressed-textures.js'
|
||||
import './greensock/src/uncompressed/jquery.gsap.js'
|
||||
import './greensock/src/uncompressed/TweenLite.js'
|
||||
import './greensock/src/uncompressed/TweenMax.js'
|
||||
import './greensock/src/uncompressed/TimelineLite.js'
|
||||
import './greensock/src/uncompressed/TimelineMax.js'
|
||||
import './greensock/src/uncompressed/easing/CustomBounce.js'
|
||||
import './greensock/src/uncompressed/easing/CustomEase.js'
|
||||
import './greensock/src/uncompressed/easing/CustomWiggle.js'
|
||||
import './greensock/src/uncompressed/easing/EasePack.js'
|
||||
import './greensock/src/uncompressed/plugins/AttrPlugin.js'
|
||||
import './greensock/src/uncompressed/plugins/BezierPlugin.js'
|
||||
import './greensock/src/uncompressed/plugins/ColorPropsPlugin.js'
|
||||
import './greensock/src/uncompressed/plugins/CSSPlugin.js'
|
||||
import './greensock/src/uncompressed/plugins/CSSRulePlugin.js'
|
||||
import './greensock/src/uncompressed/plugins/DirectionalRotationPlugin.js'
|
||||
import './greensock/src/uncompressed/plugins/DrawSVGPlugin.js'
|
||||
import './greensock/src/uncompressed/plugins/EaselPlugin.js'
|
||||
import './greensock/src/uncompressed/plugins/EndArrayPlugin.js'
|
||||
import './greensock/src/uncompressed/plugins/ModifiersPlugin.js'
|
||||
import './greensock/src/uncompressed/plugins/MorphSVGPlugin.js'
|
||||
import './greensock/src/uncompressed/plugins/Physics2DPlugin.js'
|
||||
import './greensock/src/uncompressed/plugins/PhysicsPropsPlugin.js'
|
||||
import './greensock/src/uncompressed/plugins/PixiPlugin.js'
|
||||
import './greensock/src/uncompressed/plugins/RaphaelPlugin.js'
|
||||
import './greensock/src/uncompressed/plugins/RoundPropsPlugin.js'
|
||||
import './greensock/src/uncompressed/plugins/ScrambleTextPlugin.js'
|
||||
import './greensock/src/uncompressed/plugins/ScrollToPlugin.js'
|
||||
import './greensock/src/uncompressed/plugins/TEMPLATE_Plugin.js'
|
||||
import './greensock/src/uncompressed/plugins/TextPlugin.js'
|
||||
import './greensock/src/uncompressed/plugins/ThrowPropsPlugin.js'
|
||||
import './greensock/src/uncompressed/utils/Draggable.js'
|
||||
import './greensock/src/uncompressed/utils/SplitText.js'
|
||||
Vendored
-82
@@ -1,82 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
"""
|
||||
Module docstring.
|
||||
"""
|
||||
|
||||
import sys, os, optparse
|
||||
|
||||
items = (
|
||||
"./lib/3rdparty/jquery.js",
|
||||
"./lib/3rdparty/optimal-select.js",
|
||||
"./lib/3rdparty/hammer.js",
|
||||
"./lib/3rdparty/hammer.propagating.js",
|
||||
"./lib/3rdparty/d3/d3.js",
|
||||
"./lib/3rdparty/d3/d3-selection-multi.js",
|
||||
"./lib/3rdparty/highlight",
|
||||
"./lib/3rdparty/pixi/pixi.js",
|
||||
"./lib/3rdparty/pixi/lib/crn_decomp.js",
|
||||
"./lib/3rdparty/pixi/pixi-compressed-textures.js",
|
||||
"./lib/3rdparty/pixi/pixi-filters.js",
|
||||
"./lib/3rdparty/pixi/pixi-particles.js",
|
||||
"./lib/3rdparty/pixi/pixi-projection.js",
|
||||
"./lib/3rdparty/greensock/src/uncompressed",
|
||||
"./lib/3rdparty/greensock/src/uncompressed/easing",
|
||||
"./lib/3rdparty/greensock/src/uncompressed/plugins",
|
||||
"./lib/3rdparty/greensock/src/uncompressed/utils",
|
||||
"./lib/3rdparty/convertPointFromPageToNode.js"
|
||||
)
|
||||
|
||||
def process_command_line(argv):
|
||||
"""
|
||||
Return a 2-tuple: (settings object, args list).
|
||||
`argv` is a list of arguments, or `None` for ``sys.argv[1:]``.
|
||||
"""
|
||||
if argv is None:
|
||||
argv = sys.argv[1:]
|
||||
|
||||
# initialize the parser object:
|
||||
parser = optparse.OptionParser(
|
||||
formatter=optparse.TitledHelpFormatter(width=78),
|
||||
add_help_option=None)
|
||||
|
||||
# define options here:
|
||||
parser.add_option( # customized description; put --help last
|
||||
'-h', '--help', action='help',
|
||||
help='Show this help message and exit.')
|
||||
|
||||
settings, args = parser.parse_args(argv)
|
||||
|
||||
# check number of arguments, verify values, etc.:
|
||||
if args:
|
||||
parser.error('program takes no command-line arguments; '
|
||||
'"%s" ignored.' % (args,))
|
||||
|
||||
# further process settings & args if necessary
|
||||
|
||||
return settings, args
|
||||
|
||||
def main(argv=None):
|
||||
settings, args = process_command_line(argv)
|
||||
run(settings, args)
|
||||
return 0 # success
|
||||
|
||||
def run(settings, args):
|
||||
with open("./dist/iwmlib.3rdparty.js", 'w') as outfile:
|
||||
for item in items:
|
||||
if item.endswith(".js"):
|
||||
appendFile(outfile, item)
|
||||
else:
|
||||
for filename in os.listdir(item):
|
||||
if filename.endswith(".js"):
|
||||
appendFile(outfile, os.path.join(item, filename))
|
||||
|
||||
def appendFile(outfile, filename):
|
||||
with open(filename) as infile:
|
||||
outfile.write("\n")
|
||||
outfile.write(infile.read())
|
||||
print("File appended: " + infile.name)
|
||||
|
||||
if __name__ == '__main__':
|
||||
status = main()
|
||||
sys.exit(status)
|
||||
Vendored
-68
@@ -1,68 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
"""
|
||||
Module docstring.
|
||||
"""
|
||||
|
||||
import sys, os, optparse
|
||||
|
||||
items = (
|
||||
"highlight",
|
||||
"greensock/src/uncompressed/plugins",
|
||||
"greensock/src/uncompressed/TweenLite.js",
|
||||
"convertPointFromPageToNode.js"
|
||||
)
|
||||
|
||||
def process_command_line(argv):
|
||||
"""
|
||||
Return a 2-tuple: (settings object, args list).
|
||||
`argv` is a list of arguments, or `None` for ``sys.argv[1:]``.
|
||||
"""
|
||||
if argv is None:
|
||||
argv = sys.argv[1:]
|
||||
|
||||
# initialize the parser object:
|
||||
parser = optparse.OptionParser(
|
||||
formatter=optparse.TitledHelpFormatter(width=78),
|
||||
add_help_option=None)
|
||||
|
||||
# define options here:
|
||||
parser.add_option( # customized description; put --help last
|
||||
'-h', '--help', action='help',
|
||||
help='Show this help message and exit.')
|
||||
|
||||
settings, args = parser.parse_args(argv)
|
||||
|
||||
# check number of arguments, verify values, etc.:
|
||||
if args:
|
||||
parser.error('program takes no command-line arguments; '
|
||||
'"%s" ignored.' % (args,))
|
||||
|
||||
# further process settings & args if necessary
|
||||
|
||||
return settings, args
|
||||
|
||||
def main(argv=None):
|
||||
settings, args = process_command_line(argv)
|
||||
run(settings, args)
|
||||
return 0 # success
|
||||
|
||||
def run(settings, args):
|
||||
with open("preload.js", 'w') as outfile:
|
||||
for item in items:
|
||||
if item.endswith(".js"):
|
||||
appendFile(outfile, item)
|
||||
else:
|
||||
for filename in os.listdir(item):
|
||||
if filename.endswith(".js"):
|
||||
appendFile(outfile, os.path.join(item, filename))
|
||||
|
||||
def appendFile(outfile, filename):
|
||||
with open(filename) as infile:
|
||||
outfile.write("\n")
|
||||
outfile.write(infile.read())
|
||||
print("File appended: " + infile.name)
|
||||
|
||||
if __name__ == '__main__':
|
||||
status = main()
|
||||
sys.exit(status)
|
||||
Reference in New Issue
Block a user