You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Disable CSP when DEBUG mode is enabled and build the templates using Jenkins.
Pro:
Not much changes for developers required
Contra:
We're not testing the real deployment scenario, so CSP would be disabled and developers might do things that are forbidden with CSP which screws up on real live instances.
… however we might be able to configure JSHint and Scrutinizer to detect this.
Approach 2
We tell the developers to execute Handlebars precompiler manually everytime they did a change.
Pro:
No changes on CI environment required.
Contra:
Needs to run handlebars --extension=tmpl tags.tmpl -f tags.tmpl.js before seeing the changes.
I guess it might be possible to configure JSHint to detect uses of eval + Function (and scrutiinizer).
If we find a way to catch that early it might work ?
Activity
LukasReschke commentedon Feb 20, 2015
@Raydiation told me that we maybe could use grunt…
MorrisJobke commentedon Feb 20, 2015
Or Make or Bash or PHP ;)
LukasReschke commentedon Feb 20, 2015
But that wouldn't be a fancy tool for web 3.0 hipsters :(
BernhardPosselt commentedon Feb 20, 2015
Well, since we should probably also use it for JS development it just makes sense to also let it do that.
The News app watches js, templates and css https://github.com/owncloud/news/blob/master/js/Gruntfile.js#L125
If any file changes, the stuff is minimized and the page is then refreshed using live reload. How does that sound ;D?
BernhardPosselt commentedon Feb 20, 2015
You may want to run jshint for instance while developing
cc @PVince81
DeepDiver1975 commentedon Feb 20, 2015
not really - my IDE shows this inline ;-)
DeepDiver1975 commentedon Feb 20, 2015
bäääh - I really don't like to have build artifacts in git (minizied and generated stuff)
BernhardPosselt commentedon Feb 20, 2015
@DeepDiver1975 ok, another thing: what about wrapping your stuff in a function to not pollute the global namespace :D? http://markdalgleish.com/2011/03/self-executing-anonymous-functions/
Running Unittests on file save?
I doubt we can handle everything through the asset pipeline.
LukasReschke commentedon Feb 20, 2015
Lets add some options in the top post for easier discussion later…
PVince81 commentedon Feb 20, 2015
I guess it might be possible to configure JSHint to detect uses of eval + Function (and scrutiinizer).
If we find a way to catch that early it might work ?
LukasReschke commentedon Feb 20, 2015
Yes. That might indeed be a possibility. Remains the question how we handle the real life deployment scenario 🙈
10 remaining items
PVince81 commentedon Sep 21, 2015
Still haven't found a good way to make Handlebars work with our project restrictions (no build scripts) and unit tests. Moving to 9.0
PVince81 commentedon Sep 1, 2016
Requires #26006 to compile JS template thanks to the new Makefile
PVince81 commentedon Jan 27, 2017
and also needs porting all the existing handlebar templates to precompiled templates