Skip to content
This repository was archived by the owner on Feb 28, 2025. It is now read-only.

Commit bb7e0c8

Browse files
committed
Rename to angular-scaffolding
1 parent 2c6c782 commit bb7e0c8

40 files changed

+72
-73
lines changed

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# Grails 3 Angular 2 Scaffolding Plugin
1+
# Grails 3 Angular Scaffolding Plugin
22

3-
[![Build Status](https://travis-ci.org/grails-plugins/grails-angular2-scaffolding.svg?branch=master)](https://travis-ci.org/grails-plugins/grails-angular2-scaffolding)
3+
[![Build Status](https://travis-ci.org/grails-plugins/grails-angular-scaffolding.svg?branch=master)](https://travis-ci.org/grails-plugins/grails-angular-scaffolding)
44

55
A plugin for generating client side assets based on domain classes
66

77
## Documentation
88

9-
Latest: http://grails-plugins.github.io/grails-angular2-scaffolding/latest
10-
Snapshot: http://grails-plugins.github.io/grails-angular2-scaffolding/snapshot
9+
Latest: http://grails-plugins.github.io/grails-angular-scaffolding/latest
10+
Snapshot: http://grails-plugins.github.io/grails-angular-scaffolding/snapshot
1111

1212

build.gradle

+9-9
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ plugins {
1212
id 'org.asciidoctor.convert' version '1.5.3'
1313
}
1414

15-
version "1.0.0.RC1"
15+
version "2.0.0.RC1"
1616
group "org.grails.plugins"
1717

18-
apply plugin:"eclipse"
19-
apply plugin:"idea"
20-
apply plugin:"org.grails.grails-plugin"
21-
apply plugin:"org.grails.grails-plugin-publish"
18+
apply plugin: "eclipse"
19+
apply plugin: "idea"
20+
apply plugin: "org.grails.grails-plugin"
21+
apply plugin: "org.grails.grails-plugin-publish"
2222

2323
repositories {
2424
mavenLocal()
@@ -57,12 +57,12 @@ bootRepackage.enabled = false
5757

5858
grailsPublish {
5959
userOrg = "grails"
60-
githubSlug = 'grails-plugins/grails-angular2-scaffolding'
60+
githubSlug = 'grails-plugins/grails-angular-scaffolding'
6161
license {
6262
name = 'Apache-2.0'
6363
}
64-
title = "Angular 2 Scaffolding Plugin"
65-
desc = "Provides scaffolding for Angular 2 applications"
64+
title = "Angular Scaffolding Plugin"
65+
desc = "Provides scaffolding for Angular applications"
6666
developers = [jameskleeh: "James Kleeh"]
6767
}
6868

@@ -88,7 +88,7 @@ task apidocs(type: Groovydoc) {
8888

8989
destinationDir = new File(buildDir, 'docs/api')
9090
// Might need a classpath
91-
docTitle = "Grails Angular 2 Scaffolding ${version}"
91+
docTitle = "Grails Angular Scaffolding ${version}"
9292

9393
classpath = configurations.documentation
9494
groovyClasspath = configurations.documentation

grails-app/commands/angular2/scaffolding/NgGenerateAllCommand.groovy renamed to grails-app/commands/angular/scaffolding/NgGenerateAllCommand.groovy

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package angular2.scaffolding
1+
package angular.scaffolding
22

33
import grails.codegen.model.Model
44
import grails.dev.commands.GrailsApplicationCommand
@@ -10,7 +10,7 @@ import org.grails.datastore.mapping.model.PersistentEntity
1010
import org.grails.datastore.mapping.model.PersistentProperty
1111
import org.grails.datastore.mapping.model.types.Association
1212
import org.grails.datastore.mapping.model.types.ToMany
13-
import org.grails.plugin.scaffolding.angular2.template.AngularModuleEditor
13+
import org.grails.plugin.scaffolding.angular.template.AngularModuleEditor
1414
import org.grails.scaffolding.markup.DomainMarkupRenderer
1515
import org.grails.scaffolding.model.DomainModelService
1616
import org.grails.scaffolding.model.property.DomainProperty
@@ -138,34 +138,34 @@ class NgGenerateAllCommand implements GrailsApplicationCommand {
138138
}
139139

140140

141-
render template: template(hasFileProperty ? "angular2/javascripts/service-file.ts" : "angular2/javascripts/service.ts"),
141+
render template: template(hasFileProperty ? "angular/javascripts/service-file.ts" : "angular/javascripts/service.ts"),
142142
destination: file("${baseDir}/${module.propertyName}/${module.propertyName}.service.ts"),
143143
model: module.asMap() << [uri: uri],
144144
overwrite: overwrite
145145

146-
render template: template("angular2/javascripts/domain.ts"),
146+
render template: template("angular/javascripts/domain.ts"),
147147
destination: file("${baseDir}/${module.propertyName}/${module.propertyName}.ts"),
148148
model: module.asMap() << [domainProperties: domainProperties, domainConstructorInitializingStatements: domainConstructorInitializingStatements, domainImports: domainImports],
149149
overwrite: overwrite
150150

151151
File moduleFile = file("${baseDir}/${module.propertyName}/${module.propertyName}.module.ts")
152-
render template: template("angular2/javascripts/module.ts"),
152+
render template: template("angular/javascripts/module.ts"),
153153
destination: moduleFile,
154154
model: module.asMap() << [associatedModule: false, importService: true],
155155
overwrite: overwrite
156156

157-
render template: template("angular2/javascripts/routing.module.ts"),
157+
render template: template("angular/javascripts/routing.module.ts"),
158158
destination: file("${baseDir}/${module.propertyName}/${module.propertyName}-routing.module.ts"),
159159
model: module,
160160
overwrite: overwrite
161161

162162
['persist', 'list', 'show'].each {
163-
render template: template("angular2/javascripts/${it}.component.ts"),
163+
render template: template("angular/javascripts/${it}.component.ts"),
164164
destination: file("${baseDir}/${module.propertyName}/${module.propertyName}-${it}.component.ts"),
165165
model: module.asMap() << [initializingStatements: initializingStatements, constructorArguments: constructorArguments, componentProperties: componentProperties, componentImports: componentImports],
166166
overwrite: overwrite
167167

168-
render template: template("angular2/views/${it}.component.html"),
168+
render template: template("angular/views/${it}.component.html"),
169169
destination: file("${baseDir}/${module.propertyName}/${module.propertyName}-${it}.component.html"),
170170
model: module.asMap() << [template: htmlTemplates.get(it)],
171171
overwrite: overwrite
@@ -192,18 +192,18 @@ class NgGenerateAllCommand implements GrailsApplicationCommand {
192192
uri = getUri(associatedModel)
193193
boolean bidirectional = ((Association)prop.persistentProperty).bidirectional
194194
if (!bidirectional) {
195-
render template: template("angular2/javascripts/service.ts"),
195+
render template: template("angular/javascripts/service.ts"),
196196
destination: file("${baseDir}/${associatedModel.propertyName}/${associatedModel.propertyName}.service.ts"),
197197
model: associatedModel.asMap() << [uri: uri],
198198
overwrite: overwrite
199199
}
200200

201-
render template: template("angular2/javascripts/domain.ts"),
201+
render template: template("angular/javascripts/domain.ts"),
202202
destination: file("${baseDir}/${associatedModel.propertyName}/${associatedModel.propertyName}.ts"),
203203
model: associatedModel.asMap() << [domainProperties: [:], domainConstructorInitializingStatements: [:], domainImports: []],
204204
overwrite: overwrite
205205

206-
render template: template("angular2/javascripts/module.ts"),
206+
render template: template("angular/javascripts/module.ts"),
207207
destination: file("${baseDir}/${associatedModel.propertyName}/${associatedModel.propertyName}.module.ts"),
208208
model: associatedModel.asMap() << [associatedModule: true, importService: !bidirectional],
209209
overwrite: overwrite

grails-app/commands/angular2/scaffolding/NgInstallTemplates.groovy renamed to grails-app/commands/angular/scaffolding/NgInstallTemplates.groovy

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package angular2.scaffolding
1+
package angular.scaffolding
22

33
import grails.dev.commands.GrailsApplicationCommand
44
import org.grails.io.support.Resource
@@ -11,7 +11,7 @@ class NgInstallTemplates implements GrailsApplicationCommand {
1111
@Override
1212
boolean handle() {
1313
try {
14-
templates("angular2/**/*").each { Resource r ->
14+
templates("angular/**/*").each { Resource r ->
1515
String path = r.URL.toString().replaceAll(/^.*?META-INF/, "src/main")
1616
if (path.endsWith('/')) {
1717
mkdir(path)

grails-app/init/angular2/scaffolding/Application.groovy renamed to grails-app/init/angular/scaffolding/Application.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package angular2.scaffolding
1+
package angular.scaffolding
22

33
import grails.boot.GrailsApp
44
import grails.boot.config.GrailsAutoConfiguration

settings.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
rootProject.name="angular2-scaffolding"
1+
rootProject.name="angular-scaffolding"

src/docs/asciidoc/customization/index.adoc

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
This plugin is an extension of link:https://github.com/grails/scaffolding[Grails Scaffolding Core]. To change how markup is rendered in the html templates, see the scaffolding core link:http://grails.github.io/scaffolding/{scaffoldingCoreVersion}/[documentation]. The following changes have been made:
44

5-
. The `propertyMarkupRenderer` bean has been set to an instance of link:api/org/grails/plugin/scaffolding/angular2/markup/AngularPropertyMarkupRenderer.groovy[AngularPropertyMarkupRenderer] that only overrides the link:api/org/grails/plugin/scaffolding/angular/markup/AngularPropertyMarkupRendererImpl.html#getStandardAttributes(DomainProperty)[getStandardAttributes] method to add an `[(ngModel)]` attribute.
6-
. The `contextMarkupRenderer` has been set to an instance of link:api/org/grails/plugin/scaffolding/angular2/markup/AngularContextMarkupRenderer.groovy[AngularContextMarkupRenderer] that overrides the list output context to use an `*ngFor`.
5+
. The `propertyMarkupRenderer` bean has been set to an instance of link:api/org/grails/plugin/scaffolding/angular/markup/AngularPropertyMarkupRenderer.groovy[AngularPropertyMarkupRenderer] that only overrides the link:api/org/grails/plugin/scaffolding/angular/markup/AngularPropertyMarkupRendererImpl.html#getStandardAttributes(DomainProperty)[getStandardAttributes] method to add an `[(ngModel)]` attribute.
6+
. The `contextMarkupRenderer` has been set to an instance of link:api/org/grails/plugin/scaffolding/angular/markup/AngularContextMarkupRenderer.groovy[AngularContextMarkupRenderer] that overrides the list output context to use an `*ngFor`.
77
. Additional input and output renderers are registered with a priority of 0. If you wish your own renderers to be used, set a priority higher than 0. See the link:http://grails.github.io/scaffolding/{scaffoldingCoreVersion}/#_how_properties_are_rendered[section on how properties are rendered] in the scaffolding core documentation for more details on how to do so.
88

9-
The JavaScript templates used to create assets can be overridden by executing `grails ngInstallTemplates`. That will put a set of files in `src/main/templates/angular2`. You can modify the templates and they will be used in future angular code generation. You can safely remove any templates that you do not wish to override.
9+
The JavaScript templates used to create assets can be overridden by executing `grails ngInstallTemplates`. That will put a set of files in `src/main/templates/angular`. You can modify the templates and they will be used in future angular code generation. You can safely remove any templates that you do not wish to override.

src/docs/asciidoc/index.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
= Grails Angular 2 Scaffolding Plugin
1+
= Grails Angular Scaffolding Plugin
22
:author: James Kleeh
33
44
:source-highlighter: coderay

src/docs/asciidoc/installation/index.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
== Installation
22

3-
To start using this plugin, add it to your `build.gradle` like the example below. If you created your project with the angular2 profile in Grails 3.2.0 or higher, this is done automatically.
3+
To start using this plugin, add it to your `build.gradle` like the example below. If you created your project with the angular profile in Grails 3.2.0 or higher, this is done automatically.
44

55
[source,groovy,subs="attributes",indent=1]
66
.build.gradle

src/docs/asciidoc/introduction.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
== Introduction
22

3-
The goal of this plugin is to provide basic CRUD abilities using Angular 2 in a single page application. It is designed to be used alongside the angular2 profile, however it can be used in applications that were not created from the angular2 profile. This guide will cover what functionality you can expect from this plugin, as well as how you can change that functionality to meet your needs.
3+
The goal of this plugin is to provide basic CRUD abilities using Angular in a single page application. It is designed to be used alongside the angular profile, however it can be used in applications that were not created from the angular profile. This guide will cover what functionality you can expect from this plugin, as well as how you can change that functionality to meet your needs.

src/docs/asciidoc/usage/index.adoc

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ You can also execute the command via Gradle.
1414
$ ./gradlew ngGenerateAll -Pargs="com.foo.Bar"
1515
----
1616

17-
The default root path where assets will be created is "../client/src/app". That is because the plugin is configured by default to work with the angular2 profile which creates a multi-project build. To change that setting and others, see the link:configuration.html[configuration] section.
17+
The default root path where assets will be created is "../client/src/app". That is because the plugin is configured by default to work with the angular profile which creates a multi-project build. To change that setting and others, see the link:configuration.html[configuration] section.
1818

1919

20-
The command will generate everything required to create, read, update, and delete instances of domain classes with Angular 2. The following will be created if they don't already exist.
20+
The command will generate everything required to create, read, update, and delete instances of domain classes with Angular. The following will be created if they don't already exist.
2121

2222
. A module for the domain `../client/src/app/bar/bar.module.ts`.
2323
. A routing module `../client/src/app/bar/bar-routing.module.ts`.
@@ -57,7 +57,7 @@ If it is not successful, you will be responsible for importing it.
5757

5858
=== Assumptions
5959

60-
This plugin assumes you have an environment that supports ES6 modules and typescript. It is based upon the angular2 profile which uses the Angular CLI.
60+
This plugin assumes you have an environment that supports ES6 modules and typescript. It is based upon the angular profile which uses the Angular CLI.
6161

6262
=== REST API
6363

@@ -92,7 +92,7 @@ grails:
9292

9393
=== Routing
9494

95-
If you are using the angular2 profile, the default index page is modified so that clicking on the link to the controller will automatically route you to the module the controller represents. If you are using this plugin in an existing application, you will have a little bit of work to do to use the generated assets.
95+
If you are using the angular profile, the default index page is modified so that clicking on the link to the controller will automatically route you to the module the controller represents. If you are using this plugin in an existing application, you will have a little bit of work to do to use the generated assets.
9696

9797
The first step is to ensure the module is included in the page. If the bootstrap module is found, a dependency will automatically be created, however if the bootstrap module is not found, it is up to you to ensure the newly created module is imported.
9898

src/main/groovy/org/grails/plugin/scaffolding/angular2/Angular2ScaffoldingGrailsPlugin.groovy renamed to src/main/groovy/org/grails/plugin/scaffolding/angular/AngularScaffoldingGrailsPlugin.groovy

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
1-
package org.grails.plugin.scaffolding.angular2
1+
package org.grails.plugin.scaffolding.angular
22

33
import grails.plugins.Plugin
4-
import org.grails.plugin.scaffolding.angular2.markup.AngularContextMarkupRenderer
5-
import org.grails.plugin.scaffolding.angular2.markup.AngularPropertyMarkupRenderer
6-
import org.grails.plugin.scaffolding.angular2.registry.AngularDomainRendererRegisterer
7-
import org.grails.plugin.scaffolding.angular2.template.AngularModuleEditorImpl
4+
import org.grails.plugin.scaffolding.angular.markup.AngularContextMarkupRenderer
5+
import org.grails.plugin.scaffolding.angular.markup.AngularPropertyMarkupRenderer
6+
import org.grails.plugin.scaffolding.angular.registry.AngularDomainRendererRegisterer
7+
import org.grails.plugin.scaffolding.angular.template.AngularModuleEditorImpl
88
import org.grails.scaffolding.ScaffoldingBeanConfiguration
99

10-
class Angular2ScaffoldingGrailsPlugin extends Plugin {
10+
class AngularScaffoldingGrailsPlugin extends Plugin {
1111

1212

1313
// the version or versions of Grails the plugin is designed for
1414
def grailsVersion = "3.2.0 > *"
1515

1616
// TODO Fill in these fields
17-
def title = "Grails Angular 2 Scaffolding" // Headline output name of the plugin
17+
def title = "Grails Angular Scaffolding" // Headline output name of the plugin
1818
def author = "James Kleeh"
1919
def authorEmail = "[email protected]"
2020
def description = '''\
21-
This plugin provides the ability to generate an AngularJS CRUD interface based on a domain class
21+
This plugin provides the ability to generate an Angular CRUD interface based on a domain class
2222
'''
23-
String documentation = 'http://grails-plugins.github.io/grails-angular2-scaffolding/latest'
23+
String documentation = 'http://grails-plugins.github.io/grails-angular-scaffolding/latest'
2424
String license = 'APACHE'
2525
def organization = [name: 'Grails', url: 'http://www.grails.org/']
26-
def issueManagement = [url: 'https://github.com/grails-plugins/grails-angular2-scaffolding/issues']
27-
def scm = [url: 'https://github.com/grails-plugins/grails-angular2-scaffolding']
26+
def issueManagement = [url: 'https://github.com/grails-plugins/grails-angular-scaffolding/issues']
27+
def scm = [url: 'https://github.com/grails-plugins/grails-angular-scaffolding']
2828

2929
Closure doWithSpring() {{ ->
3030
scaffoldingCoreConfig(ScaffoldingBeanConfiguration)

src/main/groovy/org/grails/plugin/scaffolding/angular2/markup/AngularContextMarkupRenderer.groovy renamed to src/main/groovy/org/grails/plugin/scaffolding/angular/markup/AngularContextMarkupRenderer.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package org.grails.plugin.scaffolding.angular2.markup
1+
package org.grails.plugin.scaffolding.angular.markup
22

33
import org.grails.datastore.mapping.model.PersistentEntity
44
import org.grails.scaffolding.markup.ContextMarkupRendererImpl

src/main/groovy/org/grails/plugin/scaffolding/angular2/markup/AngularPropertyMarkupRenderer.groovy renamed to src/main/groovy/org/grails/plugin/scaffolding/angular/markup/AngularPropertyMarkupRenderer.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package org.grails.plugin.scaffolding.angular2.markup
1+
package org.grails.plugin.scaffolding.angular.markup
22

33
import grails.util.GrailsNameUtils
44
import org.grails.scaffolding.markup.PropertyMarkupRendererImpl
+6-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
package org.grails.plugin.scaffolding.angular2.registry
1+
package org.grails.plugin.scaffolding.angular.registry
22

3-
import org.grails.plugin.scaffolding.angular2.registry.input.AngularAssociationInputRenderer
4-
import org.grails.plugin.scaffolding.angular2.registry.input.AngularBidirectionalToManyInputRenderer
5-
import org.grails.plugin.scaffolding.angular2.registry.input.AngularDateInputRenderer
6-
import org.grails.plugin.scaffolding.angular2.registry.input.AngularFileInputRenderer
7-
import org.grails.plugin.scaffolding.angular2.registry.output.*
3+
import org.grails.plugin.scaffolding.angular.registry.input.AngularAssociationInputRenderer
4+
import org.grails.plugin.scaffolding.angular.registry.input.AngularBidirectionalToManyInputRenderer
5+
import org.grails.plugin.scaffolding.angular.registry.input.AngularDateInputRenderer
6+
import org.grails.plugin.scaffolding.angular.registry.input.AngularFileInputRenderer
7+
import org.grails.plugin.scaffolding.angular.registry.output.*
88
import org.grails.scaffolding.registry.DomainInputRendererRegistry
99
import org.grails.scaffolding.registry.DomainOutputRendererRegistry
1010
import org.springframework.beans.factory.annotation.Autowired
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
package org.grails.plugin.scaffolding.angular2.registry.input
1+
package org.grails.plugin.scaffolding.angular.registry.input
22

33
import grails.util.GrailsNameUtils
44
import org.grails.datastore.mapping.model.PersistentProperty
55
import org.grails.datastore.mapping.model.types.Association
66
import org.grails.datastore.mapping.model.types.Basic
77
import org.grails.datastore.mapping.model.types.ToMany
8-
import org.grails.plugin.scaffolding.angular2.registry.output.PropertyHelper
8+
import org.grails.plugin.scaffolding.angular.registry.output.PropertyHelper
99
import org.grails.scaffolding.model.property.DomainProperty
1010
import org.grails.scaffolding.registry.DomainInputRenderer
1111

Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package org.grails.plugin.scaffolding.angular2.registry.input
1+
package org.grails.plugin.scaffolding.angular.registry.input
22

33
import grails.util.GrailsNameUtils
44
import org.grails.datastore.mapping.model.types.Association
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package org.grails.plugin.scaffolding.angular2.registry.input
1+
package org.grails.plugin.scaffolding.angular.registry.input
22

33
import org.grails.scaffolding.model.property.DomainProperty
44
import org.grails.scaffolding.registry.input.DateInputRenderer
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package org.grails.plugin.scaffolding.angular2.registry.input
1+
package org.grails.plugin.scaffolding.angular.registry.input
22

33
import grails.util.GrailsNameUtils
44
import org.grails.scaffolding.model.property.DomainProperty

0 commit comments

Comments
 (0)