Created
April 29, 2021 09:47
-
-
Save patricklx/8c57178f067e82a043642cd662197f25 to your computer and use it in GitHub Desktop.
snippets for ember addon development
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#expose components from addon to app | |
ls addon/components/**/component.* | xargs -I% sh -c 'p="%"; out=%;out=${out/addon/app};out=${out/.ts/.js};imp=${p/addon/ember-bscomponents};out=${out/components/components\/bs};imp=${imp/.ts/};imp=${imp/.js/};imp=\"$imp\"; mkdir | |
-p $(dirname $out) && echo "export { default } from $imp;" > $out' | |
#expose templates from addon to app | |
ls addon/components/**/template.* | xargs -I% sh -c 'p="%"; out=%;out=${out/addon/app};out=${out/.hbs/.js};imp=${p/addon/ember-bscomponents};out=${out/components/components\/bs};imp=${imp/.ts/};imp=${imp/.hbs/};imp=\"$imp\"; mkdi | |
r -p $(dirname $out) && echo "export { default } from $imp;" > $out' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment