This repository has been 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
Sanford Redlich edited this page May 31, 2015
·
12 revisions
cd my_dir
git clone https://github.com/google/stagehand.git
cd stagehand
- Deactivate your usual stagehand, if any, to avoid confusion pub global deactivate stagehand
- Activate your clone of stagehand pub global activate --source path ...my_dir/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
- From within your stagehand directory dart tool/grind.dart build
mkdir ../my_new_app
cd ../my_new_app
stagehand my-new-app
- the console should have shown instructions to set it up and run it; try them out
- See instructions here in the "As a contributor to open-source" section
pub global deactivate --source path my_dir/stagehand
pub global activate stagehand