Commit graph

26 commits

Author SHA1 Message Date
Hyzual
acd2ae67f8 Adds grunt tasks related to CSS and SVG, updates all npm packages
Please do a npm install to update your copy of the packages.

- Adds a grunt task to build up a sprite out of our own svg icons
- Adds a grunt task to copy iconic's svg icons from bower
- Adds a build step to concatenate CSS files. It leaves us free to split the CSS and thus have the minimum css in each directory.
- Adds open-iconic as a bower dependency. We were using their icons, now we can use their svg sprite directly.
- Adds ng-html2JsPreprocessor. A karma preprocessor that helps us test template-url dependent directives.
- Removes jshint from the gruntfile. jshint should be used directly in your editor, e.g. SublimeLinter (https://github.com/SublimeLinter/SublimeLinter-jshint) for SublimeText
- Removes the plugins declaration from karma.conf.js which is now apparently unnecessary.
2015-05-22 00:05:37 +02:00
Hyzual
9fbd7bcf8e Removes jquery.base64.js (unused), replaced jquery.dateFormat-1.0.js with its bower version
- Adds a unit test in archive-service to test that we do use utils.formatDate
- Minor changes in subsonic-service.js to use a variable name rather than "this", which can change
2015-05-01 13:08:05 +02:00
Hyzual
812fff38cd Adds grunt-bump to make it easier to bump up versions in the 3 json files
Removes grunt-ng-annotate (unused), upgrades karma patch version
2015-03-24 18:36:55 +01:00
Hyzual
4cf0fbe6fd Cleans the coverage directory when running 'grunt coverage' 2015-02-15 15:14:32 +01:00
Hyzual
bf5f01d825 Replaces karma-growl-reporter by karma-notify-reporter
notify can use the native Windows 8, OS X and Linux notifications, and also supports Growl as a fallback.
2015-01-17 19:03:24 +01:00
Hyzual
e73d23bbaa Fixes the build with jit-grunt
Adds aliases to plugin that have different task names relative to the plugin name
2015-01-17 19:03:00 +01:00
Hyzual
96cc13b8a9 Replaces (load-grunt-task' by 'jit-grunt'. Only the needed tasks are loaded, so that watch is not slowed down by imagemin. 2015-01-17 19:02:48 +01:00
Hyzual
a8053384e9 Shorten grunt builds by moving 'load-grunt-tasks' inside each grunt registered task.
That way we avoid loading imagemin everytime on watch, which was the longest (almost 30sec).
We only have to load 'grunt-karma' everytime, but now testing is lightning fast !
2015-01-17 19:02:47 +01:00
Hyzual
4e8979c8e0 Adds grunt-notify. Adds 'coverage' task to open the coverage dir in the browser. 2015-01-17 19:02:47 +01:00
Hyzual
ce53362fbb Adds the Growl reporter for karma.
Removes the sellout package, it can always be installed globally and is not needed.
2015-01-17 19:02:47 +01:00
Hyzual
b2a426eaa2 Adds karma-coverage to generate test coverage reports using Istanbul.
Test coverage files are in the /coverage folder.
They indicate us for each js file which lines we ran and which we didn't run during unit tests. This helps us know what to test next.

Conflicts:
	package.json
2015-01-17 18:59:44 +01:00
Hyzual
b91e875c61 Grunt-ssh required files are now optional.
Allows people to use Grunt without having the grunt-ssh plugin installed.
Upgrades karma and karma-jasmine packages to fix the unit tests failing.

Conflicts:
	package.json
2014-11-19 16:47:30 +01:00
Hyzual
32782979f0 Removes component.json, since we don't use Component.
Corrects the Gruntfile's comments to stick to our structure.
2014-11-15 13:48:03 +01:00
Hyzual
271f05d7e8 Fixes 'grunt test'. In dev, karma now runs PhantomJS.
Chrome is run during the 'grunt test' task.
2014-11-15 13:47:11 +01:00
Hyzual
b0248725eb When deploying to the test server, Grunt now cleans up the folder before uploading.
This is to avoid filling it up with files : since our file names change every time there's a modification (filerev), every time we deployed we would have created a new copy of, say, scripts.min.js
2014-11-15 11:46:18 +01:00
Hyzual
7c8c33dbc3 All our CSS files are now minified and versioned.
Minifies and concat fancybox and jplayer CSS files.
Their images are now "flattened" into the dist/styles folder, so we no longer have a dist/bower_components folder.

The remaining javascript references to images or CSS files are also rewritten during Grunt build so they correctly reference the versioned file.

Merges the previous vendor and vendor2 javascript files into a single file containing all of our javascript dependencies, bower or not.

Removes some unnecessary Grunt tasks.
Removes some unused Grunt plugins.
2014-11-15 11:46:17 +01:00
Hyzual
137bef0b9d Adds a grunt 'deploy' task to build and deploy through sftp to a test server.
It uses credentials found in the /.ssh folder (gitignored for security reasons)
2014-11-15 11:46:17 +01:00
Hyzual
f51391f4b9 Moves the new images to the app folder. Fixes some small issues.
Comments out the cssmin parts of the build since we no longer use split-pane css, which was the only one I could minify.
2014-11-09 18:39:03 +01:00
Hyzual
8f7a97d417 Puts ngAnnotate a little while after concat so there's no conflict. 2014-11-09 18:39:03 +01:00
Hyzual
b4084e6cb0 Adds an imagemin step to the build.
Further speed up the production version by compressing even our images !
2014-11-09 18:39:02 +01:00
Hyzual
1fb70ea5ec Adds the first working grunt build aimed for deployment on production.
TL;DR : everything but CSS is minified and packed in a neat dist/ directory.

This build :
- Merges all vendor dependencies (jquery, angular, etc) into one minified file.
- Merges the non-bower vendor dependencies (UnityShim, jquery-split-pane, etc). into one minified file.
- Merges all our javascript into one minified file.
- Copies all the needed CSS (couldn't minify and rename it because of dependencies in the JS).
- Renames all the images, the minified javascripts (but not the CSS) in order to avoid browser caching.
- Minifies all our html files.

Adds usemin commentaries (the ones with build) to index.html. Don't remove them or the build will break.

Renames the json files to .json so the build can find them and copy them.

Corrects all the angular-injectable functions to use the long form (with the array) in order to be minified. The build should also do that now with ng-Annotate but since I did it when debugging problems with the build, might as well keep it.

Note: the grunt test target is broken. Haven't figured out why yet.

Conflicts:
	app/app.js
	app/common/directives.js
	app/index.html
	app/settings/settings.js
2014-11-09 18:39:02 +01:00
Hyzual
696c51a64c Adds a wiredep config to automatically add bower dependencies to karma.conf.js.
Remove jasmine as a dev-dependency, already included in karma-jasmine
2014-11-09 18:39:01 +01:00
Hyzual
a1d48bbd30 Reorganizes the entire app to follow Google's best practice recommendations for Angular App Structure.
see: https://docs.google.com/document/d/1XXMvReO8-Awi1EZXAXS4PzDzdNvV6pGcuaF4Q9821Es/pub

The files are now grouped by view / component.
Tests are located beside tested js files. The Grunt build will be responsible for only distributing actual files without the tests.
Each partial is at the same level as the js files related to it.
Ideally css files should be at the same level, maybe I'll refactor this later.

Moves all non-bower plugins to app/vendor.
Moves all images to app/images and styles to app/styles.
Merges the test and non-test jshintrc files.

Adds all the Jamstash contributors to the package.json file while I was refactoring.

Conflicts:
	app/app.js
	app/images/vgrabber.gif
	app/images/vgrabber2-active.gif
	app/images/vgrabber2-normal.gif
	app/index.html
2014-11-09 16:10:34 +01:00
Hyzual
2c6276cced Renames all tests according to angularseed's style convention.
Refactors subsonic service's getStarred method to use angular $http and to limit results on the client side since we can't do it with Subsonic's API.

Adds a working unit test for this new method.
2014-11-09 16:00:15 +01:00
Hyzual
fb8bf0ef24 Fixes the "serve" task to enable us to properly launch karma and run tests continuously.
Adds an override to enable wiredep to inject fancybox which doesn't have a "main" in its bower.json.

Tabs to spaces in Gruntfile.js.

Conflicts:
	index.html
2014-11-09 16:00:06 +01:00
Hyzual
dc6aa96d16 Adds a first Grunt file copied from the yeoman angular generator.
It enables us to :
- automatically inject our bower dependencies into index.html,
- run a webserver which will livereload whenever we change files
- run unit tests with karma on a real browser whenever we change files.

Renames the style dir into styles which is the convention.

I've removed a lot of the original gruntfile because I don't yet understand it. I'll add it back when I start working on how to distribute (minify, concat, etc.) the app.

Conflicts:
	index.html
2014-11-09 15:59:37 +01:00