Skip to content

Commit

Permalink
Converted to module (mrdoob#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
terkelg authored and mrdoob committed Oct 29, 2016
1 parent a58ac96 commit e7230a5
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 11 deletions.
5 changes: 1 addition & 4 deletions build/stats.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 9 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "stats.js",
"version": "0.16.0",
"version": "0.17.0",
"description": "JavaScript Performance Monitor",
"main": "build/stats.min.js",
"directories": {
Expand All @@ -11,6 +11,9 @@
"src"
],
"scripts": {
"build": "rollup -c",
"build-uglify": "rollup -c && uglifyjs build/stats.js -cm --preamble \"// stats.js - http://github.com/mrdoob/stats.js\" > build/stats.min.js",
"build-closure": "rollup -c && java -jar utils/compiler/compiler.jar --language_in=ECMASCRIPT5_STRICT --js build/stats.js --js_output_file build/stats.min.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
Expand All @@ -27,5 +30,9 @@
"bugs": {
"url": "https://github.com/mrdoob/stats.js/issues"
},
"homepage": "https://github.com/mrdoob/stats.js"
"homepage": "https://github.com/mrdoob/stats.js",
"devDependencies": {
"rollup": "^0.36.0",
"uglifyjs": "^2.4.10"
}
}
6 changes: 6 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export default {
entry: 'src/Stats.js',
dest: 'build/stats.js',
moduleName: 'Stats',
format: 'umd'
};
6 changes: 1 addition & 5 deletions src/Stats.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,4 @@ Stats.Panel = function ( name, fg, bg ) {

};

if ( typeof module === 'object' ) {

module.exports = Stats;

}
export { Stats as default };
Empty file modified utils/builder.py
100644 → 100755
Empty file.
Empty file modified utils/compiler/COPYING
100644 → 100755
Empty file.
Empty file modified utils/compiler/README.md
100644 → 100755
Empty file.
Binary file modified utils/compiler/compiler.jar
Binary file not shown.

0 comments on commit e7230a5

Please sign in to comment.