Skip to content

Commit

Permalink
improve readme output
Browse files Browse the repository at this point in the history
  • Loading branch information
ArthurBeaulieu committed Aug 25, 2021
1 parent cd95176 commit fcf6d18
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
6 changes: 6 additions & 0 deletions demo/example.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta content="ie=edge" http-equiv="x-ua-compatible">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
<meta content="initial-scale=1" name="viewport">
<meta name="description" content="DESCRIPTION">
<title>COMPONENT – VERSION</title>
<link rel="icon" href="https://raw.githubusercontent.com/ArthurBeaulieu/ArthurBeaulieu/master/assets/img/ab-logo.png" type="image/png" sizes="32x32">
<link rel="stylesheet" type="text/css" href="demo.css">
<link rel="stylesheet" type="text/css" href="../dist/COMPONENT.bundle.css">
</head>
Expand Down
21 changes: 21 additions & 0 deletions init.bat
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ echo.
echo Fill configuration files with the information you provided
echo -^> Replacing in demo/example.html
call :replaceInFile demo\example.html COMPONENT %component%
call :replaceInFile demo\example.html DESCRIPTION %description%
call :replaceInFile demo\example.html VERSION %version%
echo -^> Replacing in doc/jsDoc.json
call :replaceInFile doc/jsDoc.json COMPONENT %component%
Expand Down Expand Up @@ -126,6 +127,26 @@ echo OFF
echo ![Test]^(https://badgen.net/badge/test/TODO/orange^)
echo.
echo %description%
echo.
echo [See it live](https://%username%.github.io/%component%/demo/example.html) or [Read the documentation](https://%username%.github.io/%component%/doc/index.html)
echo.
echo # Usage
echo.
echo If you need more information on those components methods and internals, you can read the online [documentation](https://%username%.github.io/%component%/doc/).
echo.
echo # Development
echo.
echo If you clone this repository, you can `npm install` to install development dependencies. This will allow you to build dist file, run the component tests or generate the documentation ;
echo.
echo - `npm run build` to generate the minified file ;
echo - `npm run watch` to watch for any change in source code ;
echo - `npm run server` to launch a local development server ;
echo - `npm run test` to perform tests ;
echo - `npm run test-dev` to debug tests ;
echo - `npm run doc` to generate documentation ;
echo - `npm run beforecommit` to perform tests, generate doc and bundle the source files.
echo.
echo To avoid CORS when locally loading the example HTML file, run the web server. Please do not use it on a production environment. Unit tests are performed on both Firefox and Chrome ; ensure you have both installed before running tests, otherwise they might fail.
echo.
echo %component% %version% - %license% - %username%
)>%CD%\README.md
Expand Down
21 changes: 21 additions & 0 deletions init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ echo
echo -e "Fill configuration files with the information you provided"
echo -e " -> Replacing in demo/example.html"
sed -i "s/COMPONENT/$component/" demo/example.html
sed -i "s/DESCRIPTION/$description/" demo/example.html
sed -i "s/VERSION/$version/" demo/example.html
echo -e " -> Replacing in doc/jsDoc.json"
sed -i "s/COMPONENT/$component/" doc/jsDoc.json
Expand Down Expand Up @@ -100,6 +101,26 @@ echo "# $component
$description
[See it live](https://$username.github.io/$component/demo/example.html) or [Read the documentation](https://$username.github.io/$component/doc/index.html)
# Usage
If you need more information on those components methods and internals, you can read the online [documentation](https://$username.github.io/$component/doc/).
# Development
If you clone this repository, you can `npm install` to install development dependencies. This will allow you to build dist file, run the component tests or generate the documentation ;
- `npm run build` to generate the minified file ;
- `npm run watch` to watch for any change in source code ;
- `npm run server` to launch a local development server ;
- `npm run test` to perform tests ;
- `npm run test-dev` to debug tests ;
- `npm run doc` to generate documentation ;
- `npm run beforecommit` to perform tests, generate doc and bundle the source files.
To avoid CORS when locally loading the example HTML file, run the web server. Please do not use it on a production environment. Unit tests are performed on both Firefox and Chrome ; ensure you have both installed before running tests, otherwise they might fail.
$component $version - $license - $username" >> README.md
echo -e "README.md file now reflect the new project"

Expand Down

0 comments on commit fcf6d18

Please sign in to comment.