This repository was archived by the owner on May 31, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 118
How to add your template to Stagehand
Kathy Walrath edited this page Jun 12, 2017
·
12 revisions
cd my_dir
git clone https://github.com/google/stagehand.git
cd stagehand
- Copy and rename the files most like your app in lib/generators, (e.g. web_polymer for a web app)
- both the main generator file and its *_data counterpart
- a name like "my-new-app", see the console_full.dart for an example of where the name goes
- Update the info in the main generator file to match your app
-
Remove all /packages entries
-
Add this copyright notice as a comment near the top of every dart or html file Copyright (c) {{year}}, {{author}}. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
-
Replace all instances of your project’s name with {{projectName}}
-
Update pubspec.yaml with entries like:
name: {{projectName}} version: 0.0.1 description: A sample command-line application. author: {{author}} <email@example.com> homepage: https://www.example.com
Import its main generator file, and add an instance of its generator to the generators list.
From within your stagehand directory:
dart tool/grind.dart build
See instructions here in the "As a contributor to open-source" section
pub global deactivate stagehand
pub global activate stagehand