-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update change all the tree method & prod easier
- Loading branch information
Showing
8 changed files
with
158 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,66 @@ | ||
// Type definitions for Tasye-languages-tools v.0.0.3 | ||
// Project: Tasye Languages Tools | ||
// Definitions by: @Tasye24 <[https://github.com/tasye24]> | ||
/*~ This is the module template file. You should rename it to index.d.ts | ||
*~ and place it in a folder with the same name as the module. | ||
*~ For example, if you were writing a file for "super-greeter", this | ||
*~ file should be 'super-greeter/index.d.ts' | ||
*/ | ||
/*~ If this module is a UMD module that exposes a global variable 'myLib' when | ||
*~ loaded outside a module loader environment, declare that global here. | ||
*~ Otherwise, delete this declaration. | ||
*/ | ||
export as namespace Tasye_Languages_Tools | ||
|
||
export const tasye_current_version = "0.0.3" | ||
export const ListOfLanguages:["fr-FR","it-IT"] | ||
|
||
/** | ||
* Function Language | ||
* @example | ||
* // With language_pack | ||
* let sentence = "Le vélo " + language("Andrea", true, "de", "fr-FR") | ||
* // > sentence = "Le vélo d'Andréa" | ||
* @example | ||
* // Without language_pack | ||
* let word = { | ||
* full: "de", | ||
* short: "d'", | ||
* } | ||
* let sentence = "Le vélo " + language("Andrea", false, word) | ||
* // > sentence = "Le vélo d'Andréa" | ||
*/ | ||
export function language(item: string, with_pack:boolean, word: string, language?:string):string | ||
|
||
|
||
|
||
|
||
// ======= Disabled | ||
// ======= Refer using JsDOC in code | ||
// ======= Seems this method is less efficient | ||
// ======= For the moment | ||
|
||
|
||
/* | ||
export as namespace TasyeLanguageTools | ||
export class TasyeLanguageTools { | ||
constructor(lang?: string); | ||
elision(): TLT.language | ||
variables: { | ||
language: string[] | ||
version: string | ||
} | ||
} | ||
declare namespace TLT { | ||
/** | ||
* @param {string} item the word for example a name like "Andrea" | ||
* @param {boolean} with_pack use the pack ? | ||
* @param {string?} language the language like "fr-FR" | ||
* @param {string|object} word the word like "le" | ||
* @type {(item: string, with_pack: boolean, word: string|{full: string, short: string, exeptions?: string}, language: string?) => string} | ||
* @example | ||
* // With language_pack | ||
* let sentence = "Le vélo " + language("Andrea", true, "de", "fr-FR") | ||
* // > sentence = "Le vélo d'Andréa" | ||
* @example | ||
* // Without language_pack | ||
* let word = { | ||
* full: "de", | ||
* short: "d'", | ||
* } | ||
* let sentence = "Le vélo " + language("Andrea", false, word) | ||
* // > sentence = "Le vélo d'Andréa" | ||
* / | ||
export interface language { | ||
item: string | ||
with_pack: boolean | ||
language?: string | ||
word: string|object | ||
} | ||
export interface variables { | ||
/** | ||
* SMTHIN | ||
* @param language | ||
* / | ||
language: string[] | ||
version: string | ||
} | ||
} | ||
in comment like /* * / remove the last space thx if you want to use it | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
TasyeLanguageTools | ||
by Tasye - 2023 | ||
*/ | ||
|
||
const Elisions = require("./Tools/Elisions"); | ||
const Pkg = require("./package.json") | ||
|
||
/* | ||
class TLT extends Elisions { | ||
constructor() { | ||
super() | ||
this.info["version"] = Pkg["version"] | ||
this.info["author"] = Pkg["author"] | ||
} | ||
}*/ | ||
|
||
class TLT { | ||
constructor() { | ||
this.Elisions = new Elisions | ||
this.__info__ = { | ||
"author": Pkg["author"], | ||
"version": Pkg["version"] | ||
} | ||
} | ||
} | ||
|
||
module.exports = TLT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
{ | ||
"name": "@tasye24/tasye-language-tools", | ||
"version": "0.1.0-0", | ||
"version": "0.1.1-0", | ||
"author": "Tasye24 <[email protected]>", | ||
"description": "## Intro In some languages like french (idk if others languages have same patterns) before a voyel and a muted \"*h*\" you should use an \"[*élision*](https://fr.wiktionary.org/wiki/%C3%A9lision)\".", | ||
"main": "short-long.js", | ||
"main": "index.js", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/Tasye24/tasye-languages-tools.git" | ||
|
@@ -12,7 +12,9 @@ | |
"example": "examples" | ||
}, | ||
"scripts": { | ||
"test": "mocha \"**/*.test.js\"" | ||
"test": "mocha \"**/*.test.js\"", | ||
"watch": "webpack --watch --env mode=development", | ||
"build": "webpack --env mode=production" | ||
}, | ||
"keywords": [ | ||
"javascript", | ||
|
@@ -30,8 +32,7 @@ | |
], | ||
"license": "ISC", | ||
"publishConfig": { | ||
"registry": "https://npmjs.com/", | ||
"@tasye24:registry": "https://npm.pkg.github.com" | ||
"registry": "https://registry.npmjs.com/" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/Tasye24/tasye-languages-tools/issues" | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,34 @@ | ||
const path = require('path'); | ||
const { env } = require('process'); | ||
const webpack = require('webpack'); | ||
/*const HtmlWebpackPlugin = require('html-webpack-plugin'); | ||
const ExtractTextPlugin = require('extract-text-webpack-plugin');*/ | ||
|
||
module.exports = { | ||
mode: "development", | ||
entry: './short-long.js', | ||
output: { | ||
filename: 'bundle.dev.js', | ||
path: path.resolve(__dirname, 'dist'), | ||
library: "Language_Tools", | ||
//libraryExport: "default", | ||
libraryTarget: "this", | ||
globalObject: "this" | ||
}, | ||
|
||
module.exports = (env, argv) => { | ||
let filename; | ||
switch (env.mode) { | ||
case "development": | ||
filename = "dev" | ||
break; | ||
case "production": | ||
filename = "prod"; | ||
break; | ||
default: | ||
filename = "testing" | ||
break; | ||
} | ||
|
||
return { | ||
mode: env.mode, | ||
entry: './index.js', | ||
output: { | ||
filename: `bundle.${filename}.js`, | ||
path: path.resolve(__dirname, 'dist'), | ||
library: "Language_Tools", | ||
//libraryExport: "default", | ||
libraryTarget: "this", | ||
globalObject: "this" | ||
} | ||
} | ||
}; |