1
0
mirror of https://github.com/acemod/ACE3.git synced 2024-08-30 18:23:18 +00:00

Documentation - Improve and move to a modern build system, Fix search not working ()

* fix tabs in xm157

* use rollup, remove grunt, fix scss build
This commit is contained in:
Jo David 2023-10-24 11:53:42 +02:00 committed by GitHub
parent bd908bbce6
commit 697a4b75ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
65 changed files with 4083 additions and 15285 deletions

@ -28,6 +28,6 @@
</div>
</footer>
<script src="{{ site.baseurl }}/js/footer.min.js?v={{site.time | date: '%Y%m%d%H'}}"></script>
<script src="{{ site.baseurl }}/dist/bundle.min.js?v={{site.time | date: '%Y%m%d%H'}}"></script>
</body>
</html>

@ -27,7 +27,7 @@
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400;0,700;1,400;1,700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="{{ site.baseurl }}/css/app.css?v={{site.time | date: '%Y%m%d%H'}}" />
<link rel="stylesheet" href="{{ site.baseurl }}/dist/bundle.css?v={{site.time | date: '%Y%m%d%H'}}" />
</head>
<body>
<header>

File diff suppressed because one or more lines are too long

3
docs/dist/bundle.css vendored Normal file

File diff suppressed because one or more lines are too long

82
docs/dist/bundle.css.map vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2
docs/dist/bundle.min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

4
docs/src/.gitignore vendored

@ -1,4 +1,2 @@
*.DS_Store
/css/*
/bower_components/*
/node_modules/*
/node_modules/*

@ -1,94 +0,0 @@
module.exports = function (grunt) {
const sass = require("node-sass");
var footer = [
"js/vendor/jquery/jquery-3.7.1.min.js",
"js/vendor/slick/slick.js",
"js/vendor/jekyll-toc/jekyll-toc.js",
"js/core/utils.js",
"js/components/storage.js",
"js/components/contentSearch.js",
"js/app.js"
];
grunt.initConfig({
pkg: grunt.file.readJSON("package.json"),
sass: {
options: {
implementation: sass,
includePaths: ["components/foundation/scss"]
},
dist: {
options: {
outputStyle: "compressed"
},
files: {
"../css/app.css": "scss/app.scss"
}
}
},
watch: {
grunt: {files: ["Gruntfile.js"]},
sass: {
files: "scss/**/*.scss",
tasks: ["sass"]
},
js: {
files: [
"js/**/*.js"
],
tasks: ["concat", "uglify"]
},
img: {
files: [
"img/**/*"
],
tasks: ["imagemin"]
}
},
concat: {
footer: {
src: [footer],
dest: "../js/footer.dev.js"
}
},
uglify: {
"footer": {
options: {
sourceMap: "../js/footer-source-map.js",
sourceMappingURL: "footer-source-map.js",
sourceMapPrefix: 2,
sourceMapRoot: "../../dist/js/",
mangle: true,
compress: true
},
files: {
"../js/footer.min.js": [footer]
}
}
},
imagemin: {
dynamic: { // Another target
files: [{
expand: true, // Enable dynamic expansion
cwd: "img/", // Src matches are relative to this path
src: ["**/*.{png,jpg,gif}"], // Actual patterns to match
dest: "../img/" // Destination path prefix
}]
}
}
});
grunt.loadNpmTasks("grunt-sass");
grunt.loadNpmTasks("grunt-contrib-watch");
grunt.loadNpmTasks("grunt-contrib-concat");
grunt.loadNpmTasks("grunt-contrib-uglify");
grunt.loadNpmTasks("grunt-contrib-imagemin");
grunt.registerTask("build", ["sass", "concat", "uglify:footer"]);
grunt.registerTask("default", ["build", "watch"]);
};

Binary file not shown.

Before

(image error) Size: 269 B

Binary file not shown.

Before

(image error) Size: 462 B

Binary file not shown.

Before

(image error) Size: 350 B

@ -1,3 +1,5 @@
///@ts-check
// https://github.com/ghiculescu/jekyll-table-of-contents
(function ($) {
$.fn.toc = function (options) {
@ -74,13 +76,13 @@
if (this_level === level) // same level as before; same indenting
html += "<li><a href=\"#" + fixedEncodeURIComponent(header.id) + "\">" + header.innerHTML + "</a>";
else if (this_level <= level) { // higher level than before; end parent ol
for (i = this_level; i < level; i++) {
for (let i = this_level; i < level; i++) {
html += "</li></" + settings.listType + ">"
}
html += "<li><a href=\"#" + fixedEncodeURIComponent(header.id) + "\">" + header.innerHTML + "</a>";
}
else if (this_level > level) { // lower level than before; expand the previous to contain a ol
for (i = this_level; i > level; i--) {
for (let i = this_level; i > level; i--) {
html += "<" + settings.listType + "><li>"
}
html += "<a href=\"#" + fixedEncodeURIComponent(header.id) + "\">" + header.innerHTML + "</a>";

9
docs/src/main.js Normal file

@ -0,0 +1,9 @@
import "./js/vendor/jquery/jquery-3.7.1.min"
import "./js/vendor/slick/slick"
import "./js/vendor/jekyll-toc/jekyll-toc"
import "./js/core/utils"
import "./js/components/storage.js"
import "./js/components/contentSearch.js"
import "./js/app.js"
import "./scss/app.scss"

12358
docs/src/package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -2,19 +2,12 @@
"name": "ace3",
"version": "0.1.0",
"scripts": {
"dev": "grunt",
"build": "grunt build"
},
"dependencies": {
"lodash": "^4.17.21"
"build": "rollup --config"
},
"devDependencies": {
"grunt": "^1.6.1",
"grunt-contrib-concat": "^2.1.0",
"grunt-contrib-imagemin": "^4.0.0",
"grunt-contrib-uglify": "^5.2.2",
"grunt-contrib-watch": "^1.1.0",
"grunt-sass": "^3.1.0",
"node-sass": "^9.0.0"
"@rollup/plugin-terser": "^0.4.4",
"node-sass": "^9.0.0",
"rollup": "^4.1.4",
"rollup-plugin-scss": "^4.0.0"
}
}

@ -0,0 +1,24 @@
import terser from "@rollup/plugin-terser";
import scss from "rollup-plugin-scss";
export default {
input: "./main.js",
output: [
{
file: "../dist/bundle.js",
},
{
file: "../dist/bundle.min.js",
format: "iife",
name: "version",
plugins: [terser()],
},
],
plugins: [
scss({
fileName: "bundle.css",
sourceMap: true,
outputStyle: "compressed",
}),
],
};

@ -57,7 +57,7 @@ $ace-primary-color: #ba2619;
// $rem-base: 16px;
// Allows the use of rem-calc() or lower-bound() in your settings
@import "foundation/functions";
@import "./vendor/foundation/settings";
// The default font-size is set to 100% of the browser style sheet (usually 16px)
// for compatibility with browser-based text zoom or user-set defaults.

@ -4,41 +4,41 @@
//@import "foundation";
// Or selectively include components
//@import "foundation/components/accordion";
//@import "./vendor/foundation/components/accordion";
// "foundation/components/alert-boxes",
@import "foundation/components/block-grid";
@import "./vendor/foundation/components/block-grid";
// "foundation/components/breadcrumbs",
// "foundation/components/button-groups",
@import "foundation/components/buttons";
@import "foundation/components/clearing";
@import "./vendor/foundation/components/buttons";
@import "./vendor/foundation/components/clearing";
// "foundation/components/dropdown",
// "foundation/components/dropdown-buttons",
// "foundation/components/flex-video",
@import "foundation/components/forms";
@import "foundation/components/grid";
@import "foundation/components/inline-lists";
@import "./vendor/foundation/components/forms";
@import "./vendor/foundation/components/grid";
@import "./vendor/foundation/components/inline-lists";
// "foundation/components/joyride",
// "foundation/components/keystrokes",
// "foundation/components/labels",
// "foundation/components/magellan",
// "foundation/components/orbit",
// "foundation/components/pagination",
@import "foundation/components/panels";
@import "./vendor/foundation/components/panels";
// "foundation/components/pricing-tables",
// "foundation/components/progress-bars",
// "foundation/components/reveal",
@import "foundation/components/side-nav";
@import "./vendor/foundation/components/side-nav";
// "foundation/components/split-buttons",
// "foundation/components/sub-nav",
// "foundation/components/switches",
@import "foundation/components/tables";
@import "./vendor/foundation/components/tables";
// "foundation/components/tabs",
@import "foundation/components/thumbs";
@import "./vendor/foundation/components/thumbs";
// "foundation/components/tooltips",
@import "foundation/components/top-bar";
@import "foundation/components/type";
@import "./vendor/foundation/components/top-bar";
@import "./vendor/foundation/components/type";
// "foundation/components/offcanvas",
@import "foundation/components/visibility";
@import "./vendor/foundation/components/visibility";
@import "vendor/slick";

@ -55,7 +55,7 @@
// $rem-base: 16px;
// Allows the use of rem-calc() or lower-bound() in your settings
@import "foundation/functions";
@import "./functions";
// The default font-size is set to 100% of the browser style sheet (usually 16px)
// for compatibility with browser-based text zoom or user-set defaults.
@ -927,7 +927,7 @@ $include-html-global-classes: $include-html-classes;
// Hide controls on small
// $orbit-nav-hide-for-small: true;
// $orbit-bullet-hide-for-small: true;
// $orbit-timer-hide-for-small: true;
// $orbit-timer-hide-for-small: true;
// 20. Pagination
// - - - - - - - - - - - - - - - - - - - - - - - - -
@ -1265,7 +1265,7 @@ $include-html-global-classes: $include-html-classes;
// $switch-paddle-bg: $white;
// $switch-paddle-transition-speed: .15s;
// $switch-paddle-transition-ease: ease-out;
// $switch-active-color: $primary-color;
// $switch-active-color: $primary-color;
// 30. Tables
// - - - - - - - - - - - - - - - - - - - - - - - - -
@ -1456,7 +1456,7 @@ $include-html-global-classes: $include-html-classes;
// Sticky Class
// $topbar-sticky-class: ".sticky";
// $topbar-arrows: true; //Set false to remove the triangle icon from the menu item
// $topbar-dropdown-arrows: true; //Set false to remove the \00bb >> text from dropdown subnavigation li//
// $topbar-dropdown-arrows: true; //Set false to remove the \00bb >> text from dropdown subnavigation li//
// 36. Visibility Classes
// - - - - - - - - - - - - - - - - - - - - - - - - -

@ -31,7 +31,7 @@ class CfgWeapons {
class ItemInfo: InventoryOpticsItem_Base_F {
modelOptics = "\x\cba\addons\optics\cba_optic_big_100.p3d";
class OpticsModes {
class optic {
class optic {
opticsID=1;
useModelOptics=1;
opticsPPEffects[]={ "OpticsCHAbera1", "OpticsBlur1" };