Skip to content

Commit

Permalink
CLDR-00000 Automated Build of Pages
Browse files Browse the repository at this point in the history
  • Loading branch information
srl295 committed Jan 25, 2024
1 parent d09c532 commit 5c3d29f
Show file tree
Hide file tree
Showing 4 changed files with 138 additions and 1 deletion.
22 changes: 22 additions & 0 deletions charts/keyboard/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Keyboard Charts

## What are these

The Keyboard Charts are now built as client-side JavaScript tables.

## To Build from the command line

- install <https://nodejs.org> current LTS version, then in this directory:
- `npm i`
- `npm run build`

## To build from Maven

Run this from the command line in the top level directory:

- `mvn --file=tools/pom.xml -pl :cldr-keyboard-charts com.github.eirslett:frontend-maven-plugin:npm`

## Trying them out

- `npm run serve` will serve the charts locally on <http://localhost:3000>

1 change: 1 addition & 0 deletions charts/keyboard/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion charts/keyboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"serve": "npx serve static",
"build": "node build.mjs"
"build": "node build.mjs",
"lint": "echo no linter yet",
"postinstall": "node build.mjs"
},
"keywords": [],
"author": "Steven R. Loomis <[email protected]>",
Expand Down
112 changes: 112 additions & 0 deletions charts/keyboard/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
<?xml version="1.0" encoding="UTF-8"?>

<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<artifactId>cldr-keyboard-charts</artifactId>
<packaging>pom</packaging>
<name>CLDR Keyboard Charts</name>

<url>https://unicode.org/cldr</url>

<scm>
<connection>scm:git:https://github.com/unicode-org/cldr.git</connection>
</scm>


<parent>
<groupId>org.unicode.cldr</groupId>
<artifactId>cldr-all</artifactId>
<version>45.0-SNAPSHOT</version>
<relativePath>../../../tools/pom.xml</relativePath>
</parent>

<build>
<plugins>
<plugin>
<!-- to get the node version-->
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>initialize</phase>
<configuration>
<target>
<concat append="no" destfile="${project.basedir}/target/node-version.properties">node.version=</concat>
<concat append="yes" destfile="${project.basedir}/target/node-version.properties">
<fileset dir="${project.basedir}/../../..">
<include name=".node-version" />
</fileset>
</concat>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<executions>
<execution>
<phase>initialize</phase>
<goals>
<goal>read-project-properties</goal>
</goals>
<configuration>
<files>
<file>${project.basedir}/target/node-version.properties</file>
</files>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<executions>
<execution>
<id>install node and npm</id>
<goals>
<goal>install-node-and-npm</goal>
</goals>
<phase>integration-test</phase>
</execution>
<execution>
<id>npm install</id>
<goals>
<goal>npm</goal>
</goals>
<phase>integration-test</phase>
</execution>
<execution>
<id>npm run build</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<arguments>run build</arguments>
</configuration>
<phase>integration-test</phase>
</execution>
</executions>
<configuration>
<nodeVersion>${node.version}</nodeVersion>
<!-- run in project sourcedir -->
<workingDirectory>${project.basedir}</workingDirectory>
</configuration>
</plugin>
</plugins>
</build>


<profiles>
<profile>
<id>build-keyboard-charts</id>
</profile>
</profiles>

</project>

0 comments on commit 5c3d29f

Please sign in to comment.