summaryrefslogtreecommitdiff
path: root/src/rebar_prv_new.erl
Commit message (Collapse)AuthorAgeFilesLines
* Add hint for `rebar3 new help` on `rebar3 help new`Stavros Aronis2018-11-221-1/+3
|
* Unicode support in all the placesFred Hebert2017-08-061-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is done through 3 main change groups: - replacing `~s` by `~ts` in format strings, so that strings that contain unicode are properly printed rather than crashing - adding the `unicode` argument to all function of the `re` module to ensure transformations on strings containing unicode data are valid instead of crashing (see issue #1302) - replacing `ec_cnv:to_binary/1` and `ec_cnv:to_list/1` with matching functions in `rebar_utils`. The last point has been done, rather than modifying and updating erlware commons, because binary and list conversions can be a contentious subject. For example, if what is being handled is actually bytes from a given binary stream, then forcing a byte-oriented interpretation of the data can corrupt it. As such, it does not appear safe to modify erlware commons' conversion functions since it may not be safe for all its users. Instead, rebar3 reimplements a subset of them (only converting atoms and chardata, ignoring numbers) with the explicit purpose of handling unicode string data. Tests were left as unchanged as possible. This may impact the ability to run rebar3's own suites in a unicode path, but respects a principle of least change for such a large patch.
* See template local install same builtin as escriptFred Hebert2017-01-211-0/+3
| | | | | | | | | | | | When the `new` command is run from a locally installed rebar3 (`rebar3 local install`), the builtin templates would be labelled as custom because of directories. This patch fixes it by splitting off the rebar3 priv dir from the user's configured plugin path for custom ones, and introducing a new internal label for builtins (since handling must remain different from escripts) This fixes issue #819
* Plugin templates enabledFred Hebert2015-12-191-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This lets a plugin define templates to be loaded: $ rebar3 new ... proper (plugin): A basic PropEr suite for an OTP application ... $ rebar3 new help proper proper: plugin template (...) Description: A basic PropEr suite for an OTP application Variables: name="suite" (...) ... → rebar3 new proper fakesuite ===> Writing test/prop_fakesuite.erl In this case, proper is a fake template file I've put by hand in _build/default/plugins/rebar3_proper/priv/<somename>/, meaning it will only work as far as it's called from the project's root. The priority order of plugins is now .config > plugin > built-in, such that someone could ensure plugins do not crush their own private templates, but also that custom or plugin templates do overtake built-in ones. It used to be Built-in > .config only. Templates are searched for recursively in the priv/ directory of plugins.
* A bad template index does not crash; shows warningFred Hebert2015-12-181-4/+16
| | | | | | | | This should fix #955 The test is implicit as a bad index previously silently crashed rebar3. By adding the bad index to the `new` suite's files, we can show that things keep running.
* Handle force flags in leading positionFred Hebert2015-11-191-1/+5
| | | | The checking of flags and the parsing of arguments is separated up.
* Fix description in "rebar3 new"Sean Cribbs2015-08-031-1/+1
| | | `template` is not a kv-style argument, but a plain argument. If you give `template=app` on the command line, you get "template not found."
* fix bareness issuesFred Hebert2015-05-311-1/+1
| | | | | | - Crashes in providers lib when no providers in a namespace are bare - Making sure bareness matches semantics; i.e. a bare provider is visible, a non-bare provider is hidden.
* Fixes #306: help text consistencyFred Hebert2015-04-021-1/+1
|
* Polish rough edges of 'new' providerFred Hebert2015-03-251-3/+12
| | | | | | | - Allow 'rebar3 help' to work and have it point to 'rebar3 help <template>' - show a 'template not found' message when a template is indeed not found rather than crashing.
* update all examples in providers to use rebar3Tristan Sloughter2015-03-071-1/+1
|
* First unkeyed var is now 'name', appid -> nameFred Hebert2014-11-111-1/+9
| | | | | | | The first variable can be unkeyed and the provider will sub in the variable name 'name'. Additionally, the built-in templates and documentation have been updated so that 'appid' is now 'name' and the alternative commands are shown.
* Allow to forcibly overwrite files with templatesFred Hebert2014-11-111-9/+20
|
* Redo templates with docs and whatnotFred Hebert2014-11-101-6/+57
| | | | | This totally breaks compatibility with rebar2, and maybe it shouldn't have.
* move back to using format_error/1Tristan Sloughter2014-11-091-4/+4
|
* add format_error/2 provider callback to providersTristan Sloughter2014-10-221-1/+6
|
* move providers to separate appTristan Sloughter2014-10-031-9/+9
|
* return error messages from providersTristan Sloughter2014-09-271-1/+1
|
* slowly widdling away at dialyzer errorsTristan Sloughter2014-09-201-26/+6
|
* reworking of help display and parse of commandsTristan Sloughter2014-09-171-1/+1
|
* allow new project dir for templateTristan Sloughter2014-08-231-1/+5
|
* add back templatingTristan Sloughter2014-08-231-0/+69