Skip to content
This repository has been archived by the owner on Apr 23, 2019. It is now read-only.

Releases: onehippo/frontend-build

Handle linked Bower dependencies

25 May 08:52
Compare
Choose a tag to compare

Hippo build can now handle linked Bower dependencies (e.g. created with bower link <dependency> to point to a local clone of a dependency).

Less karma output

30 Mar 11:20
Compare
Choose a tag to compare

So the previous tag had some extra karma output, nice but it was too much. Especially the output when having a failing test would require you to scroll up the entire table of coverage files. Also whats really important about the test output? The failing ones. So therefore we have switched back to the coverage text-summary instead of the full table, and set the mocha reporter to only output failed tests and a summary.

Detailed and better karma output

27 Mar 17:49
Compare
Choose a tag to compare

Karma now uses the mocha reporter to have better output and it shows complete list of sources in the text summary in the terminal.
Default karma files now include the scripts, templates and unitTests, you can override these or concat them with your own.

BREAKING CHANGES:

  • The testSingleRun task has been renamed to test. gulp test will run all the tests once in a new karma instance and then exit.

frontend-components library compatiblity

23 Mar 09:58
Compare
Choose a tag to compare

BREAKING CHANGES:

  • Your project should include the polyfills themselves now depending on what browser you need to support
  • there should now be a index.js and index.scss in the root of the app if you want to use scripts/styles
  • the '[project-name]-templates' module that includes the app's templates has been renamed to 'templates'. You need to update your app's dependencies to match this.

Issues fixed:
FEBUILD-3
FEBUILD-4
FEBUILD-5
FEBUILD-6

Multiple SASS files

21 Mar 11:44
Compare
Choose a tag to compare

The build now processes all SASS files that don't start with an underscore, instead of just the ${projectName}.scss file. Projects can use this to generate multiple CSS files from the SASS sources. The assumption is that all partials always start with an underscore, which should be the case anyway.

Karma autowatch

18 Mar 15:15
Compare
Choose a tag to compare
  • Karma was outputting tests twice when using gulp watch. A combination of karma start and karma run
    Fixed by letting karma autowatch files itself.
  • Debounce script task, when saving multiple .js files at once the scripts task is only run once.

PhantomJS be gone!

16 Mar 14:30
Compare
Choose a tag to compare

So we decided to switch to Chrome for standard karma test running. Phantomjs gave too many headaches when it came to coding and testing. It was basicly another browser to support, with bad implementation of standards.

BREAKING CHANGES:

  • This update will allow you to write es6 in your tests! Therefore the eslint configs have also been updated. Expect to get lint errors when updating to this tag.

ES2015 & dependency updates

15 Mar 08:58
Compare
Choose a tag to compare
  • Transformed the code into es2015 as far as node supports it.
  • Updated npm dependencies

BREAKING CHANGES:

  • the default paths like cfg.srcDir or cfg.bowerDir no longer end themselves with a / because it is better readable when using template strings, as we should in es2015 according to our airbnb guide.
  • Updating the eslint airbnb config and fixing the merging of rules between tests and actual lints might now give you a couple of lint errors you need to fix.

Changed serving of fixture files

14 Mar 21:28
Compare
Choose a tag to compare

To serve fixture files from Karma's built-in HTTP server we recommended adding an entry to the systemjs.includeFiles of karma.conf.js. This caused Karma to try and load all fixtures files by default when starting the tests. For example, an .html fixture file would be represented in the DOM as a <link> element in the <head> section of the test page. A side effect of this approach was that these files were also exposed via Karma's HTTP-server and as we previously only used .html fixtures, we did not notice any problems with it. But when using CSS fixtures, the styles in the fixture file would always be present, in all tests, which is not what we want.

This is fixed by adding an entry to the files property in karma.conf.js instead:

var hippoBuild = require('hippo-build');
var hippoConfig = hippoBuild.buildConfig(require('./build.conf.js'));

module.exports = function karmaConfig(config) {
  ..
  hippoConfig.karma.files = [
    ..
    hippoConfig.src.fixtures,
  ];
  config.set(hippoConfig.karma);
};

Note that value of hippoConfig.src.fixtures changed from a string to a pattern object and hippo-build now also allows javascript fixture files:

{ 
  pattern: cfg.srcDir + '**/*.fixture.+(js|html|css|json)', 
  included: false 
}


Copy files

09 Mar 14:50
Compare
Choose a tag to compare

Added the 'copyFiles' task. For example:

copyFiles: [
  {
    src: 'someDir/*.js',
    dest: 'targetDir'
  }
]

Removed the 'bowerAssets' task. You should use copyFiles instead.