stagedive 0.5.1

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 0

StageDive - Template-Base project generator

Define your own variables for your templates

New

You can define "hints" for your questions!

Install

Install

    pub global activate stagedive

Update

    # activate stagedive again
    pub global activate stagedive

Uninstall

    pub global deactivate stagedive   

Usage

Usage: stagedive -n <new project folder> -p <template project> -t <template name>
    -e, --extension          Template extension, stripped during copy
    -s, --settings           Prints settings
    -h, --help               Shows this message
    -l, --list               List available templates
    -n, --newprojectdir      New project folder
    -p, --templateproject    Template project (e.g. stagedive)
    -t, --template           Template name (e.g. console)
    -v, --loglevel           Sets the appropriate loglevel
                             [info, debug, warning]

Sample:

    Generate project in example/console:
        'stagedive -n example/console -p stagedive -t console'

stagedive -l - List the available templates
It looks for a template in lib_templates. If it finds a _template folder it scans for subfolders with manifest.yaml.
At the moment the only packages that has a _template folder is StageDive but you can define your own _templates-folder in your package.

Try stagedive -n example/console -p stagedive -t console This command will prompt you for your name and your email address.

StageDive creates the appropriate sample in example/console.

StageDive takes all variables defined in the manifest.yaml and replaces the according template fields.
There is one extra variable: basename basename is the name you specify with the -t option.

File-Content-Format: <%= varname %>
File-Name-Format: {varname}

The -e option allows you to specify a template extension that will be stripped when copying files from the template to their new locations. This lets you distinguish between Dart files and Dart file templates, for example, in situations where you have tools that blindly operate on all .dart files in your project.

Sample manifest.yaml

#templatename is not optional!
templatename: Simple Console

prompts:
  name:
    type: input
    question: "Add your name:"
    hint: "Used for the pubspec 'name:' field"
    
  email:
    type: input
    question: "Your email address:"

At the moment the there are two input types: input and lowercase.

  • input: Asks you the 'question' and stores the answer in the defined variable.
  • lowercase: Same as input but changes the answer to lowercase.
  • uppercase: Same as input but changes the answer to uppercase.

Important

StageDive scans your installed packages (pub-cache).
This means StageDive recognizes only installed packages by default. If you want to change this behaviour or if you want to test your templates before installing them do the following:

In your project folder, create .stagedive/config.yaml

templatefolder: lib/_templates

or for multiple templates:

templatefolder: 
    - lib/_templates
    - temp/_templates

With this - StageDive knows how to find your local templates!

License

  Copyright 2015 Michael Mitterer (office@mikemitterer.at),
  IT-Consulting and Development Limited, Austrian Branch

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an
  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
  either express or implied. See the License for the specific language
  governing permissions and limitations under the License.

If this plugin is helpful for you - please (Circle) me or star this repo here on GitHub.

Change Log for stagedive

StageDive creates a template-based project for you

v0.5.1 - 2016-11-16

Docs

v0.5.0 - 2016-10-20

Feature

  • -e option for stripping extensions added b641fea

v0.4.2 - 2015-12-10

Fixes

  • Authors email was without <...> f2b3d34

v0.4.1 - 2015-12-10

Fixes

  • lib-template had 'executable' in pubspec b6ec590

v0.4.0 - 2015-12-10

Feature

v0.3.3 - 2015-12-08

Docs

v0.3.1 - 2015-07-10

Feature

  • Promper shows input-field-markers, UPPERCASE-Type support fd70c95

Docs

v0.3.0 - 2015-07-10

Feature

v0.2.1 - 2015-07-10

Feature

  • Multiple templates in config.yaml 78a3e24

v0.2.0 - 2015-07-09

Feature

  • Config to scan local templates 21c8ef4

v0.1.0 - 2015-07-09

Feature

v0.0.3 - 2015-07-09

Feature

v0.0.2 - 2015-07-08

Docs

v0.0.1 - 2015-07-08

Docs

This CHANGELOG.md was generated with Changelog for Dart

Use this package as an executable

1. Install it

You can install the package from the command line:


$ pub global activate stagedive

2. Use it

The package has the following executables:


$ stagedive

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  stagedive: ^0.5.1

2. Install it

You can install packages from the command line:

with pub:


$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:stagedive/stagedive.dart';
  
Version Uploaded Documentation Archive
0.5.1 Nov 16, 2016 Go to the documentation of stagedive 0.5.1 Download stagedive 0.5.1 archive
0.5.0 Oct 20, 2016 Go to the documentation of stagedive 0.5.0 Download stagedive 0.5.0 archive
0.4.2 Dec 10, 2015 Go to the documentation of stagedive 0.4.2 Download stagedive 0.4.2 archive
0.4.1 Dec 10, 2015 Go to the documentation of stagedive 0.4.1 Download stagedive 0.4.1 archive
0.4.0 Dec 10, 2015 Go to the documentation of stagedive 0.4.0 Download stagedive 0.4.0 archive
0.3.3 Dec 8, 2015 Go to the documentation of stagedive 0.3.3 Download stagedive 0.3.3 archive
0.3.2 Jul 16, 2015 Go to the documentation of stagedive 0.3.2 Download stagedive 0.3.2 archive
0.3.1 Jul 10, 2015 Go to the documentation of stagedive 0.3.1 Download stagedive 0.3.1 archive
0.3.0 Jul 10, 2015 Go to the documentation of stagedive 0.3.0 Download stagedive 0.3.0 archive
0.2.3 Jul 10, 2015 Go to the documentation of stagedive 0.2.3 Download stagedive 0.2.3 archive

All 16 versions...

Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
0
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
0
Overall:
Weighted score of the above. [more]
0
Learn more about scoring.

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

Analysis issues and suggestions

Support Dart 2 in pubspec.yaml.

The SDK constraint in pubspec.yaml doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see https://www.dartlang.org/dart-2#migration.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.8.0 <2.0.0