Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3453 from jugglinmike/docs-from-website
[[CHORE]] Verify integration with jshint.com
- Loading branch information
Showing
5 changed files
with
54 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/** | ||
* The jshint.com project website generates some content based on the state of | ||
* this repository. Changes in this repository could therefore interfere with | ||
* the website. This script verifies that when the website is configured to use | ||
* the current codebase, it builds successfully and passes its own test suite. | ||
*/ | ||
"use strict"; | ||
|
||
var execSync = require("child_process").execSync; | ||
var path = require("path"); | ||
var fs = require("fs"); | ||
|
||
var repository = "https://github.com/jshint/jshint.github.io.git"; | ||
var websiteDir = path.join(__dirname, "jshint.com"); | ||
var linkName = path.join(websiteDir, "res", "jshint"); | ||
|
||
function execInSite(command) { | ||
execSync(command, { stdio: "inherit", cwd: websiteDir }); | ||
} | ||
|
||
fs.mkdirSync(websiteDir, {recursive: true}); | ||
|
||
execInSite("git init"); | ||
execInSite("git pull " + repository + " dev"); | ||
execInSite("git rm -rf --ignore-unmatch res/jshint"); | ||
|
||
try { | ||
fs.unlinkSync(linkName); | ||
} catch (error) {} | ||
|
||
fs.symlinkSync(path.join(__dirname, ".."), linkName); | ||
|
||
execInSite("npm install"); | ||
execInSite("npm test"); |