llpujol

Members
  • Content Count

    8
  • Joined

  • Last visited

  1. Here is one example: https://github.com/llorenspujol/parcel-pixijs-quickstarter Is a simple quickstarter project with PixiJs and Typescript using Parcel. Here are it's default scripts: "test": "karma start", "start": "npm run clean && parcel src/index.html", "build": "npm run clean && parcel build src/index.html --public-url ./", "build_serve": "npm run build && http-server ./dist", "clean": "rimraf ./dist ./.cache" In order to build the project just run 'npm run build'. If you want also serve it, just run 'npm build_serve' (it uses http-server in order to serve it as you). About the disk space, having the dependencies globally is not the best solution and it has a lot of troubleshoots. There are many other ways in order to 'share' dependencies between project more safer and efficient than that. You can have for example a 'monorepo' like infrastructure, in order to achieve it. Check it out yarn workspaces and the lerna project, I am sure it will make you re-think the way you are managing your projects. One HUGE advantage of that, is that it will enable you to share ALL your dependencies, not only Browserify and Typescript. With this improvement, you will no longer need to zip/unzip your project anymore, since most of the MB you see now when zipping/unzipping are from the node_modules. So in resume, check it out to move your examples into a monorepo-like infrastructure. With that, you will solve 2 problems: 1- Share ALL dependencies (and do it safely), since now you are only sharing Browserify and Typescript (as far as I know) 2- Avoid zipping/unzipping your project, that I am sure that is a costly extra step. That of course you can automatize or whatever, but you can get rid of it with this solution. If you need some help about that 'monorepo-like' infrastructure, you can DM me.
  2. If you use AMD in order to reference your modules, you should configure your rollup config in order to let it know you do this way. Here in this github issue is discussed a little bit, there are some solutions to this problems that I am sure will help you. Although, If you can, I would recommend you to stop using require and use ES6 modules (import/export) that is an accepted standard. PD: If you are developing on browser environment, checkout this quickstart-pixijs project, it can maybe help you too! It uses Parcel under the hood. Also, if you want to make some kind of library (as it seems in your example) is pretty easy to configure, just let me know!
  3. Just curiosity... what type of server side rendering are you trying to achieve? I mean, you want to render some kind of content and send for example images/video to the client? Or you need to render on server side because the state logic calculations cannot be possible made without rendering? Another use case? Just curious, maybe if you provide some information we can help:)
  4. hey @gcardozo, As said in the comments, you have to use typescript in order to have this type of auto-completion. I created a PixiJS quick-starter, that uses typescript. You can try it out: https://github.com/llorenspujol/parcel-pixijs-quickstarter Also, If something isn't work as expected, you can post an issue, and i will check it. Hope this helps.
  5. mmmm okay, but @types/pixi.js has nothing to do with what I mentioned... What you have to check is if pixi.js is correctly installed as a dependency. If the files are there, webpack should find them and all has to be okay... One thing I see is that in your package.json, you have pixi.js as a devDependency, but it should go on the dependency object, like this: "devDependencies": { "@types/pixi.js": "4.8.1", "clean-webpack-plugin": "0.1.19", "ts-loader": "5.2.1", "typescript": "3.1.2", "webpack": "4.20.2", "webpack-cli": "3.1.2" }, "dependencies": { "pixi.js": "4.8.2" } Maybe this solves the issue, can you try it? If you continue having problems to bundle pixi.js with webpack, you can try this pixi.js quickstart project: https://github.com/llorenspujol/parcel-pixijs-quickstarter And if you have troubles too, you can post an issue on github, and I will resolve it. Hope this helps.
  6. Hi Rossi, Have you checked that pixi.js have been correctly installed in your dependencies? (node_modules) The index.js file yes it seems correctly encountered: ./node_modules/pixi.js/lib/index.js , but not all folders in it like ./node_modules/pixi.js/lib/accessibility or ./node_modules/pixi.js/lib/core
  7. Hi, I am working now with some projects involving Pixi.js I have made a quickstart project, with the minimum tooling, in order to start developing with Pixi.js from 0. It uses Parcel and all its amazing features like Hot Module Reloading. Highlight features: - Super fast start - Hot Module Reloading - Typescript - Unit testing Here is the GitHub link: https://github.com/llorenspujol/parcel-pixijs-quickstarter Hope can help someone to start a Pixi.js project:)