Skip to content

Commit

Permalink
Prepare for release
Browse files Browse the repository at this point in the history
*Update npmignore
 *Enable warnings for consistent-return
 *add prepare script
 *Add a pre-push hook to run jest
 *Improve readibility on various screen resolutions
 *add an else statement
 *Update .npmignore
 *update version code
 *Add more details to
 *fix typo
  • Loading branch information
SerpentBytes committed Dec 4, 2022
1 parent 8ccd64d commit 6a82c2f
Show file tree
Hide file tree
Showing 7 changed files with 165 additions and 37 deletions.
1 change: 1 addition & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"no-var": "error",
"prefer-arrow-callback": "warn",
"require-await": "warn",
"consistent-return": "warn",
"no-trailing-spaces": [
"error",
{ "skipBlankLines": true, "ignoreComments": true }
Expand Down
4 changes: 4 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm test
132 changes: 132 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
# Rules from: .gitignore
node_modules
dist
logs
*.logx
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

tests
CONTRIBUTING.md

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp
.cache

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
20 changes: 6 additions & 14 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ Thank you for showing interest in contributing to Siteit.
- [Code Contribution](#code-contribution)
- [Reporting Bugs](#reporting-bugs)
- [Suggesting Enhancements](#suggesting-enhancements)
- [Improving the Documentation](#improving-the-documentation)
- [Styleguides](#styleguides)
- [Commit Messages](#commit-messages)


---

Expand All @@ -21,7 +19,7 @@ This section is to help developers set up Siteit locally on their machines for d

#### Getting Started

#### Pre-requisites
##### Pre-requisites

Make sure you have the following technologies installed on your machine:
- [Node](https://nodejs.org/en/download/)current LTS version.
Expand Down Expand Up @@ -92,20 +90,14 @@ npm run lint:fix
If you push changes without running checks for formatting and problems in code, the `husky` `pre-commit` `hook` will automatically apply the changes before pushing your changes remotely to GitHub.

#### Running Tests
Siteit currently supports initial testing for functionality using `jest`
Siteit currently supports initial testing for functionality using the Jest framework.

To run tests using `jest`, execute the following `script`:
To run tests using `jest`, execute the following `script`:
```bash
npm test
```

### Reporting Bugs
_WIP_
To report a bug file [create a new issue](https://github.com/SerpentBytes/siteit/issues/new). Please go through [open issues](https://github.com/SerpentBytes/siteit/issues?q=is%3Aopen+is%3Aissue) to see if the bug still needs to be reported.
### Suggesting Enhancements
_WIP_
### Improving the Documentation
_WIP_
### Styleguides
_WIP_
### Commit Messages
_WIP_
To suggest an enhancement [create a new issue](https://github.com/SerpentBytes/siteit/issues/new). Make sure to include why the enhancement you suggest could improve the codebase.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "siteit",
"version": "1.0.0",
"version": "0.9.0",
"description": "CLI tool that converts user entered data via terminal into static website",
"main": "./build/index.js",
"type": "module",
Expand All @@ -15,7 +15,8 @@
"pre-commit": "npx lint-staged && pretty-quick --staged",
"build": "babel ./src -d build",
"start": "npm run ./build && node ./build/index.js -v",
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js"
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
"prepare": "husky install"
},
"keywords": [
"SSG"
Expand Down
3 changes: 2 additions & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ const main = (args) => {
dispatch('-i', validValues);
} else if (validValues[0] === '-c' || validValues[0] === '--config') {
dispatch('-c', validValues);
} else {
return handleImproperUsage();
}
return handleImproperUsage();
};

export default main;
37 changes: 17 additions & 20 deletions src/siteit.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ html {
}

body {
margin: 5rem 5rem;
background: #2b4570;
}
h1 {
text-align: center;
}

h1,
p,
Expand All @@ -17,6 +19,9 @@ a {
p,
a {
font-size: 1.2rem;
max-width: 75%;
margin-left: auto;
margin-right: auto;
}

h1 {
Expand All @@ -31,42 +36,34 @@ ul {
@media only screen and (max-width: 600px) {
p,
a {
font-size: 1.5rem;
font-size: 1rem;
max-width: 95%;
margin-left: auto;
margin-right: auto;
}

h1 {
font-size: 4rem;
font-size: 1.5rem;
}
body {
margin: 2rem 2rem;
background: #2b4570;
}
}
/* Small devices */
@media only screen and (min-width: 600px) {
@media only screen and (max-width: 600px) {
p,
a {
font-size: 1.4rem;
font-size: 1rem;
max-width: 95%;
margin-left: auto;
margin-right: auto;
}

h1 {
font-size: 3.5rem;
font-size: 1.5rem;
}

body {
margin: 2.5rem 2.5rem;
background: #2b4570;
}
}

/* Large devices */
@media only screen and (min-width: 992px) {
p,
a {
font-size: 1.2rem;
}

h1 {
font-size: 3rem;
}
}

0 comments on commit 6a82c2f

Please sign in to comment.