Skip to content

Commit

Permalink
KEYCLOAK-5127: Exclude node_modules from git (keycloak#4334)
Browse files Browse the repository at this point in the history
* KEYCLOAK-5127: Exclude node_modules from git

* Add readme file.
  • Loading branch information
ssilvert authored Jul 21, 2017
1 parent 79a6465 commit c8068b6
Show file tree
Hide file tree
Showing 539 changed files with 72 additions and 131,697 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,7 @@ target
# Maven shade
#############
*dependency-reduced-pom.xml

# nodejs #
##########
node_modules
44 changes: 44 additions & 0 deletions themes/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,49 @@
</build>
</profile>
</profiles>

<build>
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<configuration>
<filesets>
<fileset>
<directory>src/main/resources/theme/keycloak/common/resources/node_modules</directory>
</fileset>
</filesets>
</configuration>
</plugin>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<executions>
<execution>
<id>install node and yarn</id>
<goals>
<goal>install-node-and-yarn</goal>
</goals>
<phase>generate-resources</phase>
</execution>
<execution>
<id>yarn install</id>
<goals>
<goal>yarn</goal>
</goals>
<phase>process-resources</phase>
<configuration>
<arguments>install --production=false --frozen-lockfile</arguments>
</configuration>
</execution>
</executions>
<configuration>
<nodeVersion>v6.11.1</nodeVersion>
<yarnVersion>v0.27.5</yarnVersion>
<workingDirectory>src/main/resources/theme/keycloak/common/resources</workingDirectory>
<installDirectory>target</installDirectory>
</configuration>
</plugin>
</plugins>
</build>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Management of javascript libraries
===================================================

Javascript libraries under the *./lib* directory are not managed. These
libraries are not available in the public npm repo and are thus checked into
GitHub.

Javascript libraries under *./node_modules* directory are managed with yarn.
THEY SHOULD NOT BE CHECKED INTO GITHUB!

Adding or Removing javascript libraries
---------------------------------------
To add/remove/update javascript libraries you should always use yarn so that
the yarn.lock file will be updated. Then, just check in the modified version
of package.json and yarn.lock. To do this, you should locally install
nodejs/npm and yarn.

Do not use *npm install --save*. If you try to update a dependency using
package.json and fail to update yarn.lock, then the next build will fail.

To locally install nodejs/npm and yarn, see:

* [Install nodejs and npm](https://www.npmjs.com/get-npm)
* [Install yarn](https://yarnpkg.com/lang/en/docs/install/)

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit c8068b6

Please sign in to comment.