mirror of
https://github.com/not-kennethreitz/convore.json.git
synced 2026-06-21 07:31:00 +00:00
1 line
2.1 KiB
JSON
1 line
2.1 KiB
JSON
[{"user_id": 39343, "stars": [], "topic_id": 43338, "date_created": 1312538171.5023401, "message": "Hey. I'm using the 2.0.0 rc, and really enjoying the Sprockets integration\u2014makes concatenation and minification of JavaScript incredibly easy! However, when developing, I would like to use the \"real\" js file, to be able to debug them properly. What would be the \"correct\" way of disabling this feature except for in the build process? I'm thinking my HAML/Slim template would contain logic to include scripts based on the environment, but I'm not sure about the actual compilation of the js files\u2026", "group_id": 10410, "id": 1800811}, {"user_id": 7586, "stars": [], "topic_id": 43338, "date_created": 1312751788.061192, "message": "Files should not be minified in dev, so they should still be fairly easy to debug, even when concatenated", "group_id": 10410, "id": 1816355}, {"user_id": 7586, "stars": [], "topic_id": 43338, "date_created": 1312751888.7201071, "message": "There are 3rd party JS libraries like StealJS, LabJS and RequireJS which do DOM injection (creating new script tags on the fly) for dev mode, but have a compiler which generates a single JS file during compilation. I'd suggest using one of these, then using the after_build callback (see http://middlemanapp.com/guides/extensions) to run the compiler after your middleman build.", "group_id": 10410, "id": 1816365}, {"user_id": 7586, "stars": [], "topic_id": 43338, "date_created": 1312751765.923691, "message": "I'd recommend against this. The combined files (via Sprockets) could introduce bugs if some of your included code was careless about scoping. If you had code running differently between dev and build, you wouldn't find this bug until you built. Which means you'd have to do an additional testing phase after build.", "group_id": 10410, "id": 1816353}, {"user_id": 39343, "stars": [], "topic_id": 43338, "date_created": 1312789819.459744, "message": "Thanks for the tip! I'm aware of the issues that this might introduce, since I'm used to juggling JS resources, but thanks for the reminder.", "group_id": 10410, "id": 1819382}] |