Skip to content

Commit

Permalink
Creates separate builds for lib and dist, removes bin
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Karl committed Nov 14, 2016
1 parent 0711724 commit 05c2421
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 25 deletions.
5 changes: 5 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
presets: [
["es2015", { "loose": true }]
]
}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ docs/
examples_old/
bin/
coverage/
lib/
dist/

# jetBrains IDE ignores
.idea
34 changes: 12 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"Chad Engler <[email protected]>",
"Richard Davey <[email protected]>"
],
"main": "./bin/pixi.min.js",
"main": "./lib/index.js",
"homepage": "http://goodboydigital.com/",
"bugs": "https://github.com/pixijs/pixi.js/issues",
"license": "MIT",
Expand All @@ -18,31 +18,33 @@
"url": "https://github.com/pixijs/pixi.js.git"
},
"scripts": {
"clean": "rimraf bin && mkdirp bin",
"clean": "rimraf dist lib && mkdirp dist && mkdir lib",
"prestart": "npm run clean",
"start": "parallelshell \"npm run watch:lint\" \"npm run watch\"",
"watch": "pixify -n PIXI -o pixi -w",
"watch": "npm run build -- --watch",
"watch:lint": "watch \"eslint scripts src test || exit 0\" src",
"watch:bundle": "npm run bundle -- -w",
"test": "floss --path test/index.js",
"test:debug": "npm test -- --debug",
"prerenders": "npm --prefix scripts/renders i scripts/renders",
"renders": "electron scripts/renders",
"precoverage": "rimraf coverage && npm run build -- --noExternal",
"coverage": "npm test -- -c bin/pixi.js -s -h",
"coverage": "npm test -- -c dist/pixi.js -s -h",
"lint": "eslint scripts src test --max-warnings 0",
"lintfix": "npm run lint --fix",
"prebuild": "npm run lint && npm run clean",
"build": "pixify -n PIXI -o pixi",
"prebuild": "npm run lint",
"build": "babel src --out-dir lib",
"bundle": "pixify -d dist -n PIXI -o pixi",
"docs": "jsdoc -c scripts/jsdoc.conf.json -R README.md",
"publish:patch": "npm version patch --no-git-tag-version && npm publish",
"publish:minor": "npm version minor --no-git-tag-version && npm publish",
"publish:major": "npm version major --no-git-tag-version && npm publish",
"postversion": "npm run build && npm test",
"postversion": "npm run clean && npm run build && npm run bundle && npm test",
"postpublish": "node scripts/release.js"
},
"files": [
"bin/",
"src/",
"dist/",
"lib/",
"CONTRIBUTING.md",
"LICENSE",
"package.json",
Expand Down Expand Up @@ -79,19 +81,7 @@
},
"browserify": {
"transform": [
[
"babelify",
{
"presets": [
[
"es2015",
{
"loose": true
}
]
]
}
],
"babelify",
"glslify",
"browserify-versionify"
]
Expand Down
4 changes: 2 additions & 2 deletions scripts/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ const packageInfo = require(path.join(__dirname, '..', 'package.json'));

const options = {
src: [
'bin/**/*',
'dist/**/*',
'lib/**/*',
'scripts/**/*',
'src/**/*',
'test/**/*',
'*.json',
'*.md',
Expand Down
2 changes: 1 addition & 1 deletion test/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

/* eslint-disable global-require */
require('../bin/pixi');
require('../lib/');

PIXI.utils.skipHello(); // hide banner

Expand Down

0 comments on commit 05c2421

Please sign in to comment.