-
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
0 parents
commit 93a8404
Showing
41 changed files
with
17,098 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
end_of_line = lf | ||
charset = utf-8 | ||
indent_size = 2 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
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 @@ | ||
.DS_Store | ||
node_modules/ | ||
dist/ | ||
coverage/ | ||
src/css | ||
src/**/*.js | ||
src/**/*.map | ||
*.log |
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,37 @@ | ||
# server-status | ||
|
||
> A Vue.js project | ||
## Build Setup | ||
|
||
``` bash | ||
# install dependencies | ||
npm install | ||
|
||
# serve with hot reload at localhost:8080 | ||
npm run dev | ||
|
||
# lint the Typescript | ||
npm run lint | ||
|
||
# run the tests | ||
npm test | ||
|
||
# run the tests on changes | ||
npm run test:watch | ||
|
||
# run the test suite and generate a coverage report | ||
npm run coverage | ||
|
||
# run the tests on Teamcity | ||
npm run ci:teamcity | ||
|
||
# run the tests on Jenkins | ||
npm run ci:jenkins | ||
|
||
# build for production with minification | ||
npm run build | ||
|
||
# clean the production build | ||
npm run clean | ||
``` |
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,10 @@ | ||
const path = require('path') | ||
|
||
const ROOT = path.resolve(__dirname, '..') | ||
|
||
function root (args) { | ||
args = Array.prototype.slice.call(arguments, 0) | ||
return path.join.apply(path, [ROOT].concat(args)) | ||
} | ||
|
||
exports.root = root |
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,58 @@ | ||
var parseArgs = require('minimist') | ||
var webpackConfig = require('./webpack.config.coverage') | ||
|
||
var args = parseArgs(process.argv.slice(2), { | ||
string: ['env'], | ||
default: { | ||
'env': 'mocha' | ||
} | ||
}) | ||
|
||
var reporters = ['mocha', 'coverage'] | ||
|
||
if (args.env === 'tc') { | ||
reporters = ['teamcity', 'coverage'] | ||
} | ||
|
||
if (args.env === 'jk') { | ||
reporters = ['junit', 'coverage'] | ||
} | ||
|
||
module.exports = function (config) { | ||
config.set({ | ||
basePath: '..', | ||
frameworks: ['mocha', 'chai', 'sinon'], | ||
files: [ | ||
'node_modules/es6-promise/dist/es6-promise.auto.js', | ||
'src/test.ts' | ||
], | ||
reporters: reporters, | ||
preprocessors: { | ||
'src/test.ts': ['webpack'] | ||
}, | ||
webpack: webpackConfig, | ||
webpackServer: { | ||
noInfo: true | ||
}, | ||
junitReporter: { | ||
outputDir: 'reports/' | ||
}, | ||
coverageReporter: { | ||
reporters: [{ | ||
type: 'json', | ||
dir: 'coverage/json', | ||
subdir: '.' | ||
}] | ||
}, | ||
port: 9876, | ||
colors: true, | ||
logLevel: config.LOG_INFO, | ||
autoWatch: false, | ||
browsers: ['Chrome'], | ||
mime: { | ||
'text/x-typescript': ['ts'] | ||
}, | ||
singleRun: true, | ||
concurrency: Infinity | ||
}) | ||
} |
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 @@ | ||
var webpackConfig = require('./webpack.config.test') | ||
|
||
module.exports = function (config) { | ||
config.set({ | ||
basePath: '..', | ||
frameworks: ['source-map-support', 'mocha', 'chai', 'sinon'], | ||
files: [ | ||
'node_modules/es6-promise/dist/es6-promise.auto.js', | ||
{ | ||
pattern: 'node_modules/es6-promise/dist/es6-promise.auto.map', | ||
watched: false, | ||
included: false, | ||
served: true | ||
}, | ||
'src/test.ts' | ||
], | ||
reporters: ['mocha'], | ||
preprocessors: { | ||
'src/test.ts': ['webpack'] | ||
}, | ||
webpack: webpackConfig, | ||
webpackServer: { | ||
noInfo: true | ||
}, | ||
mime: { | ||
'text/x-typescript': ['ts'] | ||
}, | ||
port: 9876, | ||
colors: true, | ||
logLevel: config.LOG_INFO, | ||
autoWatch: true, | ||
browsers: ['Chrome_with_debugging'], | ||
customLaunchers: { | ||
Chrome_with_debugging: { | ||
base: 'Chrome', | ||
flags: ['--remote-debugging-port=9222'], | ||
debug: true | ||
} | ||
}, | ||
singleRun: false | ||
}) | ||
} |
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,27 @@ | ||
var webpackConfig = require('./webpack.config.test') | ||
|
||
module.exports = function (config) { | ||
config.set({ | ||
basePath: '..', | ||
frameworks: ['mocha', 'chai', 'sinon'], | ||
files: [ | ||
'node_modules/es6-promise/dist/es6-promise.auto.js', | ||
'src/test.ts' | ||
], | ||
preprocessors: { | ||
'src/test.ts': ['webpack'] | ||
}, | ||
webpack: webpackConfig, | ||
webpackServer: { noInfo: true }, | ||
reporters: ['mocha'], | ||
port: 9876, | ||
colors: true, | ||
logLevel: config.LOG_INFO, | ||
autoWatch: false, | ||
browsers: ['Chrome'], | ||
mime: { | ||
'text/x-typescript': ['ts'] | ||
}, | ||
singleRun: true | ||
}) | ||
} |
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,50 @@ | ||
const helpers = require('./helpers') | ||
const NamedModulesPlugin = require('webpack/lib/NamedModulesPlugin') | ||
const CopyWebpackPlugin = require('copy-webpack-plugin') | ||
|
||
let config = { | ||
entry: { | ||
'main': helpers.root('/src/main.ts') | ||
}, | ||
output: { | ||
path: helpers.root('/dist'), | ||
filename: 'js/[name].[hash].js', | ||
chunkFilename: 'js/[name].[hash].js', | ||
publicPath: '/' | ||
}, | ||
devtool: 'source-map', | ||
resolve: { | ||
extensions: ['.ts', '.js', '.html'], | ||
alias: { | ||
'vue$': 'vue/dist/vue.esm.js' | ||
} | ||
}, | ||
module: { | ||
rules: [{ | ||
test: /\.ts$/, | ||
exclude: /node_modules/, | ||
enforce: 'pre', | ||
loader: 'tslint-loader' | ||
}, | ||
{ | ||
test: /\.ts$/, | ||
exclude: /node_modules/, | ||
loader: 'awesome-typescript-loader' | ||
}, | ||
{ | ||
test: /\.html$/, | ||
loader: 'raw-loader', | ||
exclude: ['./src/index.html'] | ||
} | ||
] | ||
}, | ||
plugins: [ | ||
new NamedModulesPlugin(), | ||
new CopyWebpackPlugin([{ | ||
from: 'src/assets', | ||
to: './assets' | ||
} ]) | ||
] | ||
} | ||
|
||
module.exports = config |
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 @@ | ||
const webpackConfig = require('./webpack.config.test') | ||
|
||
webpackConfig.module.rules = [...webpackConfig.module.rules, | ||
{ | ||
test: /\.ts$/, | ||
enforce: 'post', | ||
loader: 'istanbul-instrumenter-loader', | ||
exclude: [ | ||
'node_modules', | ||
/\.spec\.ts$/ | ||
], | ||
query: { | ||
esModules: true | ||
} | ||
} | ||
] | ||
|
||
module.exports = webpackConfig |
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,50 @@ | ||
const helpers = require('./helpers') | ||
const webpackConfig = require('./webpack.config.base') | ||
const HtmlWebpackPlugin = require('html-webpack-plugin') | ||
const DefinePlugin = require('webpack/lib/DefinePlugin') | ||
const env = require('../environment/dev.env') | ||
|
||
webpackConfig.module.rules = [...webpackConfig.module.rules, | ||
{ | ||
test: /\.scss$/, | ||
use: [{ | ||
loader: 'style-loader' | ||
}, | ||
{ | ||
loader: 'css-loader' | ||
}, | ||
{ | ||
loader: 'sass-loader' | ||
} | ||
] | ||
}, | ||
{ | ||
test: /\.(jpg|png|gif|eot|svg|ttf|woff|woff2)$/, | ||
loader: 'file-loader' | ||
} | ||
] | ||
|
||
webpackConfig.plugins = [...webpackConfig.plugins, | ||
new HtmlWebpackPlugin({ | ||
inject: true, | ||
template: helpers.root('/src/index.html'), | ||
favicon: helpers.root('/src/favicon.ico') | ||
}), | ||
new DefinePlugin({ | ||
'process.env': env | ||
}) | ||
] | ||
|
||
webpackConfig.devServer = { | ||
port: 8080, | ||
host: 'localhost', | ||
historyApiFallback: true, | ||
watchOptions: { | ||
aggregateTimeout: 300, | ||
poll: 1000 | ||
}, | ||
contentBase: './src', | ||
open: true | ||
} | ||
|
||
module.exports = webpackConfig |
Oops, something went wrong.