Merge pull request #1 from karldreher/build-setup-2

feat: Contribution improvements
This commit is contained in:
Caesar Kabalan 2023-05-23 03:46:25 -04:00 committed by GitHub
commit a8c235686d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 9 deletions

1
.nvmrc Normal file
View file

@ -0,0 +1 @@
v20.1.0

View file

@ -6,10 +6,10 @@ Visual Subnet Calculator is a modernized tool based on the original work by [dav
It strives to be a tool for quickly designing networks and collaborating on that design with others. It focuses on
expediting the work of network administrators, not academic subnetting math.
## Design Tenants
## Design Tenets
The following tenants are the most important values that drive the design of the tool. New features, pull requests, etc
should align to these tenants, or propose an adjustment to the tenants.
The following tenets are the most important values that drive the design of the tool. New features, pull requests, etc
should align to these tenets, or propose an adjustment to the tenets.
- **Simplicity is king.** Network admins are busy and Visual Subnet Calculator should always be easy for FIRST TIME USERS to
quickly and intuitively use.
@ -17,27 +17,30 @@ should align to these tenants, or propose an adjustment to the tenants.
complex architectures.
- **Users control the data.** We store nothing, but provide convenient ways for users to save and share their designs.
- **Embrace community contributions.** Consider and respond to all feedback and pull requests in the context of these
tenants.
tenets.
## Building From Source
If you have a more opinionated best-practice way to lay out this repository please open an issue.
Build prerequisites:
- npm
- sass
- (Optional but recommended) NVM to manage node version
- node.js (version 20) and associated NPM.
- sass (Globally installed, following instructions below.)
Compile from source:
```shell
# Clone the repository
> git clone https://github.com/ckabalan/visualsubnetcalc
# Use reccomended NVM version
> nvm use
# Change to the sources directory
> cd visualsubnetcalc/src
# Install Bootstrap
> npm install
# Compile Bootstrap
> sass --style compressed scss/custom.scss:../dist/bootstrap.min.css
# Compile Bootstrap (Also install sass command line globally)
> npm run build
```
The full application should then be available within `./dist/`, open `./dist/index.html` in a browser.

1
src/package-lock.json generated
View file

@ -4,6 +4,7 @@
"requires": true,
"packages": {
"": {
"hasInstallScript": true,
"dependencies": {
"bootstrap": "^5.2.3"
}

View file

@ -1,5 +1,9 @@
{
"dependencies": {
"bootstrap": "^5.2.3"
},
"scripts": {
"postinstall": "npm install -g sass",
"build":"sass --style compressed scss/custom.scss:../dist/bootstrap.min.css"
}
}