diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index dbbb644..d2dad0e 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -111,7 +111,7 @@ jobs: if git rev-parse "$TAG" >/dev/null 2>&1; then echo "tag exists"; else - curl -X POST -H "Content-Type: application/json" -H "Authorization: token $GITHUB_TOKEN" https://api.github.com/repos/patricklx/ember-template-imports/git/refs -d "{ \"ref\": \"refs/tags/$TAG\", \"sha\": \"$GITHUB_COMMIT\" }" + curl -X POST -H "Content-Type: application/json" -H "Authorization: token $GITHUB_TOKEN" https://api.github.com/repos/patricklx/ember-hbs-imports/git/refs -d "{ \"ref\": \"refs/tags/$TAG\", \"sha\": \"$GITHUB_COMMIT\" }" fi - name: Create a Release env: @@ -119,7 +119,7 @@ jobs: run: | version=$(cat package.json | jq -r '.version') TAG=v$version - url="https://api.github.com/repos/patricklx/ember-template-imports/releases" + url="https://api.github.com/repos/patricklx/ember-hbs-imports/releases" exists=$(curl -H "Content-Type: application/json" -H "Authorization: token $GITHUB_TOKEN" $url | jq ".[] | select(.tag_name == \"$TAG\") | .id") if [[ -z $exists ]]; then npm i lerna-changelog || echo "its okay" diff --git a/README.md b/README.md index 1c34b7f..0c70594 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -ember-template-imports +ember-hbs-imports ============================================================================== merged @@ -15,11 +15,13 @@ a helper/component and import styles within a template file. * Relative imports! +there is now an official addon for imports at https://github.com/ember-template-imports/ember-template-imports + Installation ------------------------------------------------------------------------------ ``` -ember install ember-template-imports +ember install ember-hbs-imports ``` @@ -61,7 +63,7 @@ Syntax: The helper is looked up from the given string using a direct lookup pattern. I set the `resolveHelper` in the resolver. All this addon does is taking that `{{import ...}}` statement -and replacing all helper invocations with `{{ember-template-helper-import/helpers/invoke-helper 'myHelper' ...}}`. +and replacing all helper invocations with `{{ember-hbs-import/helpers/invoke-helper 'myHelper' ...}}`. Our helper then looks up the actual helper and calls `compute` with the other arguments @@ -73,19 +75,6 @@ already gives us import for components, but I really miss the helper imports. So I went ahead and added this functionality :) -But what about Module Unification? ------------------------------------------------------------------------------- - -Once Module Unification lands fully, this addon will be largely obsolete. MU -provides all these benefits and more. - -So on the one hand, your templates will start to look _something kinda like_ -MU a little sooner, which is nice. - -But be warned - any official tooling to codemod templates into a new MU world -likely won't support this addon. So weigh the pros and cons carefully before -widely adopting this addon. - License ------------------------------------------------------------------------------ diff --git a/lib/import-processor.ts b/lib/import-processor.ts index ab472a2..92c1998 100644 --- a/lib/import-processor.ts +++ b/lib/import-processor.ts @@ -205,7 +205,7 @@ const importProcessors = { } // its a helper imported.others.add(resolvedPath + '.js'); - node.original = `ember-template-imports/helpers/invoke-helper this '${resolvedPath}'`; + node.original = `ember-hbs-imports/helpers/invoke-helper this '${resolvedPath}'`; i.used = true; } }, diff --git a/package.json b/package.json index 671e4d2..db0ba74 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,9 @@ { - "name": "ember-template-imports", - "version": "0.2.14", + "name": "ember-hbs-imports", + "version": "0.3.0", "repository": { "type": "git", - "url": "https://github.com/patricklx/ember-template-imports" + "url": "https://github.com/patricklx/ember-hbs-imports" }, "description": "Adds template imports for ember hbs", "keywords": [