Skip to content

Releases: yeoman/generator

v0.17.0-pre.4

07 May 06:16
Compare
Choose a tag to compare
v0.17.0-pre.4 Pre-release
Pre-release

Generators

  • Fix appendStyles and appendScripts signature to match appendFiles.
  • option defaults no longer display if default value is an empty string.
  • Default options value is now undefined (unless specified otherwise)
  • Lots of improvements to the options parsing (kudos to @jridgewell for the awesome work)

Testing helpers

  • RunContext#withPrompt and helpers.mockPrompt() can now work without argument - in which case it'll use the default value of each prompt questions.
  • A RunContent now automatically mock it's generator prompt.
  • Fix multiple bugs with the new RunContext API.
  • When a prompt is mocked, it's validation errors are now retrievable on this.prompt.errors. That'll allow you to test your validations methods against incorrect input.

v0.17.0-pre.3

14 Apr 19:12
Compare
Choose a tag to compare
v0.17.0-pre.3 Pre-release
Pre-release

Composability

  • Added the Gruntfile editor API. This API allow multiple generators to write to the Gruntfile without causing conflicts. Read documentation.

Bugs

  • Fix errors thrown when git command isn't installed on user computer.
  • Fix error that'd prevent tasks to be runned with a 0.17 based generator and current version or yo.
  • Make sure the system always create a default generator name.

v0.17.0-pre.1

07 Mar 22:11
Compare
Choose a tag to compare
v0.17.0-pre.1 Pre-release
Pre-release

This is a prerelease, install as npm install yeoman-generator --tag pre.

Base Generator

  • Base#template() now accept a forth parameter being the _.templateSettings
  • Base#template() now accept template variables declarations in the destination file name. (e.g. this.template('<%=foo%>-template.js');)
  • Base#appname now use bower.json name property by default, then fallback to package.json then to the folder name.
  • Base.template() now keep the source file mode.
  • Base#run() is now based on grouped-queue to allow easier generator composition.
  • Updates to File-utils 0.2
  • Removes support for Node.js 0.8 (it's been more than one year since Node 0.10 release, time to update!).

Composability

  • Generators are now runned as part of a Run loop. The rationnale is explained here: #433
  • Added the Generator#composeWith() method. Rationnale here #484

We also worked on new documentation. Here's the temporary section about Composability and the run queue.

Environment

  • The x:app alias is now defined by default at runtime. No need for consumer to define it themselve anymore.
  • Namespaces with npm linked package are now based on the NPM path rather than the real path. (You won't need to name your base folder generator-X anymore - although it remains a best practice to do so)

Tests helpers

  • mockPrompt() now uses the prompts defaults values as values by default. This mean you don't need to defined them manually each time - only options you wish to changes.
  • Added RunContext API to allow easier testing for Generator's author. See documentation

v0.16.0

08 Jan 20:22
Compare
Choose a tag to compare

Generators test utilities

  • All previous yeoman.test.assertX method are available as yeoman.assert.x.
  • Fix bug offucring with test.testDirectory on Windows when the test directory was the CWD.
  • Cleanup and new assertions methods (thanks to @smackesey on PR #436)
    • New: assertFileContent (check a file exist and its content match a regex)
    • New: assertNoFileContent (check a file content doesn't match a regex)
    • New: assertNoFile (check a file doesn't exist)
    • Renamed: before -> setUpTestDirectory
    • Deprecated: assertFile with regex to match content. Use assertFileContent instead.
    • We added deprecation log notice for now. But the methods/signature will be removed in the 1.0 Generator system.

Environement

  • Fix bugs with path resolution. Now only the CWD directory is walked up, and we fixed bug with Windows paths that could wind up in an infinite loop.

Misc

  • Start working on better JSDoc markup to generate automatic API documentation.

v0.15.0

01 Jan 20:39
Compare
Choose a tag to compare

Env

Adapters

Adapters are the big new feature. They should allow text editors from presenting a custom UI based on top of the Generator API. More detail on our wiki: https://github.com/yeoman/generator/wiki/Using-yeoman-in-non-cli-environment

Base Generator

  • the remote method now bind file-utils scoped environment to the remote object returned in the callback.
  • Generators can now all be extended with the .extend() method (similar to backbone inheritance way). This makes for a cleaner syntax and easier extension chain.
var yo = require('yeoman-generator');
var myGenerator = yo.generators.Base.extend({
  method1: function () {}
})

Misc

  • Added Performance Benchmark suite to allow us keep track of bottlenecks and possible improvement. These benchmarks run using Matcha (npm i -g matcha). Run them with matcha benchmarks/env.js.
  • We now use Gulp to run JSHint, code style checks and unit tests. Run gulp to run the acceptance build.

v0.14.2

12 Dec 04:30
Compare
Choose a tag to compare
  • Fix a bug that occurred when a Generator prototype method had the same name as an instance method.

v0.14.1

09 Dec 16:14
Compare
Choose a tag to compare
  • Add Environment#getGeneratorsMeta functions to retrieve registered generators metadata (#422). This is meant to allow tools using the Yeoman environment to rely on a performant way to query these metadatas.

v0.14.0

22 Nov 16:31
Compare
Choose a tag to compare

Generator system

New Features

  • Copying large folder could cause a recursion error. Two new methods (generators.bulkCopy and generators.bulkDirectory) have been added to allow large folder being copied without template and conflict processing on each contained file. (example use case: transferring every file in the Wordpress repo) (#350)
  • Added a new file handling system. Generator now get access to this.src and this.dest who're scoped file utility relative to the sourceRoot and destinationRoot. The file utility is based on the Grunt.file interface but add scope and filters (write filters to beautify, transcode, etc and validate filters to check conflicts). (For examples and discussion see #378 and #313)

Bugs

  • Fix bug with arguments inversed in the wiring methods (#174)
  • Fix bug causing the end event to be triggered multiple time (Bug #302 -> Fix #402)
  • Options/args passed to runHook are now cloned, so the hooked generator won't modify the state of these objects in the main one.
  • generators fetching methods like extract, fetch, tarball now rely on the NPM download module.

Runner system (Environment)

  • Fix and improve env.help output (#364 and #398)
  • Now detect correctly symlinked npm modules (e.g. using npm link)
  • breaking env.register now only take a string (filepath or NPM module name) to make sure the metadata it assign to the generator are relevant (namespace, resolved). If you want to register a stubbed generator for easy testing, then use env.registerStub, but know the metadata might be missing or erroneous.
  • breaking Removal of env.remote and env.engine. This shouldn't change anything as they were broked or not used.

Maintenance

  • Added support for test coverage using Coveralls reports.
  • Way better support for running test suite on Windows. It should run now.

See all: v0.13.4...v0.14.0