Skip to content

Commit ce99f75

Browse files
committed
Changing some of the build scripts
1 parent 29c2d75 commit ce99f75

File tree

7 files changed

+46
-15
lines changed

7 files changed

+46
-15
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ Gemfile.lock
66
.idea
77
.temp
88

9+
dust.zip
10+
911
build/zip/*
1012
build/example/bin/*
1113
build/build.nmml

build/lib/openfl.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def value_of(key)
117117
end
118118

119119
def is_defined(key)
120-
@config.get_flag(@target, key)
120+
!@config.get(@target, key).nil?
121121
end
122122

123123
def list_of(key)

gemfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ source 'https://rubygems.org'
22

33
gem 'rake'
44
gem 'rspec', :require => 'spec'
5-
gem 'builder'
5+
gem 'builder'
6+
gem 'rubyzip'

rakefile.rb

+26
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#!/usr/bin/env ruby
22

3+
require 'fileutils'
4+
require 'rubygems'
5+
require 'zip/zip'
6+
37
HOME = File.dirname(__FILE__)
48
Dir[File.join(HOME, 'build/lib/*.rb')].each do |file|
59
require file.chomp(File.extname(file))
@@ -100,3 +104,25 @@
100104
end
101105

102106
end
107+
108+
namespace :haxelib do
109+
110+
task :package do
111+
directory = File.join(HOME, 'src', '/')
112+
target = File.join(HOME, 'dust.zip')
113+
puts "create #{target}"
114+
FileUtils.rm target if File.exists? target
115+
Zip::ZipFile.open(target, Zip::ZipFile::CREATE) do |zipfile|
116+
Dir[File.join(directory, '**', '**')].each do |file|
117+
zipfile.add(file.sub(directory, ''), file)
118+
end
119+
end
120+
end
121+
122+
task :install => :package do
123+
command = `haxelib local #{File.join(HOME, 'dust.zip')}`
124+
puts command
125+
`#{command}`
126+
end
127+
128+
end

src/dust/math/Random.hx

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
package dust.math;
22

3-
import Array;
4-
53
class Random
64
{
75
inline static var MODULUS = 2147483647;

src/haxelib.json

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "dust",
3+
"url" : "http://github.com/alecmce/dust/src",
4+
"license": "MIT",
5+
"tags": ["cross","js","flash","cpp","game","openfl"],
6+
"description": "An entity-system for Haxe",
7+
"version": "0.2",
8+
"releasenote": "Early Alpha. Haxe3 only",
9+
"contributors": ["alecmce"],
10+
"dependencies": {
11+
"munit": "",
12+
"minject": "",
13+
"openfl": ""
14+
}
15+
}

src/haxelib.xml

-11
This file was deleted.

0 commit comments

Comments
 (0)