These are chat archives for pixijs/pixi.js

14th
Jan 2018
Ivan Vodopiviz
@ivodopiviz
Jan 14 2018 08:54
I faced this months ago, I agree that it’s really bad. As Ivan said... most of the stuff that looks stupid... is actually stupid...
In my experience, it turns out that most of those modules, build systems and shit aren’t really necessary...
Ivan Vodopiviz
@ivodopiviz
Jan 14 2018 08:59
Unless you really need to automate processes you might even just use a small webserver like mongoose and link your js by hand to not the html
*To the
Roi Peker
@roipeker
Jan 14 2018 13:06
I know but yet if u deploy basic game/website u have use several libs (like Pixi GSAP stuffs, plus others and all game code modularized)
So without something that minifies and concatenates js code
How do u manage it?
I dont have a swf binary here :h
Ivan Popelyshev
@ivanpopelyshev
Jan 14 2018 13:07
use typescript, it concatenates js. as for minify, use it only for production
only when you are ready
i dont know why people add it in pipeline from the start and screw debugging
Roi Peker
@roipeker
Jan 14 2018 15:11
man... i'm stressed with this.
i swear that if i EVER find a way to develop this properly i will make a nice and clear tutorial :D
if i dont lose my nerve in the process.
Roi Peker
@roipeker
Jan 14 2018 15:19
ivan

correct me.... using IntellijIdea

create Static Web Project > my-project

cd my-project

$npm init -y
$npm i pixi.js @types/pixi.js --save-dev

one time thing

$npm i typescript --global


create src/ to store all the files in it

src/index.html
src/css/styles.css
src/scripts/... contains all .ts files
src/libs/... maybe pixi.js and others here or i should use the node_modules folder?

holly cow, sorry about the text format ....
Ivan Popelyshev
@ivanpopelyshev
Jan 14 2018 15:20
i use src only for js/ts
Roi Peker
@roipeker
Jan 14 2018 15:20
ok, what about the rest ?
Ivan Popelyshev
@ivanpopelyshev
Jan 14 2018 15:20
make "public" for the rest
Roi Peker
@roipeker
Jan 14 2018 15:20
ok
Ivan Popelyshev
@ivanpopelyshev
Jan 14 2018 15:20
and put lib there too
Roi Peker
@roipeker
Jan 14 2018 15:20
ok... lib should contain minified or regular JS files ?
Ivan Popelyshev
@ivanpopelyshev
Jan 14 2018 15:20
configure typescript (tsconfig.json) that it takes all from src and outputs somewhere in public
Roi Peker
@roipeker
Jan 14 2018 15:20
ok
pixi.js should be used from the CDN, or a local copy ... minified or not?
Roi Peker
@roipeker
Jan 14 2018 15:27
@ivanpopelyshev the tsconfig that u shared with me has "typeRoots": ["lib/"]
what should be in there?
the contents of node_modules/@types/pixi.js ?
Ivan Popelyshev
@ivanpopelyshev
Jan 14 2018 17:39
there are two ways to use ///<reference types="pixi.js"/>
tsc automatically takes libs from "node_modules/@types", and from your "lib" because i specified it in config
format : "LIB/index.d.ts"
for pixi its "pixi.js/index.d.ts"