This commit is contained in:
Yury Delendik 2013-12-04 14:21:14 -06:00
Родитель a30446d048
Коммит 8e1e97178a
4 изменённых файлов: 112 добавлений и 1 удалений

2
.gitignore поставляемый
Просмотреть файл

@ -19,4 +19,6 @@ src/avm2/utils/js
src/flash/playerglobal.js
src/flash/playerglobal.abc
node_modules/
build/

78
Gruntfile.js Normal file
Просмотреть файл

@ -0,0 +1,78 @@
/* -*- Mode: js; js-indent-level: 2; indent-tabs-mode: nil; tab-width: 2 -*- */
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
/*
* Copyright 2013 Mozilla Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
jshint: {
options: {
jshintrc: 'test/jshint_config.json'
},
all: ['src/avm1/*.js', 'src/flash/**/*.js', 'src/swf/*.js']
},
exec: {
reftest: {
cmd: 'make -C test/ reftest'
},
makeref: {
cmd: 'make -C test/ makeref'
},
webserver: {
cmd: 'python utils/webserver.py'
},
build_web: {
cmd: 'make -C web/ build'
},
build_extension: {
cmd: 'make -C extension/firefox/ build'
},
generate_abcs: {
cmd: 'python generate.py',
cwd: 'src/avm2/generated'
}
},
watch: {
web: {
files: 'extension/firefox/**/*',
tasks: ['build-web']
},
extension: {
files: 'extension/firefox/**/*',
tasks: ['build-extension', 'build-web']
},
abcs: {
files: 'src/avm2/generated/**/*.as',
tasks: ['exec:generate_abcs']
}
}
});
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-exec');
grunt.registerTask('lint', ['jshint:all']);
// temporary make/python calls based on grunt-exec
grunt.registerTask('reftest', ['exec:reftest']);
grunt.registerTask('makeref', ['exec:makeref']);
grunt.registerTask('server', ['exec:webserver']);
grunt.registerTask('build-web', ['exec:build_web']);
grunt.registerTask('build-extension', ['exec:build_extension']);
};

31
package.json Normal file
Просмотреть файл

@ -0,0 +1,31 @@
{
"name": "shumway",
"version": "0.7.0",
"devDependencies": {
"grunt": "~0.4.2",
"grunt-contrib-jshint": "~0.7.2",
"grunt-exec": "~0.4.2",
"grunt-contrib-watch": "~0.5.3"
},
"description": "Shumway is an HTML5 technology experiment that explores building a faithful and efficient renderer for the SWF file format without native code assistance.",
"main": "Gruntfile.js",
"directories": {
"example": "examples",
"test": "test"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "https://github.com/mozilla/shumway.git"
},
"author": "Mozilla Research",
"licenses" : [{
"type": "Apache",
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
}],
"bugs": {
"url": "https://github.com/mozilla/shumway/issues"
}
}

Просмотреть файл

@ -1093,7 +1093,7 @@ var RED = '\033[91m';
var ENDC = '\033[0m';
var IndentingWriter = (function () {
var consoleOutFn = console.info.bind(console);
var consoleOutFn = inBrowser ? console.info.bind(console) : print;
function indentingWriter(suppressOutput, outFn) {
this.tab = " ";
this.padding = "";