-
Notifications
You must be signed in to change notification settings - Fork 247
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added new main entry file for Node. This package is not meant to be u…
…sed as a node module but will now present a more meaningful error. If the project has been built then it will require the build file. This resolves #208
- Loading branch information
Showing
3 changed files
with
18 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
var fs = require('fs'); | ||
var scriptPath = __dirname+'/build/HTMLCS.js'; | ||
|
||
if (fs.existsSync(scriptPath) === true) { | ||
module.exports = require(scriptPath); | ||
} else { | ||
throw new Error('HTMLCS must be built using `grunt build` before it can be required in Nodejs.'); | ||
} |
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