angular.scaffolding.NgInstallTemplates.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of angular-scaffolding Show documentation
Show all versions of angular-scaffolding Show documentation
Provides scaffolding for Angular applications
The newest version!
package angular.scaffolding
import grails.dev.commands.GrailsApplicationCommand
import org.grails.io.support.Resource
import org.grails.io.support.SpringIOUtils
class NgInstallTemplates implements GrailsApplicationCommand {
boolean skipBootstrap = true
@Override
boolean handle() {
try {
templates("angular/**/*").each { Resource r ->
String path = r.URL.toString().replaceAll(/^.*?META-INF/, "src/main")
if (path.endsWith('/')) {
mkdir(path)
} else {
File to = new File(path)
SpringIOUtils.copy(r, to)
println("Copied ${r.filename} to location ${to.canonicalPath}")
}
}
} catch (e) {
println e
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy