Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Migrate to the new template structure #5

Merged
merged 1 commit into from
Apr 1, 2020

Conversation

fmvilas
Copy link
Member

@fmvilas fmvilas commented Mar 31, 2020

Moves all the template files inside the template folder.

See asyncapi/generator#275

Summary of changes

  • Moved everything that should/might be copied to the output directory to its own directory: "template".
  • Moved .hooks, .partials, and .filters to the root directory, outside "template". And renamed those as "hooks", "partials", and "filters".
  • Got rid of special file names like __README.md. They are not conflicting anymore so they're now README.md.

@damaru-inc damaru-inc merged commit 31b0e6e into master Apr 1, 2020
@damaru-inc damaru-inc deleted the migrate-new-structure branch April 1, 2020 16:16
@asyncapi-bot
Copy link
Contributor

🎉 This PR is included in version 0.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@Mrc0113
Copy link
Contributor

Mrc0113 commented Apr 1, 2020

Something in this fix seemed to break the generator. I now get the error below, but if I point to my fork which doesn't have this PR merged it works fine.

MJD-MacBook-Pro.local:/tmp/codegen3$ ag -p binder=solace -p artifactType=application -p artifactId=COVID19PopulationProvider2 -p groupId=com.solace.demo -p javaPackage=com.solace.demo.covid19 -p solaceSpringCloudVersion=1.0.0 -p springCloudStreamVersion=Horsham.SR3 -p springCloudVersion=Hoxton.SR3 ~/Downloads/COVID19PopulationProvider.yaml https://github.com/asyncapi/java-spring-cloud-stream-template.git
npm http fetch GET 304 https://registry.npmjs.org/lodash 144ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/js-yaml 148ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/esprima 48ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/argparse 69ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/sprintf-js 52ms (from cache)
npm WARN enoent ENOENT: no such file or directory, open '/private/tmp/codegen3/package.json'
npm WARN . No description
npm WARN . No repository field.
npm WARN . No README data
npm WARN . No license field.

+ @asyncapi/java-spring-cloud-stream-template@0.2.0
added 6 packages from 11 contributors in 2.082s
Something went wrong:
Template render error: (/private/tmp/codegen3/node_modules/@asyncapi/java-spring-cloud-stream-template/template/pom.app)
  Error: filter not found: groupId
    at Object._prettifyError (/usr/local/lib/node_modules/@asyncapi/generator/node_modules/nunjucks/src/lib.js:36:11)
    at /usr/local/lib/node_modules/@asyncapi/generator/node_modules/nunjucks/src/environment.js:561:19
    at Template.root [as rootRenderFunc] (eval at _compile (/usr/local/lib/node_modules/@asyncapi/generator/node_modules/nunjucks/src/environment.js:631:18), <anonymous>:57:3)
    at Template.render (/usr/local/lib/node_modules/@asyncapi/generator/node_modules/nunjucks/src/environment.js:550:10)
    at Environment.renderString (/usr/local/lib/node_modules/@asyncapi/generator/node_modules/nunjucks/src/environment.js:378:17)
    at /usr/local/lib/node_modules/@asyncapi/generator/lib/generator.js:592:21
    at new Promise (<anonymous>)
    at Generator.renderString (/usr/local/lib/node_modules/@asyncapi/generator/lib/generator.js:591:12)
    at Generator.renderFile (/usr/local/lib/node_modules/@asyncapi/generator/lib/generator.js:616:19)
    at async Generator.generateFile (/usr/local/lib/node_modules/@asyncapi/generator/lib/generator.js:572:29)
    at async Walker.<anonymous> (/usr/local/lib/node_modules/@asyncapi/generator/lib/generator.js:444:13)

@fmvilas
Copy link
Member Author

fmvilas commented Apr 2, 2020

That's weird. It's not failing for me. Are you sure you're on the latest version of the generator, @Mrc0113?

@Mrc0113
Copy link
Contributor

Mrc0113 commented Apr 2, 2020

Ah okay that was it. I thought I had the most recent since I just installed it 2 days ago, but apparently you're moving fast :)

@fmvilas
Copy link
Member Author

fmvilas commented Apr 2, 2020

Yeah, sorry. We're trying to push all the breaking changes now as we want to release v1.0.0 soon: https://github.com/asyncapi/generator/milestone/4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants