From 047f111d5cbb3c38bb417340b31af94bb76aef93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= Date: Thu, 29 Nov 2018 12:03:19 +0100 Subject: [PATCH] maybe crafty works like this --- package.json | 6 ++++-- src/game.js | 8 +++++--- webpack.config.js | 4 ++++ 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index ce19bca..30907d9 100644 --- a/package.json +++ b/package.json @@ -20,17 +20,19 @@ "postcss-loader": "^3.0.0", "sass-loader": "^7.1.0", "style-loader": "^0.23.1", + "transform-loader": "^0.2.4", "autoprefixer": "^9.3.1", + "brfs": "^2.0.1", "node-sass": "^4.10.0", "precss": "^3.1.2", "webpack": "^4.25.1", "webpack-cli": "^3.1.2", "bootstrap": "^4.1.3", + "craftyjs": "^0.9.0", "jquery": "^3.3.1", - "popper.js": "^1.14.5", - "craftyjs": "^0.9.0" + "popper.js": "^1.14.5" }, "dependencies": { diff --git a/src/game.js b/src/game.js index 30094ef..f29309e 100644 --- a/src/game.js +++ b/src/game.js @@ -1,4 +1,6 @@ -import Crafty from 'craftyjs' -import CONF from './game/config.coffee' +import $ from 'jquery' -require('./game/test_entities.coffee') +$(() => { + require('craftyjs/dist/crafty.js') + require('./game/test_entities.coffee') +}) diff --git a/webpack.config.js b/webpack.config.js index 9a61579..a048f6f 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -17,6 +17,10 @@ module.exports = { module: { rules: [ + { + loader: "transform-loader?brfs", + enforce: "post" + }, { test: /\.css$/,