Skip to content

Commit 4101ad9

Browse files
author
Andrew Start
committed
Merge branch 'dev'
2 parents ca17505 + 86156b5 commit 4101ad9

File tree

497 files changed

+149796
-90805
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

497 files changed

+149796
-90805
lines changed

.editorconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
; This file is for unifying the coding style for different editors and IDEs.
2+
; More information at http://EditorConfig.org
3+
root = true
4+
5+
[**.js]
6+
indent_style = space
7+
indent_size = 4
8+
end_of_line = lf
9+
charset = utf-8
10+
trim_trailing_whitespace = true
11+
insert_final_newline = true

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
node_modules
22
.DS_Store
3-
.project
3+
.project
4+
*.sublime-*
5+
*.log
6+
7+
bin/pixi.dev.js.map

.jshintrc

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
{
2+
// --------------------------------------------------------------------
3+
// JSHint Configuration
4+
// --------------------------------------------------------------------
5+
//
6+
// @author Chad Engler <chad@pantherdev.com>
7+
8+
// == Enforcing Options ===============================================
9+
//
10+
// These options tell JSHint to be more strict towards your code. Use
11+
// them if you want to allow only a safe subset of JavaScript, very
12+
// useful when your codebase is shared with a big number of developers
13+
// with different skill levels.
14+
15+
"bitwise" : false, // Disallow bitwise operators (&, |, ^, etc.).
16+
"camelcase" : true, // Force all variable names to use either camelCase or UPPER_CASE.
17+
"curly" : false, // Require {} for every new block or scope.
18+
"eqeqeq" : true, // Require triple equals i.e. `===`.
19+
"es3" : false, // Enforce conforming to ECMAScript 3.
20+
"forin" : false, // Disallow `for in` loops without `hasOwnPrototype`.
21+
"immed" : true, // Require immediate invocations to be wrapped in parens e.g. `( function(){}() );`
22+
"indent" : 4, // Require that 4 spaces are used for indentation.
23+
"latedef" : true, // Prohibit variable use before definition.
24+
"newcap" : true, // Require capitalization of all constructor functions e.g. `new F()`.
25+
"noarg" : true, // Prohibit use of `arguments.caller` and `arguments.callee`.
26+
"noempty" : true, // Prohibit use of empty blocks.
27+
"nonew" : true, // Prohibit use of constructors for side-effects.
28+
"plusplus" : false, // Disallow use of `++` & `--`.
29+
"quotmark" : true, // Force consistency when using quote marks.
30+
"undef" : true, // Require all non-global variables be declared before they are used.
31+
"unused" : true, // Warn when varaibles are created by not used.
32+
"strict" : false, // Require `use strict` pragma in every file.
33+
"trailing" : true, // Prohibit trailing whitespaces.
34+
"maxparams" : 8, // Prohibit having more than X number of params in a function.
35+
"maxdepth" : 8, // Prohibit nested blocks from going more than X levels deep.
36+
"maxstatements" : false, // Restrict the number of statements in a function.
37+
"maxcomplexity" : false, // Restrict the cyclomatic complexity of the code.
38+
"maxlen" : 220, // Require that all lines are 100 characters or less.
39+
"globals" : { // Register globals that are used in the code.
40+
//commonjs globals
41+
"module": false,
42+
"require": false,
43+
44+
// PIXI globals
45+
"PIXI": false,
46+
"spine": false,
47+
48+
//chai globals
49+
"chai": false,
50+
51+
//mocha globals
52+
"describe": false,
53+
"it": false,
54+
55+
//resemble globals
56+
"resemble": false
57+
},
58+
59+
// == Relaxing Options ================================================
60+
//
61+
// These options allow you to suppress certain types of warnings. Use
62+
// them only if you are absolutely positive that you know what you are
63+
// doing.
64+
65+
"asi" : false, // Tolerate Automatic Semicolon Insertion (no semicolons).
66+
"boss" : true, // Tolerate assignments inside if, for & while. Usually conditions & loops are for comparison, not assignments.
67+
"debug" : false, // Allow debugger statements e.g. browser breakpoints.
68+
"eqnull" : false, // Tolerate use of `== null`.
69+
"esnext" : false, // Allow ES.next specific features such as `const` and `let`.
70+
"evil" : false, // Tolerate use of `eval`.
71+
"expr" : false, // Tolerate `ExpressionStatement` as Programs.
72+
"funcscope" : false, // Tolerate declarations of variables inside of control structures while accessing them later from the outside.
73+
"globalstrict" : false, // Allow global "use strict" (also enables 'strict').
74+
"iterator" : false, // Allow usage of __iterator__ property.
75+
"lastsemic" : false, // Tolerate missing semicolons when the it is omitted for the last statement in a one-line block.
76+
"laxbreak" : false, // Tolerate unsafe line breaks e.g. `return [\n] x` without semicolons.
77+
"laxcomma" : false, // Suppress warnings about comma-first coding style.
78+
"loopfunc" : false, // Allow functions to be defined within loops.
79+
"moz" : false, // Code that uses Mozilla JS extensions will set this to true
80+
"multistr" : false, // Tolerate multi-line strings.
81+
"proto" : false, // Tolerate __proto__ property. This property is deprecated.
82+
"scripturl" : false, // Tolerate script-targeted URLs.
83+
"smarttabs" : false, // Tolerate mixed tabs and spaces when the latter are used for alignmnent only.
84+
"shadow" : false, // Allows re-define variables later in code e.g. `var x=1; x=2;`.
85+
"sub" : false, // Tolerate all forms of subscript notation besides dot notation e.g. `dict['key']` instead of `dict.key`.
86+
"supernew" : false, // Tolerate `new function () { ... };` and `new Object;`.
87+
"validthis" : false, // Tolerate strict violations when the code is running in strict mode and you use this in a non-constructor function.
88+
89+
// == Environments ====================================================
90+
//
91+
// These options pre-define global variables that are exposed by
92+
// popular JavaScript libraries and runtime environments—such as
93+
// browser or node.js.
94+
95+
"browser" : true, // Standard browser globals e.g. `window`, `document`.
96+
"couch" : false, // Enable globals exposed by CouchDB.
97+
"devel" : false, // Allow development statements e.g. `console.log();`.
98+
"dojo" : false, // Enable globals exposed by Dojo Toolkit.
99+
"jquery" : false, // Enable globals exposed by jQuery JavaScript library.
100+
"mootools" : false, // Enable globals exposed by MooTools JavaScript framework.
101+
"node" : false, // Enable globals available when code is running inside of the NodeJS runtime environment. (for Gruntfile)
102+
"nonstandard" : false, // Define non-standard but widely adopted globals such as escape and unescape.
103+
"prototypejs" : false, // Enable globals exposed by Prototype JavaScript framework.
104+
"rhino" : false, // Enable globals available when your code is running inside of the Rhino runtime environment.
105+
"worker" : false, // Enable globals available when your code is running as a WebWorker.
106+
"wsh" : false, // Enable globals available when your code is running as a script for the Windows Script Host.
107+
"yui" : false, // Enable globals exposed by YUI library.
108+
109+
// == JSLint Legacy ===================================================
110+
//
111+
// These options are legacy from JSLint. Aside from bug fixes they will
112+
// not be improved in any way and might be removed at any point.
113+
114+
"nomen" : false, // Prohibit use of initial or trailing underbars in names.
115+
"onevar" : false, // Allow only one `var` statement per function.
116+
"passfail" : false, // Stop on first error.
117+
"white" : false, // Check against strict whitespace and indentation rules.
118+
119+
// == Undocumented Options ============================================
120+
//
121+
// While I've found these options in some projects, they are not
122+
// described in the [JSHint Options documentation][4].
123+
//
124+
// [4]: http://www.jshint.com/options/
125+
126+
"maxerr" : 100 // Maximum errors before stopping.
127+
}

.travis.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
language: node_js
2+
node_js:
3+
- "0.10"
4+
5+
branches:
6+
only:
7+
- master
8+
- dev
9+
10+
install:
11+
- npm install grunt-cli
12+
- npm install
13+
14+
cache:
15+
directories:
16+
- node_modules
17+
18+
before_script:
19+
- export DISPLAY=:99.0
20+
- sh -e /etc/init.d/xvfb start
21+
22+
script:
23+
- ./node_modules/.bin/grunt travis

CONTRIBUTING.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# How to contribute
2+
3+
It is essential to the development of pixi.js that the community is empowered
4+
to make changes and get them into the library. Here are some guidlines to make
5+
that process silky smooth for all involved.
6+
7+
## Reporting issues
8+
9+
To report a bug, request a feature, or even ask a question, make use of the GitHub Issues
10+
section for [pixi.js][0]. When submitting an issue please take the following steps:
11+
12+
1. **Seach for existing issues.** Your question or bug may have already been answered or fixed,
13+
be sure to search the issues first before putting in a duplicate issue.
14+
15+
2. **Create an isolated and reproducible test case.** If you are reporting a bug, make sure you
16+
also have a minimal, runnable, code example that reproduces the problem you have.
17+
18+
3. **Include a live example.** After narrowing your code down to only the problem areas, make use
19+
of [jsFiddle][1], [jsBin][2], or a link to your live site so that we can view a live example of the problem.
20+
21+
4. **Share as much information as possible.** Include browser version affected, your OS, version of
22+
the library, steps to reproduce, etc. "X isn't working!!!1!" will probably just be closed.
23+
24+
25+
## Making Changes
26+
27+
To setup for making changes you will need node.js, and grunt installed. You can download node.js
28+
from [nodejs.org][3]. After it has been installed open a console and run `npm i -g grunt-cli` to
29+
install the global `grunt` executable.
30+
31+
After that you can clone the pixi.js repository, and run `npm i` inside the cloned folder.
32+
This will install dependencies necessary for building the project. Once that is ready, make your
33+
changes and submit a Pull Request. When submitting a PR follow these guidlines:
34+
35+
- **Send Pull Requests to the `dev` branch.** All Pull Requests must be sent to the `dev` branch,
36+
`master` is the latest release and PRs to that branch will be closed.
37+
38+
- **Ensure changes are jshint validated.** After making a change be sure to run the build process
39+
to ensure that you didn't break anything. You can do this with `grunt && grunt test` which will run
40+
jshint, rebuild, then run the test suite.
41+
42+
- **Never commit new builds.** When making a code change, you should always run `grunt` which will
43+
rebuild the project, *however* please do not commit these new builds or your PR will be closed.
44+
45+
- **Only commit relevant changes.** Don't include changes that are not directly relevant to the fix
46+
you are making. The more focused a PR is, the faster it will get attention and be merged. Extra files
47+
changing only whitespace or trash files will likely get your PR closed.
48+
49+
## Quickie Code Style Guide
50+
51+
- Use 4 spaces for tabs, never tab characters.
52+
53+
- No trailing whitespace, blank lines should have no whitespace.
54+
55+
- Always favor strict equals `===` unless you *need* to use type coercion.
56+
57+
- Follow conventions already in the code, and listen to jshint.
58+
59+
[0]: https://github.com/GoodBoyDigital/pixi.js/issues
60+
[1]: http://jsfiddle.net
61+
[2]: http://jsbin.com/
62+
[3]: http://nodejs.org

0 commit comments

Comments
 (0)