mirror of
https://github.com/jakejarvis/hugo-extended.git
synced 2025-04-28 03:20:30 -04:00
yarn ➡️ pnpm
This commit is contained in:
parent
5d6d26d967
commit
1ce5f5bc80
8
.github/workflows/publish.yml
vendored
8
.github/workflows/publish.yml
vendored
@ -15,7 +15,11 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 20
|
||||||
registry-url: https://registry.npmjs.org/
|
registry-url: https://registry.npmjs.org/
|
||||||
- run: yarn install --frozen-lockfile
|
- uses: pnpm/action-setup@v4
|
||||||
- run: yarn publish
|
with:
|
||||||
|
version: 8
|
||||||
|
run_install: false
|
||||||
|
- run: pnpm install --frozen-lockfile
|
||||||
|
- run: pnpm publish --no-git-checks
|
||||||
env:
|
env:
|
||||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
|
21
.github/workflows/test.yml
vendored
21
.github/workflows/test.yml
vendored
@ -19,7 +19,6 @@ jobs:
|
|||||||
- 20
|
- 20
|
||||||
- 18
|
- 18
|
||||||
- 16
|
- 16
|
||||||
- 14
|
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
name: Node ${{ matrix.node }} on ${{ matrix.os }}
|
name: Node ${{ matrix.node }} on ${{ matrix.os }}
|
||||||
@ -28,19 +27,17 @@ jobs:
|
|||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node }}
|
node-version: ${{ matrix.node }}
|
||||||
- run: yarn install --frozen-lockfile
|
- uses: pnpm/action-setup@v4
|
||||||
|
with:
|
||||||
|
version: 8
|
||||||
|
run_install: false
|
||||||
|
- run: pnpm install --frozen-lockfile
|
||||||
env:
|
env:
|
||||||
DEBUG: careful-downloader
|
DEBUG: careful-downloader
|
||||||
DEBUG_HIDE_DATE: 1
|
DEBUG_HIDE_DATE: 1
|
||||||
DEBUG_COLORS: 0
|
DEBUG_COLORS: 0
|
||||||
- run: yarn audit
|
- run: pnpm audit --prod
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
- run: yarn test
|
- run: pnpm run test
|
||||||
- name: Checkout gohugoio/hugoDocs
|
- run: node lib/cli.js new site mysite
|
||||||
uses: actions/checkout@v4
|
- run: node lib/cli.js --source mysite/ --minify --enableGitInfo --logLevel info
|
||||||
with:
|
|
||||||
repository: gohugoio/hugoDocs
|
|
||||||
path: docs/
|
|
||||||
fetch-depth: 1
|
|
||||||
- name: Build docs
|
|
||||||
run: node lib/cli.js --source docs/ --minify --enableGitInfo --logLevel info
|
|
||||||
|
@ -23,14 +23,12 @@ async function install() {
|
|||||||
const binFile = getBinFilename();
|
const binFile = getBinFilename();
|
||||||
|
|
||||||
// stop here if there's nothing we can download
|
// stop here if there's nothing we can download
|
||||||
if (!releaseFile) {
|
if (!releaseFile)
|
||||||
throw new Error(`Are you sure this platform is supported? See: https://github.com/gohugoio/hugo/releases/tag/v${version}`);
|
throw new Error(`Are you sure this platform is supported? See: https://github.com/gohugoio/hugo/releases/tag/v${version}`);
|
||||||
}
|
|
||||||
|
|
||||||
// warn if platform doesn't support Hugo Extended, proceed with vanilla Hugo
|
// warn if platform doesn't support Hugo Extended, proceed with vanilla Hugo
|
||||||
if (!isExtended(releaseFile)) {
|
if (!isExtended(releaseFile))
|
||||||
console.warn(`${logSymbols.info} Hugo Extended isn't supported on this platform, downloading vanilla Hugo instead.`);
|
console.warn(`${logSymbols.info} Hugo Extended isn't supported on this platform, downloading vanilla Hugo instead.`);
|
||||||
}
|
|
||||||
|
|
||||||
// download release from GitHub and verify its checksum
|
// download release from GitHub and verify its checksum
|
||||||
const download = await downloader(getReleaseUrl(version, releaseFile), {
|
const download = await downloader(getReleaseUrl(version, releaseFile), {
|
||||||
|
@ -44,14 +44,12 @@ export function getBinVersion(bin) {
|
|||||||
// Simply detect if the given file exists.
|
// Simply detect if the given file exists.
|
||||||
export function doesBinExist(bin) {
|
export function doesBinExist(bin) {
|
||||||
try {
|
try {
|
||||||
if (fs.existsSync(bin)) {
|
if (fs.existsSync(bin))
|
||||||
return true;
|
return true;
|
||||||
}
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// something bad happened besides Hugo not existing
|
// something bad happened besides Hugo not existing
|
||||||
if (error.code !== "ENOENT") {
|
if (error.code !== "ENOENT")
|
||||||
throw error;
|
throw error;
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
"test": "eslint . && mocha"
|
"test": "eslint . && mocha"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=14.14"
|
"node": ">=16.14"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"hugo",
|
"hugo",
|
||||||
|
2705
pnpm-lock.yaml
generated
Normal file
2705
pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -12,9 +12,9 @@ it("Hugo exists and runs?", async function () {
|
|||||||
const hugoPath = await hugo();
|
const hugoPath = await hugo();
|
||||||
|
|
||||||
assert(execFile(hugoPath, ["env"], function (error, stdout) {
|
assert(execFile(hugoPath, ["env"], function (error, stdout) {
|
||||||
if (error) {
|
if (error)
|
||||||
throw error;
|
throw error;
|
||||||
}
|
|
||||||
console.log(stdout);
|
console.log(stdout);
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
@ -28,9 +28,9 @@ it("Hugo doesn't exist, install it instead of throwing an error", async function
|
|||||||
const hugoPath = await hugo();
|
const hugoPath = await hugo();
|
||||||
|
|
||||||
assert(execFile(hugoPath, ["version"], function (error, stdout) {
|
assert(execFile(hugoPath, ["version"], function (error, stdout) {
|
||||||
if (error) {
|
if (error)
|
||||||
throw error;
|
throw error;
|
||||||
}
|
|
||||||
console.log(stdout);
|
console.log(stdout);
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user