Skip to content

Commit 450d8df

Browse files
author
Matt Cheely
committed
initial commit
0 parents  commit 450d8df

File tree

14 files changed

+18099
-0
lines changed

14 files changed

+18099
-0
lines changed

.gitignore

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# use glob syntax.
2+
syntax: glob
3+
*.ser
4+
*.class
5+
*~
6+
*.bak
7+
*.off
8+
*.old
9+
10+
# eclipse conf file
11+
.settings
12+
.classpath
13+
.project
14+
.manager
15+
16+
# idea
17+
*.iml
18+
*.iws
19+
*.ipr
20+
21+
# building
22+
target
23+
build
24+
null
25+
tmp*
26+
temp*
27+
dist
28+
test-output
29+
build.log
30+
31+
# other scm
32+
.svn
33+
.CVS
34+
.hg*
35+
36+
# switch to regexp syntax.
37+
# syntax: regexp
38+
# ^\.pc/
39+
40+

COPYRIGHT.txt

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
requirejs optimizer maven plugin
2+
Copyright (c) 2012 Matthew Cheely <[email protected]>
3+
4+
This software is open source. For details, see LICENSE.txt and NOTICE.txt.

LICENSE.txt

+503
Large diffs are not rendered by default.

LICENSES.txt

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
The "New" BSD License:
2+
----------------------
3+
4+
Copyright (c) 2010-2011, The Dojo Foundation
5+
All rights reserved.
6+
7+
Redistribution and use in source and binary forms, with or without
8+
modification, are permitted provided that the following conditions are met:
9+
10+
* Redistributions of source code must retain the above copyright notice, this
11+
list of conditions and the following disclaimer.
12+
* Redistributions in binary form must reproduce the above copyright notice,
13+
this list of conditions and the following disclaimer in the documentation
14+
and/or other materials provided with the distribution.
15+
* Neither the name of the Dojo Foundation nor the names of its contributors
16+
may be used to endorse or promote products derived from this software
17+
without specific prior written permission.
18+
19+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
23+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29+
30+
31+
32+
MIT License
33+
-----------
34+
35+
Copyright (c) 2010-2011, The Dojo Foundation
36+
37+
Permission is hereby granted, free of charge, to any person obtaining a copy
38+
of this software and associated documentation files (the "Software"), to deal
39+
in the Software without restriction, including without limitation the rights
40+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
41+
copies of the Software, and to permit persons to whom the Software is
42+
furnished to do so, subject to the following conditions:
43+
44+
The above copyright notice and this permission notice shall be included in
45+
all copies or substantial portions of the Software.
46+
47+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
48+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
49+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
50+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
51+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
52+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
53+
THE SOFTWARE.
54+

NOTICE.txt

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Copyright (c) 2012 Matthew Cheely <[email protected]>
2+
3+
Based on brew maven plugin, Copyright (c) 2002-2011 Jacob Hansson <[email protected]>
4+
5+
requirejs-maven-plugin is released under the LGPL. See LICENSE.txt.
6+
7+
Third party libraries
8+
---------------------
9+
See LICENSES.txt for full licenses.
10+
11+
RequireJS r.js is licensed under the MIT or the new BSD license

README.md

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# RequreJS maven plugin
2+
3+
Builds javascript applications using the CommonJS Asynchronous Module Definition (AMD)
4+
pattern to define classes and dependencies between them. See:
5+
6+
http://wiki.commonjs.org/wiki/Modules/AsynchronousDefinition
7+
8+
### Origin
9+
10+
This project is originally based on Jacob Hansson's brew plugin at:
11+
12+
https://github.com/jakewins/brew
13+
14+
### Usage
15+
16+
Just add the plugin to your pom:
17+
18+
<plugins>
19+
<plugin>
20+
<groupId>com.github.mcheely</groupId>
21+
<artifactId>requirejs-maven-plugin</artifactId>
22+
<version>1.0.0-SNAPSHOT</version>
23+
<executions>
24+
<execution>
25+
<goals>
26+
<goal>optimize</goal>
27+
</goals>
28+
</execution>
29+
</executions>
30+
<configuration>
31+
<!-- path to optimizer json config file -->
32+
<configFile>
33+
${basedir}/src/main/config/buildconfig.js
34+
</configFile>
35+
<!-- optional path to optimizer executable -->
36+
<optimizerFile>
37+
${basedir}/src/main/scripts/r.js
38+
</optimizerFile>
39+
</configuration>
40+
</plugin>
41+
</plugins>
42+
43+
### Goal: optimize
44+
45+
Uses the r.js optimizer to aggregate and minify your project. Dependencies should be
46+
defined using the CommonJS Asynchronous Module Definition pattern, see the RequireJS documentation at:
47+
48+
http://requirejs.org
49+
50+
The "optimize" goal is by default attached to the "process-classes" maven phase. It will go through
51+
all the js modules you have listed in your plugin configuration, interpret the AMD dependencies
52+
each file has, aggregate and minify that entire dependency tree, and put the resulting minified filed in
53+
your output directory.
54+
55+
Optimization is configured using a json project configuration file. For details of the options available,
56+
see the RequireJS optimization documentation at:
57+
58+
http://requirejs.org/docs/optimization.html#wholeproject
59+
60+
The plugin also takes an optional optimizerFile parameter, which can be used to specify the path to a
61+
version of r.js or some compatible optimizer other than the one packaged with the plugin.

pom.xml

+91
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
5+
<groupId>com.github.mcheely</groupId>
6+
<artifactId>requirejs-maven-plugin</artifactId>
7+
<name>RequireJS Mavein Plugin</name>
8+
<version>1.0.0-SNAPSHOT</version>
9+
<packaging>maven-plugin</packaging>
10+
11+
<url>http://github.com/mcheely/requirejs-maven-plugin</url>
12+
13+
<description>
14+
Maven plugin for RequireJS optimization
15+
</description>
16+
17+
<scm>
18+
<connection>scm:git:github.com/mcheely/requirejs-maven-plugin</connection>
19+
<developerConnection>scm:git:github.com/mcheely/requirejs-maven-plugin</developerConnection>
20+
<url>[email protected]:mcheely/requirejs-maven-plugin.git</url>
21+
</scm>
22+
23+
<licenses>
24+
<license>
25+
<name>Creative Commons GNU LGPL, Version 2.1</name>
26+
<url>http://creativecommons.org/licenses/LGPL/2.1/</url>
27+
<distribution>repo</distribution>
28+
</license>
29+
</licenses>
30+
31+
<dependencies>
32+
<dependency>
33+
<groupId>org.apache.maven</groupId>
34+
<artifactId>maven-plugin-api</artifactId>
35+
<version>2.1.0</version>
36+
<scope>provided</scope>
37+
</dependency>
38+
39+
<dependency>
40+
<groupId>org.apache.maven</groupId>
41+
<artifactId>maven-project</artifactId>
42+
<version>2.1.0</version>
43+
<scope>provided</scope>
44+
</dependency>
45+
46+
<dependency>
47+
<groupId>junit</groupId>
48+
<artifactId>junit</artifactId>
49+
<version>4.9</version>
50+
<type>jar</type>
51+
<scope>test</scope>
52+
</dependency>
53+
<dependency>
54+
<groupId>org.mockito</groupId>
55+
<artifactId>mockito-all</artifactId>
56+
<version>1.9.0-rc1</version>
57+
<type>jar</type>
58+
<scope>test</scope>
59+
</dependency>
60+
<dependency>
61+
<groupId>org.mozilla</groupId>
62+
<artifactId>rhino</artifactId>
63+
<version>1.7R3</version>
64+
<type>jar</type>
65+
</dependency>
66+
<dependency>
67+
<groupId>com.google.javascript</groupId>
68+
<artifactId>closure-compiler</artifactId>
69+
<version>r1352</version>
70+
<type>jar</type>
71+
</dependency>
72+
</dependencies>
73+
74+
<build>
75+
<pluginManagement>
76+
<plugins>
77+
<plugin>
78+
<artifactId>maven-compiler-plugin</artifactId>
79+
<version>2.3.2</version>
80+
<configuration>
81+
<source>1.6</source>
82+
<target>1.6</target>
83+
<showDeprecation>true</showDeprecation>
84+
<showWarnings>true</showWarnings>
85+
</configuration>
86+
</plugin>
87+
</plugins>
88+
</pluginManagement>
89+
</build>
90+
91+
</project>

src/assembly/project.xml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<assembly>
2+
<id>project</id>
3+
<formats>
4+
<format>tar.bz2</format>
5+
</formats>
6+
<fileSets>
7+
<fileSet>
8+
<directory>.</directory>
9+
<outputDirectory></outputDirectory>
10+
<excludes>
11+
<exclude>target/**</exclude>
12+
<exclude>.hg/**</exclude>
13+
<exclude>.classpath</exclude>
14+
<exclude>.project</exclude>
15+
<exclude>.settings/**</exclude>
16+
<exclude>null/**</exclude>
17+
<exclude>test-output/**</exclude>
18+
<exclude>tmp/**</exclude>
19+
<exclude>dist/**</exclude>
20+
<exclude>build/**</exclude>
21+
</excludes>
22+
</fileSet>
23+
</fileSets>
24+
</assembly>

0 commit comments

Comments
 (0)