ultimate-jekyll-manager 0.0.1 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,120 @@
1
+ name: Compile and Build Site
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ push:
6
+ branches:
7
+ - master
8
+ - main
9
+ - template
10
+ schedule:
11
+ - cron: '30 1 1 * *' # every 1st of the month at 1:30 am UTC
12
+
13
+ concurrency:
14
+ group: ${{ github.ref }}
15
+ cancel-in-progress: true
16
+
17
+ env:
18
+ # GH_TOKEN: ${{ secrets.GH_TOKEN }}
19
+ BACKEND_MANAGER_KEY: ${{ secrets.BACKEND_MANAGER_KEY }}
20
+
21
+ jobs:
22
+ build:
23
+ # needs: nothing
24
+ runs-on: ubuntu-latest
25
+ timeout-minutes: 80
26
+ steps:
27
+ - name: Setup git config
28
+ run: |
29
+ git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com"
30
+ git config --global user.name "$GITHUB_ACTOR"
31
+ - name: Checkout main branch
32
+ uses: actions/checkout@v4
33
+ - name: Setup ruby
34
+ uses: ruby/setup-ruby@v1
35
+ with:
36
+ ruby-version: '3.0.0'
37
+ bundler-cache: false
38
+ - name: Install specific bundler version
39
+ run: gem install bundler -v 2.4.21
40
+ - name: Run bundle install
41
+ run: |
42
+ bundle install --path vendor/bundle
43
+ - name: Setup node
44
+ uses: actions/setup-node@v4
45
+ with:
46
+ node-version: 10
47
+ - name: Run node install
48
+ run: npm install
49
+ - name: Log dependency versions
50
+ run: |
51
+ echo "Unix Version: "
52
+ uname -a
53
+
54
+ echo "Ubuntu Version: "
55
+ lsb_release -a
56
+
57
+ echo "Ruby: $(ruby -v)"
58
+ echo "Gem: $(gem -v)"
59
+ echo "Bundler: $(bundle -v)"
60
+ echo "Node: $(node -v)"
61
+ echo "NPM: $(npm -v)"
62
+
63
+ echo "Gem Versions: "
64
+ gem list
65
+
66
+ echo "NPM Dependeny Versions: "
67
+ npm list --depth=0 || echo ""
68
+ - name: Run node build
69
+ run: npm run build -- --buildLocation='server'
70
+ - name: Create build.json
71
+ run: |
72
+ export TZ=UTC date
73
+ timestamp=$(date +%FT%TZ)
74
+ temp_build_json=$(cat @output/build/build.json)
75
+
76
+ echo account: $GITHUB_ACTOR
77
+ echo repo: $GITHUB_REPOSITORY
78
+ echo timestamp: $timestamp
79
+ echo build.json: $temp_build_json
80
+
81
+ build_log_path="@output/build/build.json"
82
+ sed "s/%GHP_TIMESTAMP%/$timestamp/g" $build_log_path > "$build_log_path"-temp && mv "$build_log_path"-temp $build_log_path
83
+
84
+ sed -n '1h;1!H;${;g;s/GEN>>>.*<<<GEN/<REDACTED FOR LIVE PUBLISH>/g;p;}' .gitignore > .gitignore
85
+ # - name: Delete gh-pages branch
86
+ # uses: dawidd6/action-delete-branch@v3
87
+ # with:
88
+ # github_token: ${{ secrets.GH_TOKEN }}
89
+ # branches: gh-pages
90
+ # soft_fail: true
91
+ # - name: Delete gh-pages branch
92
+ # continue-on-error: true
93
+ # run: |
94
+ # curl -L \
95
+ # -X DELETE \
96
+ # -H "Authorization: token ${{ secrets.GH_TOKEN }}" \
97
+ # https://api.github.com/repos/$GITHUB_REPOSITORY/git/refs/heads/gh-pages
98
+ - name: Deploy to gh-pages
99
+ uses: peaceiris/actions-gh-pages@v4
100
+ with:
101
+ github_token: ${{ secrets.GH_TOKEN }}
102
+ publish_dir: ./_site
103
+ - name: Purge CloudFlare cache
104
+ run: npm run cloudflare:purge
105
+ - name: Purge artifacts
106
+ uses: kolpav/purge-artifacts-action@v1
107
+ with:
108
+ token: ${{ secrets.GH_TOKEN }}
109
+ expire-in: 30 minutes # Set this to 0 to delete instantly
110
+ # - name: Purge artifacts
111
+ # uses: c-hive/gha-remove-artifacts@v1
112
+ # with:
113
+ # ages: '5 minutes' # '<number> <unit>', e.g. 5 days, 2 years, 90 seconds, parsed by Moment.js
114
+ # # Optional inputs
115
+ # # skip-tags: true
116
+ # # skip-recent: 5
117
+ # - name: Purge artifacts
118
+ # uses: geekyeggo/delete-artifact@v5
119
+ # with:
120
+ # name: github-pages
@@ -0,0 +1 @@
1
+ v20/*
@@ -0,0 +1,8 @@
1
+ // Workspace settings
2
+ {
3
+ // The following will hide certian files from the file explorer
4
+ "files.exclude": {
5
+ // Hide any files with /master/ in the path
6
+ "**/master/**": true,
7
+ }
8
+ }
@@ -0,0 +1,35 @@
1
+ source "https://rubygems.org"
2
+
3
+ # Hello! This is where you manage which Jekyll version is used to run.
4
+ # When you want to use a different version, change it below, save the
5
+ # file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
6
+ #
7
+ # bundle exec jekyll serve
8
+ #
9
+ # This will help ensure the proper Jekyll version is running.
10
+ # Happy Jekylling!
11
+ gem "jekyll", "= 4.3.2"
12
+
13
+ # If you have any plugins, put them here!
14
+ group :jekyll_plugins do
15
+ # Master Plugins
16
+ gem "jekyll-paginate-v2", "= 3.0.0"
17
+ gem "jekyll-liquify", "= 0.0.2" # ❌ Version 0.0.3 breaks the site
18
+ gem "jekyll-truthyfalsy", "~> 1.0"
19
+ gem "jekyll-uj-powertools", "~> 1.0"
20
+
21
+ # Project Plugins
22
+ end
23
+
24
+ # Windows does not include zoneinfo files, so bundle the tzinfo-data gem
25
+ gem "tzinfo-data", platforms: [:mingw, :mswin, :x64_mingw, :jruby]
26
+
27
+ # Performance-booster for watching directories on Windows
28
+ gem "wdm", "~> 0.1.0" if Gem.win_platform?
29
+
30
+ # Required for Apple silicon
31
+ # gem "webrick", "= 1.7.0"
32
+
33
+ # Fix x86_64 / arm64e error
34
+ # /Users/ian/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/redcarpet-3.6.0/lib/redcarpet.rb:1:in `require': dlopen(/Users/ian/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/redcarpet-3.6.0/lib/redcarpet.bundle, 0x0009): tried: '/Users/ian/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/redcarpet-3.6.0/lib/redcarpet.bundle' (mach-o file, but is an incompatible architecture (have (x86_64), need (arm64e))) - /Users/ian/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/redcarpet-3.6.0/lib/redcarpet.bundle (LoadError)
35
+ gem "redcarpet", "= 3.5.1"
@@ -0,0 +1,8 @@
1
+ // Libraries
2
+ const Manager = new (require('ultimate-jekyll-manager'));
3
+ const logger = Manager.logger('hook:postbuild');
4
+
5
+ // Hook
6
+ module.exports = async (index) => {
7
+ logger.log('Running with index =', index);
8
+ }
@@ -0,0 +1,8 @@
1
+ // Libraries
2
+ const Manager = new (require('ultimate-jekyll-manager'));
3
+ const logger = Manager.logger('hook:prebuild');
4
+
5
+ // Hook
6
+ module.exports = async (index) => {
7
+ logger.log('Running with index =', index);
8
+ }
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "ultimate-jekyll-manager",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "description": "Ultimate Jekyll dependency manager",
5
- "main": "index.js",
5
+ "main": "dist/index.js",
6
6
  "scripts": {
7
7
  "prepare": "node -e \"require('prepare-package')()\"",
8
8
  "prepare:watch": "nodemon -w ./src -e '*' --exec 'npm run prepare'"
@@ -16,8 +16,14 @@
16
16
  "output": "./dist",
17
17
  "replace": {}
18
18
  },
19
+ "projectScripts": {
20
+ "preinstall": "bundle install && bundle update",
21
+ "gulp": "gulp --cwd ./ --gulpfile ./node_modules/ultimate-jekyll-manager/dist/gulp/main.js",
22
+ "start": "bundle exec npm run gulp",
23
+ "build": "UJ_BUILD_MODE=true bundle exec npm run gulp -- build"
24
+ },
19
25
  "engines": {
20
- "node": "18"
26
+ "node": "20"
21
27
  },
22
28
  "repository": {
23
29
  "type": "git",
@@ -44,11 +50,24 @@
44
50
  "sharp": "0.23.1 (sometime before 2021ish): Hard lock because later versions had issues. Possibly solved in higher node versions"
45
51
  },
46
52
  "dependencies": {
53
+ "@babel/core": "^7.26.7",
54
+ "@babel/preset-env": "^7.26.7",
55
+ "babel-loader": "^9.2.1",
56
+ "browser-sync": "^3.0.3",
57
+ "chalk": "^4.1.2",
58
+ "fs-jetpack": "^5.1.0",
59
+ "glob": "^11.0.1",
60
+ "gulp-clean-css": "^4.3.0",
61
+ "gulp-responsive-modern": "^1.0.0",
62
+ "gulp-sass": "^6.0.0",
47
63
  "itwcw-package-analytics": "^1.0.6",
64
+ "lodash": "^4.17.21",
48
65
  "node-powertools": "^2.1.2",
49
66
  "npm-api": "^1.0.1",
50
- "semver": "^7.6.3",
67
+ "sass": "^1.83.4",
68
+ "webpack": "^5.97.1",
51
69
  "wonderful-fetch": "^1.3.0",
70
+ "wonderful-version": "^1.2.0",
52
71
  "yargs": "^17.7.2"
53
72
  },
54
73
  "peerDependencies": {