diff --git a/demo/.gitignore b/demo/.gitignore deleted file mode 100644 index e7fe522..0000000 --- a/demo/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -dist -node_modules - -app/*.js -app/*.js.map - -dist-plugin/ \ No newline at end of file diff --git a/demo/app/index.tsx b/demo/app/index.tsx deleted file mode 100644 index 27c28bc..0000000 --- a/demo/app/index.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import * as React from "react"; -import * as ReactDOM from "react-dom"; - -import {classList, spriteUrl, TestIcons, spriteEntries} from "svg-sprites/test"; - -console.log("Mein Hello World: AddFolder: %s, Path: %s", TestIcons.AddFolder, spriteUrl); -console.log("All entries: %O", spriteEntries); - -const container = document.createElement("div"); -container.style.fontSize = "100px"; -document.body.append(container); - -ReactDOM.render(<> - {classList.map(icon => { - return

; - })} -, container); \ No newline at end of file diff --git a/demo/app/test.d.ts b/demo/app/test.d.ts deleted file mode 100644 index 5d6255e..0000000 --- a/demo/app/test.d.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * DO NOT MODIFY THIS FILE! - * - * This file has been auto generated by the svg-sprite generator. - * Sprite source directory: D:\__on_g__git\web\webpack-svg-sprite\demo\sprites - * Sprite count: 22 - */ -declare module "svg-sprites/test" { - export type TestIconClasses = "client-about" | "client-activate_microphone" | "client-add" | "client-add_foe" | "client-add_folder" | "client-add_friend" | "client-addon-collection" | "client-addon" | "client-apply" | "client-arrow_down" | "client-arrow_left" | "client-arrow_right" | "client-arrow_up" | "client-away" | "client-ban_client" | "client-ban_list" | "client-bookmark_add" | "client-bookmark_add_folder" | "client-bookmark_duplicate" | "client-channel_popin" | "client-player_off" | "client-w2g"; - - export enum TestIcons { - About = "client-about", - ActivateMicrophone = "client-activate_microphone", - Add = "client-add", - AddFoe = "client-add_foe", - AddFolder = "client-add_folder", - AddFriend = "client-add_friend", - AddonCollection = "client-addon-collection", - Addon = "client-addon", - Apply = "client-apply", - ArrowDown = "client-arrow_down", - ArrowLeft = "client-arrow_left", - ArrowRight = "client-arrow_right", - ArrowUp = "client-arrow_up", - Away = "client-away", - BanClient = "client-ban_client", - BanList = "client-ban_list", - BookmarkAdd = "client-bookmark_add", - BookmarkAddFolder = "client-bookmark_add_folder", - BookmarkDuplicate = "client-bookmark_duplicate", - ChannelPopin = "client-channel_popin", - PlayerOff = "client-player_off", - W2g = "client-w2g", - } - - export const spriteEntries: { - id: string; - className: string; - width: number; - height: number; - xOffset: number; - yOffset: number; - }[]; - - export const spriteUrl: string; - export const classList: string[]; - - export const spriteWidth: number; - export const spriteHeight: number; -} \ No newline at end of file diff --git a/demo/sprites/about.svg b/demo/sprites/about.svg deleted file mode 100644 index 5291c4b..0000000 --- a/demo/sprites/about.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file diff --git a/demo/sprites/activate_microphone.svg b/demo/sprites/activate_microphone.svg deleted file mode 100644 index c771088..0000000 --- a/demo/sprites/activate_microphone.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/demo/sprites/add.svg b/demo/sprites/add.svg deleted file mode 100644 index a0bced6..0000000 --- a/demo/sprites/add.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file diff --git a/demo/sprites/add_foe.svg b/demo/sprites/add_foe.svg deleted file mode 100644 index 93bc063..0000000 --- a/demo/sprites/add_foe.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/demo/sprites/add_folder.svg b/demo/sprites/add_folder.svg deleted file mode 100644 index f138c03..0000000 --- a/demo/sprites/add_folder.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - \ No newline at end of file diff --git a/demo/sprites/add_friend.svg b/demo/sprites/add_friend.svg deleted file mode 100644 index ddab65a..0000000 --- a/demo/sprites/add_friend.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/demo/sprites/addon-collection.svg b/demo/sprites/addon-collection.svg deleted file mode 100644 index 8492c33..0000000 --- a/demo/sprites/addon-collection.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file diff --git a/demo/sprites/addon.svg b/demo/sprites/addon.svg deleted file mode 100644 index df3c8f2..0000000 --- a/demo/sprites/addon.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file diff --git a/demo/sprites/apply.svg b/demo/sprites/apply.svg deleted file mode 100644 index ae0c181..0000000 --- a/demo/sprites/apply.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file diff --git a/demo/sprites/arrow_down.svg b/demo/sprites/arrow_down.svg deleted file mode 100644 index b2b94f9..0000000 --- a/demo/sprites/arrow_down.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/demo/sprites/arrow_left.svg b/demo/sprites/arrow_left.svg deleted file mode 100644 index 2152d7f..0000000 --- a/demo/sprites/arrow_left.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/demo/sprites/arrow_right.svg b/demo/sprites/arrow_right.svg deleted file mode 100644 index 9da075b..0000000 --- a/demo/sprites/arrow_right.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/demo/sprites/arrow_up.svg b/demo/sprites/arrow_up.svg deleted file mode 100644 index 5adbf1b..0000000 --- a/demo/sprites/arrow_up.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/demo/sprites/away.svg b/demo/sprites/away.svg deleted file mode 100644 index 423aa4b..0000000 --- a/demo/sprites/away.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/demo/sprites/ban_client.svg b/demo/sprites/ban_client.svg deleted file mode 100644 index 2f7645f..0000000 --- a/demo/sprites/ban_client.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/demo/sprites/ban_list.svg b/demo/sprites/ban_list.svg deleted file mode 100644 index beb1512..0000000 --- a/demo/sprites/ban_list.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/demo/sprites/bookmark_add.svg b/demo/sprites/bookmark_add.svg deleted file mode 100644 index 5499ef7..0000000 --- a/demo/sprites/bookmark_add.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/demo/sprites/bookmark_add_folder.svg b/demo/sprites/bookmark_add_folder.svg deleted file mode 100644 index 0e33882..0000000 --- a/demo/sprites/bookmark_add_folder.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/demo/sprites/bookmark_duplicate.svg b/demo/sprites/bookmark_duplicate.svg deleted file mode 100644 index 6e93899..0000000 --- a/demo/sprites/bookmark_duplicate.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/demo/sprites/channel_popin.svg b/demo/sprites/channel_popin.svg deleted file mode 100644 index f61805a..0000000 --- a/demo/sprites/channel_popin.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/demo/sprites/player_off.svg b/demo/sprites/player_off.svg deleted file mode 100644 index 6b02df4..0000000 --- a/demo/sprites/player_off.svg +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/demo/sprites/w2g.svg b/demo/sprites/w2g.svg deleted file mode 100644 index b1c5308..0000000 --- a/demo/sprites/w2g.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/demo/tsconfig.json b/demo/tsconfig.json deleted file mode 100644 index 8762631..0000000 --- a/demo/tsconfig.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "target": "es6", - "sourceMap": true, - "baseUrl": ".", - "jsx": "react" - }, - "include": [ - "app" - ] -} \ No newline at end of file diff --git a/demo/webpack.config.ts b/demo/webpack.config.ts deleted file mode 100644 index 5abba4d..0000000 --- a/demo/webpack.config.ts +++ /dev/null @@ -1,70 +0,0 @@ -import * as path from "path"; -import {Configuration} from "webpack"; -import {CleanWebpackPlugin} from "clean-webpack-plugin"; -import HtmlWebpackPlugin from "html-webpack-plugin"; -import * as SpriteGenerator from "../plugin/"; - -console.log("Using config %s", process.env.NODE_ENV === "development" ? "development" : "production"); -export = { - entry: path.join(__dirname, "app", "index.tsx"), - target: "web", - - plugins: [ - new CleanWebpackPlugin(), - new SpriteGenerator.Plugin({ - dtsOutputFolder: path.join(__dirname, "app"), - configurations: { - test: { - folder: path.join(__dirname, "sprites"), - cssClassPrefix: "client-", - dtsOptions: { - module: true, - enumName: "TestIcons", - classUnionName: "TestIconClasses", - }, - cssOptions: [ - { - scale: 1, - selector: ".icon", - unit: "px" - }, - { - scale: 2, - selector: ".icon_x2", - unit: "px" - }, - { - scale: 1, - selector: ".icon_em", - unit: "em" - } - ] - } - } - }), - new HtmlWebpackPlugin() - ], - module: { - rules: [ - { - test: /\.tsx?$/, - use: [ - "ts-loader" - ] - } - ] - }, - mode: process.env.NODE_ENV === "development" ? "development" : "production", - devServer: { - contentBase: path.join(__dirname, 'dist'), - compress: true, - port: 9000, - }, - resolve: { - extensions: [".ts", ".tsx", ".css", ".js"] - }, - output: { - filename: "[name].[contenthash].js", - path: path.resolve(__dirname, "dist") - } -} as Configuration; \ No newline at end of file