Skip to content
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

Update with latest changes from Ken #4

Open
wants to merge 45 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
3a23e4d
Migrate to secrets rather than env-vars
kenfdev Jun 8, 2018
74e6209
Update README.md
kenfdev Jun 8, 2018
70d5b14
Fixed secret prefix
kenfdev Jun 8, 2018
074499e
Re-generated secrets
kenfdev Jun 8, 2018
3054528
Added assets
kenfdev Jun 8, 2018
823bcf3
Added spa func (not complete yet)
kenfdev Jun 9, 2018
ef5bc39
SPA v1 complete
kenfdev Jun 9, 2018
58f6e1a
Stop write_debug
kenfdev Jun 9, 2018
574b441
Added node8-express template
kenfdev Jun 10, 2018
ba0d4ed
Stop using custom template
kenfdev Jun 10, 2018
4f7e962
Update
kenfdev Jun 10, 2018
2366807
Fixed some minor issues and added index to table.
kenfdev Jun 11, 2018
173ebb1
Added feature to switch orgs with query params
kenfdev Jun 11, 2018
8bc3c01
Updated assets
kenfdev Jun 11, 2018
1b6d5fc
Added ability to show stats without query param
kenfdev Jun 12, 2018
48f8081
Support pagination to collect all data
kenfdev Jun 15, 2018
2b8f563
Throw Error on 202 Accepted.
kenfdev Jun 15, 2018
1f89bd8
Stop using deprecated method
kenfdev Jun 15, 2018
1f72cce
Added contributors page mock
kenfdev Jun 15, 2018
9a623de
Added function to stack.yml
kenfdev Jun 15, 2018
be10cf8
Added content_type
kenfdev Jun 15, 2018
3c9da03
Removed dist from gitignore and added assets
kenfdev Jun 15, 2018
87d7127
Added versioning
kenfdev Jun 15, 2018
e6fa0b6
Remove contributers page
kenfdev Jun 15, 2018
0a79b65
Added contributors function again
kenfdev Jun 15, 2018
37d1f29
Changed contributors page html file name
kenfdev Jun 17, 2018
ce3644a
Delete contributors-page
kenfdev Jun 17, 2018
07f86a5
update
kenfdev Jul 6, 2018
6cdb02c
Updated packages and rebuilt
kenfdev Jul 6, 2018
e39b85c
Fixed sorting issue
kenfdev Jul 16, 2018
92a45ea
Updated assets
kenfdev Jul 16, 2018
0d155a2
Update
kenfdev Jul 19, 2018
6445ab4
add debug log
kenfdev Jul 27, 2018
d6dffa0
Added console.error for logging
kenfdev Aug 10, 2018
0d2cc00
Delete conflict
kenfdev Aug 10, 2018
3bdf7a7
Support caching results to file system
kenfdev Aug 11, 2018
5e95f9d
Update README.md
kenfdev Aug 30, 2018
23ab2dd
fixed color
kenfdev Aug 30, 2018
169157e
Merge branch 'master' of https://github.com/kenfdev/faas-github-stats
kenfdev Aug 30, 2018
198a138
Added github link and adjusted styles
kenfdev Sep 4, 2018
d2789ba
Bump
kenfdev Sep 8, 2018
b8074c8
Update README.md
kenfdev Sep 9, 2018
b4425ae
Updated sealed secret with new public cert.
kenfdev Feb 20, 2019
a702140
Update
kenfdev Feb 20, 2019
36ce2e2
Fix css cdn
kenfdev Aug 8, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
template/
template/*
.vscode/
build/
build/*
node_modules
template
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
Set your Github Personal Token inside the environment variable `GITHUB_TOKEN`

Make a request with an organization name:

```
Expand All @@ -8,4 +6,5 @@ Make a request with an organization name:
}
```

And you can get an overall stats of the repo.
And you can get an overall stats of the repo.

12 changes: 12 additions & 0 deletions assets/github-stats-page/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"presets": [
["env", {
"modules": false,
"targets": {
"browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
}
}],
"stage-2"
],
"plugins": ["transform-vue-jsx", "transform-runtime"]
}
9 changes: 9 additions & 0 deletions assets/github-stats-page/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
4 changes: 4 additions & 0 deletions assets/github-stats-page/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/build/
/config/
/dist/
/*.js
31 changes: 31 additions & 0 deletions assets/github-stats-page/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// https://eslint.org/docs/user-guide/configuring

module.exports = {
root: true,
parserOptions: {
parser: 'babel-eslint',
},
env: {
browser: true,
},
extends: [
// https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevent
// ion consider switching to `plugin:vue/strongly-recommended` or
// `plugin:vue/recommended` for stricter rules.
'plugin:vue/essential',
// https://github.com/standard/standard/blob/master/docs/RULES-en.md
'standard',
],
// required to lint *.vue files
plugins: ['vue'],
// add your custom rules here
rules: {
// allow async-await
'generator-star-spacing': 'off',
// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
semi: 'off',
'space-before-function-paren': 'off',
'comma-dangle': 'off',
},
};
13 changes: 13 additions & 0 deletions assets/github-stats-page/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.DS_Store
node_modules/
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
10 changes: 10 additions & 0 deletions assets/github-stats-page/.postcssrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// https://github.com/michael-ciniawsky/postcss-load-config

module.exports = {
"plugins": {
"postcss-import": {},
"postcss-url": {},
// to edit target browsers: use "browserslist" field in package.json
"autoprefixer": {}
}
}
21 changes: 21 additions & 0 deletions assets/github-stats-page/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# github-stats-page

> A Vue.js project

## Build Setup

``` bash
# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build

# build for production and view the bundle analyzer report
npm run build --report
```

For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).
41 changes: 41 additions & 0 deletions assets/github-stats-page/build/build.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
'use strict'
require('./check-versions')()

process.env.NODE_ENV = 'production'

const ora = require('ora')
const rm = require('rimraf')
const path = require('path')
const chalk = require('chalk')
const webpack = require('webpack')
const config = require('../config')
const webpackConfig = require('./webpack.prod.conf')

const spinner = ora('building for production...')
spinner.start()

rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => {
if (err) throw err
webpack(webpackConfig, (err, stats) => {
spinner.stop()
if (err) throw err
process.stdout.write(stats.toString({
colors: true,
modules: false,
children: false, // If you are using ts-loader, setting this to true will make TypeScript errors show up during build.
chunks: false,
chunkModules: false
}) + '\n\n')

if (stats.hasErrors()) {
console.log(chalk.red(' Build failed with errors.\n'))
process.exit(1)
}

console.log(chalk.cyan(' Build complete.\n'))
console.log(chalk.yellow(
' Tip: built files are meant to be served over an HTTP server.\n' +
' Opening index.html over file:// won\'t work.\n'
))
})
})
54 changes: 54 additions & 0 deletions assets/github-stats-page/build/check-versions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
'use strict'
const chalk = require('chalk')
const semver = require('semver')
const packageConfig = require('../package.json')
const shell = require('shelljs')

function exec (cmd) {
return require('child_process').execSync(cmd).toString().trim()
}

const versionRequirements = [
{
name: 'node',
currentVersion: semver.clean(process.version),
versionRequirement: packageConfig.engines.node
}
]

if (shell.which('npm')) {
versionRequirements.push({
name: 'npm',
currentVersion: exec('npm --version'),
versionRequirement: packageConfig.engines.npm
})
}

module.exports = function () {
const warnings = []

for (let i = 0; i < versionRequirements.length; i++) {
const mod = versionRequirements[i]

if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) {
warnings.push(mod.name + ': ' +
chalk.red(mod.currentVersion) + ' should be ' +
chalk.green(mod.versionRequirement)
)
}
}

if (warnings.length) {
console.log('')
console.log(chalk.yellow('To use this template, you must update following to modules:'))
console.log()

for (let i = 0; i < warnings.length; i++) {
const warning = warnings[i]
console.log(' ' + warning)
}

console.log()
process.exit(1)
}
}
Binary file added assets/github-stats-page/build/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
101 changes: 101 additions & 0 deletions assets/github-stats-page/build/utils.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
'use strict'
const path = require('path')
const config = require('../config')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const packageConfig = require('../package.json')

exports.assetsPath = function (_path) {
const assetsSubDirectory = process.env.NODE_ENV === 'production'
? config.build.assetsSubDirectory
: config.dev.assetsSubDirectory

return path.posix.join(assetsSubDirectory, _path)
}

exports.cssLoaders = function (options) {
options = options || {}

const cssLoader = {
loader: 'css-loader',
options: {
sourceMap: options.sourceMap
}
}

const postcssLoader = {
loader: 'postcss-loader',
options: {
sourceMap: options.sourceMap
}
}

// generate loader string to be used with extract text plugin
function generateLoaders (loader, loaderOptions) {
const loaders = options.usePostCSS ? [cssLoader, postcssLoader] : [cssLoader]

if (loader) {
loaders.push({
loader: loader + '-loader',
options: Object.assign({}, loaderOptions, {
sourceMap: options.sourceMap
})
})
}

// Extract CSS when that option is specified
// (which is the case during production build)
if (options.extract) {
return ExtractTextPlugin.extract({
use: loaders,
fallback: 'vue-style-loader'
})
} else {
return ['vue-style-loader'].concat(loaders)
}
}

// https://vue-loader.vuejs.org/en/configurations/extract-css.html
return {
css: generateLoaders(),
postcss: generateLoaders(),
less: generateLoaders('less'),
sass: generateLoaders('sass', { indentedSyntax: true }),
scss: generateLoaders('sass'),
stylus: generateLoaders('stylus'),
styl: generateLoaders('stylus')
}
}

// Generate loaders for standalone style files (outside of .vue)
exports.styleLoaders = function (options) {
const output = []
const loaders = exports.cssLoaders(options)

for (const extension in loaders) {
const loader = loaders[extension]
output.push({
test: new RegExp('\\.' + extension + '$'),
use: loader
})
}

return output
}

exports.createNotifierCallback = () => {
const notifier = require('node-notifier')

return (severity, errors) => {
if (severity !== 'error') return

const error = errors[0]
const filename = error.file && error.file.split('!').pop()

notifier.notify({
title: packageConfig.name,
message: severity + ': ' + error.name,
subtitle: filename || '',
icon: path.join(__dirname, 'logo.png')
})
}
}
22 changes: 22 additions & 0 deletions assets/github-stats-page/build/vue-loader.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
'use strict'
const utils = require('./utils')
const config = require('../config')
const isProduction = process.env.NODE_ENV === 'production'
const sourceMapEnabled = isProduction
? config.build.productionSourceMap
: config.dev.cssSourceMap

module.exports = {
loaders: utils.cssLoaders({
sourceMap: sourceMapEnabled,
extract: isProduction
}),
cssSourceMap: sourceMapEnabled,
cacheBusting: config.dev.cacheBusting,
transformToRequire: {
video: ['src', 'poster'],
source: 'src',
img: 'src',
image: 'xlink:href'
}
}
Loading