Skip to content

Commit

Permalink
Scaffold component
Browse files Browse the repository at this point in the history
  • Loading branch information
Blacksmoke16 committed Oct 30, 2020
1 parent 8df40bf commit a37f1a0
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 52 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2020 CREATOR_NAME
Copyright (c) 2020 George Dietrich

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
47 changes: 10 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,62 +1,35 @@
# README
# Console

Template repo for creating a new Athena component. Scaffolds the Crystal shard's structure as well as define CI etc.
[![CI](https://github.com/athena-framework/console/workflows/CI/badge.svg)](https://github.com/athena-framework/console/actions?query=workflow%3ACI)
[![Latest release](https://img.shields.io/github/release/athena-framework/console.svg)](https://github.com/athena-framework/console/releases)

**NOTE:** This repo assumes the component will be in the `athena-framework` org. If it is to be used outside of the org, be sure to update URLs accordingly.

1. Find/replace `COMPONENT_NAME` with the name of the component. This is used as the shard's name. E.x. `logger`.
1.1 Be sure to rename the file in `./src`, and `./spec` as well.

1. Replace `NAMESPACE_NAME` with the name of the component's namespace. Documentation for this component will be grouped under this. E.x. `Logger`.

1. Find/replace `CREATOR_NAME` with your Github display name. E.x. `George Dietrich`.

1. Find/replace `CREATOR_USERNAME` with your Github username. E.x. `blacksmoke16`.

1. Find/replace `CREATOR_EMAIL` with your desired email

5.1 Can remove this if you don't wish to expose an email.

1. Find/replace `ALIAS_NAME` with the three letter alias for this component; A + 2 letter shortcut to `NAMESPACE_NAME`. E.x. `ALG`.

1. Find/replace `DESCRIPTION` with a short description of what the component does.

1. Define a repo secret `ACCESS_TOKEN` for CI deploys to work.

8.1 Alter [CI](./.github/workflows/ci.yml) and [Deployment](./.github/workflows/deployment.yml) scrips as needed. Such as adding custom `crystal docs` command or adding an `Install Dependencies` step.

Delete from here up
# NAMESPACE_NAME

[![CI](https://github.com/athena-framework/COMPONENT_NAME/workflows/CI/badge.svg)](https://github.com/athena-framework/COMPONENT_NAME/actions?query=workflow%3ACI)
[![Latest release](https://img.shields.io/github/release/athena-framework/COMPONENT_NAME.svg)](https://github.com/athena-framework/COMPONENT_NAME/releases)

DESCRIPTION
Allows the creation of CLI based commands.

## Installation

1. Add the dependency to your `shard.yml`:

```yaml
dependencies:
athena-COMPONENT_NAME:
github: athena-framework/COMPONENT_NAME
athena-console:
github: athena-framework/console
version: ~> 0.1.0
```
2. Run `shards install`

## Documentation

Everything is documented in the [API Docs](https://athena-framework.github.io/COMPONENT_NAME/Athena/NAMESPACE_NAME.html).
Everything is documented in the [API Docs](https://athena-framework.github.io/console/Athena/Console.html).

## Contributing

1. Fork it (https://github.com/athena-framework/COMPONENT_NAME/fork)
1. Fork it (https://github.com/athena-framework/console/fork)
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request

## Contributors

- [CREATOR_NAME](https://github.com/CREATOR_USERNAME) - creator and maintainer
- [George Dietrich](https://github.com/blacksmoke16) - creator and maintainer
12 changes: 6 additions & 6 deletions shard.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
name: athena-COMPONENT_NAME
name: athena-console

version: 0.1.0

crystal: 0.35.0

license: MIT

repository: https://github.com/athena-framework/COMPONENT_NAME
repository: https://github.com/athena-framework/console

documentation: https://athena-framework.github.io/COMPONENT_NAME/Athena/NAMESPACE_NAME.html
documentation: https://athena-framework.github.io/console/Athena/Console.html

description: |
DESCRIPTION.
Allows the creation of CLI based commands.: |
Allows the creation of CLI based commands.
authors:
- CREATOR_NAME <CREATOR_EMAIL>
- George Dietrich <[email protected]>

development_dependencies:
ameba:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require "./spec_helper"

describe Athena::NAMESPACE_NAME do
describe Athena::Console do
it "works" do
false.should eq(true)
end
Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper.cr
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
require "spec"
require "../src/athena-COMPONENT_NAME"
require "../src/athena-console"
6 changes: 0 additions & 6 deletions src/athena-COMPONENT_NAME.cr

This file was deleted.

6 changes: 6 additions & 0 deletions src/athena-console.cr
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Convenience alias to make referencing `Athena::Console` types easier.
alias ACON = Athena::Console

module Athena::Console
VERSION = "0.1.0"
end

0 comments on commit a37f1a0

Please sign in to comment.