Skip to content
This repository has been archived by the owner on Aug 1, 2021. It is now read-only.

Commit

Permalink
#22 improve doc
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonLi8 committed Jan 18, 2020
1 parent 7522788 commit 1b759fc
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions src/UserConfig.js
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]>
*/
Expand All @@ -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


}

Expand Down

0 comments on commit 1b759fc

Please sign in to comment.