mirror of
https://git.ari.lt/ari.lt/ari.lt.git
synced 2025-02-04 09:39:25 +01:00
Added JS minification, updated npm packages, add TODO items
Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
This commit is contained in:
parent
8553b253a5
commit
6bcb6abe2f
7 changed files with 1681 additions and 864 deletions
19
.clang-format
Normal file
19
.clang-format
Normal file
|
@ -0,0 +1,19 @@
|
|||
---
|
||||
BasedOnStyle: LLVM
|
||||
IndentWidth: 4
|
||||
SortIncludes: false
|
||||
AlignConsecutiveAssignments: true
|
||||
AlignConsecutiveBitFields: true
|
||||
AlignConsecutiveMacros: true
|
||||
AlignEscapedNewlines: true
|
||||
AllowShortCaseLabelsOnASingleLine: true
|
||||
AllowShortEnumsOnASingleLine: true
|
||||
AllowShortFunctionsOnASingleLine: true
|
||||
AllowShortLambdasOnASingleLine: true
|
||||
BinPackParameters: false
|
||||
IndentCaseBlocks: true
|
||||
IndentCaseLabels: true
|
||||
IndentExternBlock: true
|
||||
IndentGotoLabels: true
|
||||
---
|
||||
|
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,5 +1,5 @@
|
|||
_*.css
|
||||
node_modules/
|
||||
*.min.css
|
||||
*.min.*
|
||||
/api/apis.json
|
||||
/api_hash
|
||||
|
|
2
TODO.md
2
TODO.md
|
@ -3,3 +3,5 @@
|
|||
- [ ] Store files in IndexedDB
|
||||
- [x] Export/Import
|
||||
- [ ] Python code runner
|
||||
- [ ] Minimal UI framework
|
||||
- [ ] Convert some of the pages to use that framework
|
||||
|
|
2498
package-lock.json
generated
2498
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -30,6 +30,7 @@
|
|||
"autoprefixer-cli": "^1.0.0",
|
||||
"eslint": "^8.14.0",
|
||||
"live-server": "^1.2.2",
|
||||
"node-sass": "^7.0.1"
|
||||
"node-sass": "^7.0.1",
|
||||
"uglifyjs": "^2.4.11"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
set -e
|
||||
|
||||
S='./scripts'
|
||||
SCRIPTS=(sass apis)
|
||||
SCRIPTS=(sass minjs apis)
|
||||
|
||||
main() {
|
||||
for script in "${SCRIPTS[@]}"; do
|
||||
|
|
19
scripts/minjs.sh
Executable file
19
scripts/minjs.sh
Executable file
|
@ -0,0 +1,19 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
set -e
|
||||
|
||||
main() {
|
||||
if [ "$CI" ]; then
|
||||
echo 'Minifying all JavaScript'
|
||||
|
||||
find content/js/ -type f \
|
||||
-name "*.js" ! -name "*.min.*" ! -name "vfs_fonts*" \
|
||||
-exec uglifyjs -o {}.min {} \; \
|
||||
-exec rm {} \; \
|
||||
-exec mv {}.min {} \;
|
||||
else
|
||||
echo 'Not in CI mode, skipping JS minification'
|
||||
fi
|
||||
}
|
||||
|
||||
main "$@"
|
Loading…
Add table
Reference in a new issue