-
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.
feat: add distributed package and example
- Loading branch information
1 parent
01308b6
commit 58ce264
Showing
6 changed files
with
45 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
.vscode/ | ||
coverage/ | ||
dist/ | ||
build/ | ||
node_modules/ |
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,38 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Textual String Manipulation Demo</title> | ||
</head> | ||
<body> | ||
<h1>Textual String Manipulation Demo</h1> | ||
<p>Try the given button to count the words and characters for the given input.</p> | ||
|
||
<textarea name="textStr" id="textStr" cols="30" rows="10"></textarea> | ||
<br> | ||
<span id="info-message"></span> | ||
<div> | ||
<button type="button" id="btn-count">Words Count</button> | ||
</div> | ||
|
||
<!-- Load jQuery --> | ||
<script src="../node_modules/jquery/dist/jquery.min.js"></script> | ||
<script src="./textual.min.js"></script> | ||
|
||
<script> | ||
$(function () { | ||
$('#btn-count').on('click', function () { | ||
var strText = $('textarea[name=textStr]').val(); | ||
|
||
$('#info-message').html( | ||
'The word count is : ' + strText.wordCount() + | ||
' and the character count is : ' + strText.charCount() | ||
) | ||
|
||
}) | ||
}); | ||
</script> | ||
</body> | ||
</html> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,13 +7,13 @@ | |
"url": "https://github.com/sachinkiranti/textual.git" | ||
}, | ||
"scripts": { | ||
"clean": "rimraf dist && rimraf coverage", | ||
"clean": "rimraf build && rimraf coverage", | ||
"build": "npm run compile && npm run copy:html && npm run bundle && npm run minify", | ||
"compile": "tsc", | ||
"copy:html": "cpx src/**.html dist", | ||
"test": "karma start", | ||
"bundle": "rollup -c", | ||
"minify": "uglifyjs dist/textual-bundle.js --output dist/textual.min.js --source-map \"filename='dist/textual.min.js.map',url='textual.min.js.map',content='dist/textual.js.map'\"" | ||
"minify": "uglifyjs build/textual-bundle.js --output dist/textual.min.js" | ||
}, | ||
"keywords": [], | ||
"author": "Sachin Kiranti <[email protected]>", | ||
|
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