Skip to content
This repository has been archived by the owner on Jan 18, 2021. It is now read-only.

Add glimmer-component and glimmer-helper blueprints #30

Merged
merged 4 commits into from
Mar 28, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions blueprints/glimmer-helper/files/src/ui/components/__name__.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export default function(params) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't that be in src/ui/helpers?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and since components have a class name now, shouldn't helper functions have one too?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't that be in src/ui/helpers?

We debated this for a while coming up with module unification, and settled on helpers and components in the same collection of invocable template functions.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and since components have a class name now, shouldn't helper functions have one too?

Probably - sorry I was in a rush.

};
24 changes: 24 additions & 0 deletions blueprints/glimmer-helper/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
'use strict';

const stringUtils = require('ember-cli-string-utils');
const normalizeEntityName = require('ember-cli-normalize-entity-name');

module.exports = {
description: 'Generates a helper function.',

normalizeEntityName(entityName) {
return normalizeEntityName(entityName);
},

fileMapTokens() {
return {
__name__(options) {
return options.dasherizedModuleName;
},
};
},

locals(options) {
return { };
},
};