Skip to content

Commit

Permalink
DN-33: Added driver bundle to provide driver.js framework
Browse files Browse the repository at this point in the history
  • Loading branch information
Michel Bröker committed May 13, 2024
1 parent daa6cae commit dede3b4
Show file tree
Hide file tree
Showing 9 changed files with 120 additions and 3 deletions.
3 changes: 2 additions & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ gulp.task("build",
gulp.parallel(
"js-transpile",
"rollup-build",
"themes-compile"
"themes-compile",
"css-compress"
)
)
);
Expand Down
9 changes: 8 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@
"tsx": "^4.6.0",
"typescript": "5.2.2",
"vue": "2.7.15",
"vue-template-compiler": "2.7.15"
"vue-template-compiler": "2.7.15",
"driver.js": "^1.3.1",
"webpack": "^5.88.2",
"webpack-cli": "^5.1.4",
"babel-loader": "^9.1.3",
"source-map-loader": "4.0.1",
"css-loader": "^6.10.0",
"style-loader": "^3.3.4"
}
}
8 changes: 8 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,14 @@
<configuration>
<nodeVersion>v20.9.0</nodeVersion>
</configuration>
<executions>
<execution>
<id>run-webpack</id>
<goals>
<goal>webpack</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
Expand Down
4 changes: 3 additions & 1 deletion src/main/js/apps/sample/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"locator-store",
"toc",
"sample_helloworld",
"dn_intro"
"dn_intro",
"sample_toc_driver"
]
},
"bundles": {
Expand Down Expand Up @@ -90,6 +91,7 @@
{
"id": "mapview_tools",
"tools": [
"tocTourTool",
"locateMeTool",
"zoomInTool",
"zoomOutTool",
Expand Down
21 changes: 21 additions & 0 deletions src/main/js/bundles/driver/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License

Copyright (c) Kamran Ahmed

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
3 changes: 3 additions & 0 deletions src/main/js/bundles/driver/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# driver.js

This bundle provides the driver.js framework (MIT Licensed (c), Kamran Ahmed) - https://driverjs.com/
17 changes: 17 additions & 0 deletions src/main/js/bundles/driver/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* Copyright (C) 2023 con terra GmbH ([email protected])
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import "driver.js/dist/driver.css";
export * as driver from "driver.js";
17 changes: 17 additions & 0 deletions src/main/js/bundles/driver/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "driver",
"version": "1.3.1",
"author": "Kamran Ahmed",
"description": "Product tours, highlights, contextual help and more.",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/kamranahmedse/driver.js.git"
},
"bugs": {
"url": "https://github.com/kamranahmedse/driver.js/issues"
},
"main": "index.js",
"i18n": [],
"layer": ""
}
41 changes: 41 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@

const path = require('path');

module.exports = [
{
entry: {
index: "./src/main/js/bundles/driver/index.js"
},
mode: 'production',
output: {
path: path.resolve(__dirname, 'target/webapp/js/bundles/driver'),
filename: "index.js",
libraryTarget: 'amd'
},
module: {
rules: [
{
test: /\.js$/,
include: /node_modules/,
use: {
loader: "babel-loader",
options: {
presets: ["@babel/preset-env"]
}
}
},
{
test: /.js$/,
use: ["source-map-loader"],
enforce: "pre"
},
{
test: /\.css$/i,
include: /node_modules/,
use: ["style-loader", "css-loader"]
}
]
}
}
]

0 comments on commit dede3b4

Please sign in to comment.