Skip to content

Commit

Permalink
feat: template extension integration (#188)
Browse files Browse the repository at this point in the history
  • Loading branch information
florind-ens authored Jun 7, 2022
1 parent 8c7b113 commit c19532b
Show file tree
Hide file tree
Showing 73 changed files with 177 additions and 3,874 deletions.
12 changes: 6 additions & 6 deletions generators/add-action/analytics/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ governing permissions and limitations under the License.
*/

const path = require('path')
const ActionGenerator = require('../../../lib/ActionGenerator')
const { commonDependencyVersions } = require('../../../lib/constants')
const { ActionGenerator, constants, commonTemplates } = require('@adobe/generator-app-common-lib')
const { commonDependencyVersions } = constants

class AnalyticsGenerator extends ActionGenerator {
constructor (args, opts) {
Expand Down Expand Up @@ -44,11 +44,11 @@ class AnalyticsGenerator extends ActionGenerator {
// this.registerTransformStream(beautify({ indent_size: 2 }))
this.sourceRoot(path.join(__dirname, '.'))

this.addAction(this.props.actionName, '../../common-templates/stub-action.js', {
this.addAction(this.props.actionName, commonTemplates['stub-action'], {
testFile: './templates/getCollections.test.js',
sharedLibFile: '../../common-templates/utils.js',
sharedLibTestFile: '../../common-templates/utils.test.js',
e2eTestFile: '../../common-templates/stub-action.e2e.js',
sharedLibFile: commonTemplates.utils,
sharedLibTestFile: commonTemplates['utils.test'],
e2eTestFile: commonTemplates['stub-action.e2e'],
tplContext: this.props,
dependencies: {
'@adobe/aio-sdk': commonDependencyVersions['@adobe/aio-sdk']
Expand Down
63 changes: 0 additions & 63 deletions generators/add-action/asset-compute/index.js

This file was deleted.

23 changes: 0 additions & 23 deletions generators/add-action/asset-compute/templates/.npmignore

This file was deleted.

1 change: 0 additions & 1 deletion generators/add-action/asset-compute/templates/README.md

This file was deleted.

20 changes: 0 additions & 20 deletions generators/add-action/asset-compute/templates/_worker.js

This file was deleted.

Empty file.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.
12 changes: 6 additions & 6 deletions generators/add-action/audience-manager-cd/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ governing permissions and limitations under the License.
*/

const path = require('path')
const ActionGenerator = require('../../../lib/ActionGenerator')
const { commonDependencyVersions } = require('../../../lib/constants')
const { ActionGenerator, constants, commonTemplates } = require('@adobe/generator-app-common-lib')
const { commonDependencyVersions } = constants

class AudienceManagerCDGenerator extends ActionGenerator {
constructor (args, opts) {
Expand Down Expand Up @@ -45,11 +45,11 @@ class AudienceManagerCDGenerator extends ActionGenerator {
// this.registerTransformStream(beautify({ indent_size: 2 }))
this.sourceRoot(path.join(__dirname, '.'))

this.addAction(this.props.actionName, '../../common-templates/stub-action.js', {
this.addAction(this.props.actionName, commonTemplates['stub-action'], {
testFile: './templates/getProfile.test.js',
sharedLibFile: '../../common-templates/utils.js',
sharedLibTestFile: '../../common-templates/utils.test.js',
e2eTestFile: '../../common-templates/stub-action.e2e.js',
sharedLibFile: commonTemplates.utils,
sharedLibTestFile: commonTemplates['utils.test'],
e2eTestFile: commonTemplates['stub-action.e2e'],
tplContext: this.props,
dependencies: {
'@adobe/aio-sdk': commonDependencyVersions['@adobe/aio-sdk']
Expand Down
12 changes: 6 additions & 6 deletions generators/add-action/campaign-standard/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ governing permissions and limitations under the License.
*/

const path = require('path')
const ActionGenerator = require('../../../lib/ActionGenerator')
const { commonDependencyVersions } = require('../../../lib/constants')
const { ActionGenerator, constants, commonTemplates } = require('@adobe/generator-app-common-lib')
const { commonDependencyVersions } = constants

class CampaignStandardGenerator extends ActionGenerator {
constructor (args, opts) {
Expand Down Expand Up @@ -44,11 +44,11 @@ class CampaignStandardGenerator extends ActionGenerator {
// this.registerTransformStream(beautify({ indent_size: 2 }))
this.sourceRoot(path.join(__dirname, '.'))

this.addAction(this.props.actionName, '../../common-templates/stub-action.js', {
this.addAction(this.props.actionName, commonTemplates['stub-action'], {
testFile: './templates/getAllProfiles.test.js',
sharedLibFile: '../../common-templates/utils.js',
sharedLibTestFile: '../../common-templates/utils.test.js',
e2eTestFile: '../../common-templates/stub-action.e2e.js',
sharedLibFile: commonTemplates.utils,
sharedLibTestFile: commonTemplates['utils.test'],
e2eTestFile: commonTemplates['stub-action.e2e'],
tplContext: this.props,
dotenvStub: {
label: 'please provide your Adobe I/O Campaign Standard tenant',
Expand Down
12 changes: 6 additions & 6 deletions generators/add-action/customer-profile/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ governing permissions and limitations under the License.
*/

const path = require('path')
const ActionGenerator = require('../../../lib/ActionGenerator')
const { commonDependencyVersions } = require('../../../lib/constants')
const { ActionGenerator, constants, commonTemplates } = require('@adobe/generator-app-common-lib')
const { commonDependencyVersions } = constants

class CustomerProfileGenerator extends ActionGenerator {
constructor (args, opts) {
Expand Down Expand Up @@ -46,11 +46,11 @@ class CustomerProfileGenerator extends ActionGenerator {
writing () {
this.sourceRoot(path.join(__dirname, '.'))

this.addAction(this.props.actionName, '../../common-templates/stub-action.js', {
this.addAction(this.props.actionName, commonTemplates['stub-action'], {
testFile: './templates/getProfile.test.js',
sharedLibFile: '../../common-templates/utils.js',
sharedLibTestFile: '../../common-templates/utils.test.js',
e2eTestFile: '../../common-templates/stub-action.e2e.js',
sharedLibFile: commonTemplates.utils,
sharedLibTestFile: commonTemplates['utils.test'],
e2eTestFile: commonTemplates['stub-action.e2e'],
tplContext: this.props,
dotenvStub: {
label: 'please provide your Adobe Experience Platform Realtime Customer Profile tenant',
Expand Down
70 changes: 0 additions & 70 deletions generators/add-action/generic/index.js

This file was deleted.

93 changes: 0 additions & 93 deletions generators/add-action/generic/templates/fetchExample.test.js

This file was deleted.

Loading

0 comments on commit c19532b

Please sign in to comment.