Skip to content

Commit

Permalink
Updated Readme and web-app infrastructure
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexAltea committed Jun 19, 2016
1 parent bf3d508 commit 05b4523
Show file tree
Hide file tree
Showing 5 changed files with 160 additions and 1 deletion.
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Dependencies NodeJS
node_modules/

# Emscripten builds
*.out.js

# Unicorn.js
/dist/*.js
72 changes: 72 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
'use strict';

module.exports = function (grunt) {
// Load tasks from grunt-* dependencies in package.json
require('load-grunt-tasks')(grunt);

// Time how long tasks take
require('time-grunt')(grunt);

// Project configuration
grunt.initConfig({
exec: {
emscripten: {
command: 'python build.py'
}
},
uglify: {
dist: {
options: {
compress: true,
},
files: {
'dist/unicorn.min.js': [
'src/**/*.js'
]
}
}
},
concat: {
dist: {
src: ['src/unicorn.out.js', 'src/unicorn-wrapper.js'],
dest: 'dist/unicorn.min.js'
}
},
connect: {
options: {
port: 9001,
livereload: 35729,
hostname: 'localhost'
},
livereload: {
options: {
open: true
}
}
},
watch: {
livereload: {
files: [
'index.html',
'dist/*.js'
],
options: {
livereload: '<%= connect.options.livereload %>'
}
},
}
});

// Project tasks
grunt.registerTask('build', [
'exec:emscripten',
'concat'
]);
grunt.registerTask('serve', [
'connect',
'watch'
]);
grunt.registerTask('default', [
'build'
]);
};
34 changes: 33 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,33 @@
# unicorn.js
Unicorn.js
==========
[![Last Release](https://img.shields.io/badge/version-0.9-brightgreen.svg?style=flat)](https://github.com/AlexAltea/unicorn.js/releases)

Port of the [Unicorn](https://github.com/unicorn-engine/unicorn) CPU emulator framework for JavaScript. Powered by [Emscripten](https://github.com/kripken/emscripten).

**Notes:** _Unicorn_ is a lightweight multi-architecture CPU emulator framework originally developed by Nguyen Anh Quynh et al. and released under GPLv2 license. More information about contributors and license terms can be found in the files `AUTHORS.TXT`, `CREDITS.TXT` and `COPYING` inside the *unicorn* submodule of this repository.

## Installation
To add Unicorn.js to your web application, include it with:
```html
<script src="keystone.min.js"></script>
```
or install it with the Bower command:
```bash
bower install keystonejs
```

## Usage
```javascript
// TODO
```

## Building
To build the Unicorn.js library, clone the *master* branch of this repository, and do the following:

1. Initialize the original Unicorn submodule: `git submodule update --init`.

2. Install the development and client dependencies with: `npm install` and `bower install`.

3. Install the latest [Python 2.x (64-bit)](https://www.python.org/downloads/), [CMake](http://www.cmake.org/download/) and the [Emscripten SDK](http://kripken.github.io/emscripten-site/docs/getting_started/downloads.html). Follow the respective instructions and make sure all environment variables are configured correctly. Under Windows [MinGW](http://www.mingw.org/) (specifically *mingw32-make*) is required.

4. Finally, build the source with: `grunt build`.
18 changes: 18 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "unicornjs",
"version": "0.9.0",
"description": "Unicorn CPU emulator framework port for JavaScript",
"homepage": "http://alexaltea.github.io/unicorn.js/",
"authors": [
"Alexandro Sanchez Bach <alexaltea123@gmail.com>"
],
"repository": {
"type": "git",
"url": "https://github.com/AlexAltea/unicorn.js.git"
},
"main": [
"dist/unicorn.min.js"
],
"dependencies": {},
"devDependencies": {}
}
29 changes: 29 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "unicornjs",
"version": "0.9.0",
"description": "Unicorn CPU emulator framework port for JavaScript",
"author": "Alexandro Sanchez Bach <alexaltea123@gmail.com>",
"repository": {
"type": "git",
"url": "https://github.com/AlexAltea/unicorn.js.git"
},
"dependencies": {
},
"devDependencies": {
"bower": "^1.3.12",
"grunt": "^0.4.5",
"grunt-contrib-concat": "^1.0.1",
"grunt-contrib-connect": "^0.9.0",
"grunt-contrib-uglify": "^0.9.1",
"grunt-contrib-watch": "^0.6.1",
"grunt-exec": "~0.4.6",
"grunt-typescript": "~0.4.4",
"load-grunt-tasks": "^1.0.0",
"time-grunt": "^1.0.0",
"typescript": "~1.3.0"
},
"bugs": {
"url": "https://github.com/AlexAltea/unicorn.js/issues"
},
"private": true
}

0 comments on commit 05b4523

Please sign in to comment.