This repository has been archived by the owner on Aug 1, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7522788
commit 1b759fc
Showing
1 changed file
with
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
// Copyright © 2019-2020 Brandon Li. All rights reserved. | ||
|
||
/** | ||
* Utility class for referencing, validating, and parsing user-specific configuration options. This class isn't directly | ||
* used by any of the Grunt commands in grunt-config/Gruntfile. | ||
* Utility for referencing, validating, and parsing user-specific configuration options. | ||
* | ||
* User-specific configuration options are generalized values that the user of grunt-config configures. For instance, | ||
* each package.json of every user will be slightly different. Each key of package.json is a user-specific option. | ||
* User-specific configuration options are generalized values that depend on the user and environment. For instance, | ||
* each package.json of every user will be slightly different. Each key of package.json is a user-specific option and | ||
* determines Generator values. | ||
* | ||
* Contains methods for validating user configuration value(s). These are placed into methods so that they are only | ||
* validated on the command that needs the value(s). | ||
* | ||
* @author Brandon Li <[email protected]> | ||
*/ | ||
|
@@ -14,9 +17,15 @@ module.exports = ( () => { | |
'use strict'; | ||
|
||
// modules | ||
const grunt = require( 'grunt' ); | ||
const Util = require( './Util' ); | ||
|
||
class Config { | ||
const Config = { | ||
|
||
PACKAGE_JSON: grunt.file.isFile( 'package.json' ) ? grunt.file.readJSON( 'package.json' ) : undefined, | ||
BUILD_RC: grunt.file.isFile( 'package.json' ) ? grunt.file.readJSON( 'package.json' ) : undefined, | ||
GITHUB_ACCESS_TOKEN: process.env.GITHUB_ACCESS_TOKEN | ||
|
||
|
||
} | ||
|
||
|