-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(gcc): use goog.defines that are assigned to a value
- Loading branch information
Kevin Schmidt
committed
Jan 28, 2020
1 parent
7c13187
commit a9a9638
Showing
8 changed files
with
50 additions
and
3 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
1 change: 1 addition & 0 deletions
1
test/plugins/gcc/defines/should-use-assigned-define/expected.json
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 @@ | ||
["foo.ROOT='test'"] |
6 changes: 6 additions & 0 deletions
6
test/plugins/gcc/defines/should-use-assigned-define/foo/bar.js
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,6 @@ | ||
goog.provide('foo'); | ||
|
||
/** | ||
* @define {string} | ||
*/ | ||
foo.ROOT = goog.define('foo.ROOT', ''); |
13 changes: 13 additions & 0 deletions
13
test/plugins/gcc/defines/should-use-assigned-define/package.json
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,13 @@ | ||
{ | ||
"name": "should-use-explicitly-defined-src-directory", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "index.js", | ||
"keywords": [], | ||
"build": { | ||
"type": "app" | ||
}, | ||
"directories": { | ||
"src": "foo" | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
test/plugins/gcc/defines/should-use-assigned-module-define/expected.json
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 @@ | ||
["foo.ROOT='test'"] |
8 changes: 8 additions & 0 deletions
8
test/plugins/gcc/defines/should-use-assigned-module-define/foo/bar.js
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 @@ | ||
goog.module('foo'); | ||
|
||
/** | ||
* @define {string} | ||
*/ | ||
const ROOT = goog.define('foo.ROOT', ''); | ||
|
||
exports = {ROOT}; |
13 changes: 13 additions & 0 deletions
13
test/plugins/gcc/defines/should-use-assigned-module-define/package.json
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,13 @@ | ||
{ | ||
"name": "should-use-explicitly-defined-src-directory", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "index.js", | ||
"keywords": [], | ||
"build": { | ||
"type": "app" | ||
}, | ||
"directories": { | ||
"src": "foo" | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
test/plugins/gcc/defines/should-use-explicitly-defined-src-directory/foo/bar.js
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 +1,6 @@ | ||
goog.provide('foo'); | ||
|
||
/** | ||
* @define {string} | ||
*/ | ||
goog.define('foo.ROOT', ''); |