-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: looker resources index #931
Merged
Merged
Changes from 4 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
a79b86f
feat: Add resources index
fabio-looker 5a8e802
Merge branch 'main' into fabble/looker-resources-index
fabio-looker 2794c4b
Mark as private in package.json, and refer to yarn instead of npm
fabio-looker 349f056
Add yarn.lock, clean up dangling reference to npm, specify Node versi…
fabio-looker 6200283
Merge branch 'main' into fabble/looker-resources-index
jkaster f23ec32
Update readme wording
fabio-looker f64a6c4
Merge branch 'fabble/looker-resources-index' of github.com:looker-ope…
fabio-looker File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules | ||
tmp |
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,18 @@ | ||
# Looker Resources Index | ||
|
||
This folder contains data (in code) about Looker-related resources and scripts to maintain and repackage that data for publication. | ||
|
||
The main location that the data is maintained is in `src/resource-data/resources.ts` | ||
|
||
The main output of these scripts is a JSON file in `../../docs/resources` intended to be checked in to git and consumed via CDN. (However, you could conceivably also consume the typescript exports from this folder) | ||
|
||
* Before use, install dependencies with `yarn install` | ||
* To run tests & reports about the resources data, `yarn run analyze` | ||
* To build the distributable JSON file, run `yarn run build` | ||
|
||
## Sample Use Cases | ||
|
||
- Create a "resource explorer" UI (for developer portal or hackathons) | ||
- Generate a "home"/"index" page for the developer portal | ||
- Generate an "Overview" page for each platform feature page (e.g. Actions, API, etc.) | ||
- Find and embed "related resources" into specific articles and content |
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,21 @@ | ||
{ | ||
"name": "looker-resources-index", | ||
"description": "A listing of Looker-related resources, and some automation for publishing the listing in consumable formats", | ||
"main": "src/resource-data/resources.ts", | ||
fabio-looker marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"private": true, | ||
"engines": { | ||
"node": ">=12.0.0" | ||
}, | ||
"scripts": { | ||
"start": "echo \"No 'start' command available. Did you want to 'build'?\"", | ||
"build": "node_modules/.bin/tsc --project . && node tmp/compiled-typescript/scripts/build.js", | ||
"analyze": "node_modules/.bin/tsc --project . && node tmp/compiled-typescript/scripts/analyze/cli.js", | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"author": "Looker", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"@types/node": "^16.11.13", | ||
"typescript": "^4.5.4" | ||
} | ||
} |
42 changes: 42 additions & 0 deletions
42
bin/looker-resources-index/src/resource-data/definitions.ts
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,42 @@ | ||
/* | ||
|
||
MIT License | ||
|
||
Copyright (c) 2021 Looker Data Sciences, Inc. | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
|
||
*/ | ||
import type { LocaleString } from '../types' | ||
import { ContentType } from '../types' | ||
|
||
export const contentType: Record<string, LocaleString> = { | ||
[ContentType.demo]: | ||
'Demo content demonstrates a use case and/or business value without the need for coding, configuration, or installation.', | ||
[ContentType.sandbox]: | ||
'Sandbox content allows interactive testing, coding, and simulation, without the need for setup or installation.', | ||
[ContentType.sampleCode]: | ||
'Sample code refers to illustrative code, usually simplified, that is representative of code that would be written by an application or service that integrates with one of our platform features.', | ||
[ContentType.sourceCode]: | ||
'Source code refers to the underlying code that defines our integrations. It is available for our open-source platform features, such as the Action API. It can often play a similar role to reference material, and can be much more complex than sample code.', | ||
[ContentType.library]: | ||
'Code that can be consumed as a dependency of other code, usually via a package/module manager', | ||
[ContentType.installableCode]: | ||
'Installable code is template or sample code that can also be directly deployed and then modified, often through existing automation such as the Looker Marketplace, without the need to first adapt it.', | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(However, you could conceivably also consume the typescript exports from this folder)
->If you need the types and LocaleStrings, you need to import the typescript exports from this folder, bin/looker-resources-index