Commit 31157880 authored by Jon Moore's avatar Jon Moore
Browse files

Initial commit

parents
Pipeline #23931 passed with stage
in 4 minutes and 30 seconds
**/node_modules
**/dist
DockerFile
.git
root = true
[*.js]
indent_style = space
indent_size = 2
end_of_line = lf
ALIAS=workshop
INTERNAL_VIP=10.128.76.132
ACCESS_TOKEN=98IWGmtMnxGWTzAPjjq99YkrGvSn3qzE6l84Y8f65WarMWz4
PUBLIC_URL=https://iis-live-workshop.cloud.contensis.com/
PROJECT=website
/dist
/node_modules
/docs
\.*
/src/contensis-delivery-api
const path = require('path');
module.exports = {
plugins: ['prettier', 'react', 'flowtype'],
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:flowtype/recommended',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:jsx-a11y/recommended',
'plugin:prettier/recommended',
'prettier',
'prettier/react',
'prettier/flowtype',
],
env: {
browser: true,
node: true,
jest: true,
mocha: true,
es6: true,
},
globals: {
__isBrowser__: true,
},
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 6,
sourceType: 'module',
ecmaFeatures: {
jsx: true,
modules: true,
experimentalObjectRestSpread: true,
},
},
rules: {
'react/require-default-props': 0,
'no-debugger': 0,
'no-alert': 0,
'no-console': [
'error',
{
allow: ['error', 'info'],
},
],
quotes: [
2,
'single',
{
avoidEscape: true,
allowTemplateLiterals: true,
},
],
'prettier/prettier': [
'error',
{
trailingComma: 'es5',
singleQuote: true,
printWidth: 80,
endOfLine: 'auto',
},
],
},
settings: {
flowtype: {
onlyFilesWithFlowAnnotation: true,
},
react: {
version: '^16.0.0',
flowVersion: '^0.81.0',
},
'import/resolver': {
webpack: {
config: path.resolve(__dirname, './webpack/webpack.config.base.js'),
},
},
},
};
[core]
ignorecase = false
/node_modules
/coverage
/build
/dist
/docs
npm-debug.log*
*.log
yarn-error.log
__snapshots__
.cache
/old
.DS_Store
.out
storybook-static/
image: docker:stable
stages:
- storybook-latest-build
- latest-build
- live-build
variables:
DOCKER_DRIVER: overlay2
STORYBOOK: ''
APP_BUILDER_IMAGE: '$CI_REGISTRY_IMAGE/$CI_COMMIT_REF_NAME/app-builder'
APP_IMAGE: '$CI_REGISTRY_IMAGE/$CI_COMMIT_REF_NAME/app'
STORYBOOK_BUILDER_IMAGE: '$CI_REGISTRY_IMAGE/$CI_COMMIT_REF_NAME/storybook-builder'
STORYBOOK_IMAGE: '$CI_REGISTRY_IMAGE/$CI_COMMIT_REF_NAME/storybook'
MASTER_APP: '$CI_REGISTRY_IMAGE/master/app'
services:
- docker:dind
before_script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN gitlab.zengenti.com:4567
build-latest-code:
stage: latest-build
except:
- tags
- ^release-.*$
script:
- docker pull $APP_BUILDER_IMAGE:latest || true
- echo "{\"commitRef\":\"$CI_COMMIT_SHA\",\"pipelineIID\":\"$CI_PIPELINE_IID\",\"pipelineUrl\":\"$CI_PIPELINE_URL\",\"buildNo\":\"$CI_PIPELINE_ID\",\"branchName\":\"$CI_COMMIT_REF_NAME\",\"registryImage\":\"$CI_REGISTRY_IMAGE\"}" > version.json
- docker build --force-rm --cache-from $APP_BUILDER_IMAGE:latest -t $APP_BUILDER_IMAGE:latest -f docker/nodebuilder.DockerFile .
- docker push $APP_BUILDER_IMAGE:latest
- docker pull $APP_IMAGE:latest || true
- docker build --force-rm --cache-from $APP_IMAGE:latest -t $APP_IMAGE:latest --build-arg builder_image=$APP_BUILDER_IMAGE:latest -f docker/ci-build.DockerFile .
- docker push $APP_IMAGE:latest
environment:
name: latest
url: http://dev.preview.$CI_PROJECT_NAME.contensis.cloud
build-storybook:
stage: storybook-latest-build
except:
- tags
- ^release-.*$
only:
variables:
- $STORYBOOK == 'true'
script:
- docker pull $STORYBOOK_BUILDER_IMAGE:latest || true
- docker build --compress --force-rm --cache-from $STORYBOOK_BUILDER_IMAGE:latest -t $STORYBOOK_BUILDER_IMAGE:latest -f docker/storybook-builder.DockerFile .
- docker push $STORYBOOK_BUILDER_IMAGE:latest
- docker build --compress --force-rm -t $STORYBOOK_IMAGE:latest --build-arg builder_image=$STORYBOOK_BUILDER_IMAGE:latest -f docker/storybook-http.DockerFile .
- docker push $STORYBOOK_IMAGE:latest
environment:
name: storybook
url: http://storybook.latest.$CI_PROJECT_NAME.contensis.cloud
build-live-code-for-production:
stage: live-build
only:
- tags
- ^release-.*$
- $STORYBOOK == ''
except:
- branches
script:
- docker pull "$MASTER_APP:latest"
- docker tag "$MASTER_APP:latest" "$MASTER_APP:release"
- docker push "$MASTER_APP:release"
environment:
name: live
url: http://preview.$CI_PROJECT_NAME.contensis.cloud
This source diff could not be displayed because it is too large. You can view the blob instead.
/dist
/docs
/node_modules
/public/styles
{
"trailingComma": "es5",
"singleQuote": true
}
const NODE_TARGET = 9;
// const presetEnv = {
// "targets": {
// "node": NODE_TARGET
// }
// }
const presetEnv = {
targets: {
browsers: ['last 2 versions', 'IE >= 11'],
},
//useBuiltIns: 'usage',
};
// if (process.env.NODE_ENV !== 'test') {
// presetEnv.modules = false;
// }
module.exports = {
presets: [['@babel/preset-env', presetEnv], '@babel/preset-react'],
plugins: [
[
'babel-plugin-styled-components',
{
displayName: true,
ssr: true,
},
],
'react-hot-loader/babel',
'react-loadable/babel',
'@babel/plugin-transform-runtime',
'@babel/plugin-syntax-dynamic-import',
'@babel/plugin-proposal-class-properties',
'@babel/plugin-syntax-export-default-from',
'@babel/plugin-proposal-export-default-from',
],
env: {
test: {
plugins: ['babel-plugin-dynamic-import-node'],
},
},
};
import '@storybook/addon-knobs/register';
import '@storybook/addon-jest/register';
import { configure, addDecorator, addParameters } from '@storybook/react';
import { withKnobs } from '@storybook/addon-knobs';
import { withTests } from '@storybook/addon-jest';
import results from '../.jest-test-results.json';
import StoryRouter from 'storybook-react-router';
addDecorator(StoryRouter());
addDecorator(
withTests({
results,
})
);
addParameters({
options: {
isFullscreen: false,
showNav: true,
showPanel: true,
panelPosition: 'right',
hierarchySeparator: /\/|\./,
hierarchyRootSeparator: /\|/,
sidebarAnimations: true,
enableShortcuts: true,
isToolshown: true,
theme: undefined,
storySort: undefined,
},
});
addDecorator(withKnobs, {
knobs: {
timestamps: true,
escapeHTML: true,
},
});
const req = require.context('../src/app/', true, /.stories.js$/);
function loadStories() {
req.keys().forEach(req);
}
configure(loadStories, module);
// you can use this file to add your custom webpack plugins, loaders and anything you like.
// This is just the basic way to add additional webpack configurations.
// For more information refer the docs: https://storybook.js.org/configurations/custom-webpack-config
// IMPORTANT
// When you add this file, we won't add the default configurations which is similar
// to "React Create App". This only has babel loader to load JavaScript.
const path = require('path');
const webpack = require('webpack');
const packagejson = require('../package.json');
const defineConfig = require('../webpack/define-config-webpack').base;
module.exports = {
plugins: [
new webpack.DefinePlugin(defineConfig),
new webpack.DefinePlugin({
__isBrowser__: 'true',
}),
],
module: {
rules: [
// add your custom rules.
{
test: /\.css$/,
use: ['style-loader', 'css-loader'],
},
{
test: /\.(gif|png|jpe?g|svg)$/i,
use: [
'file-loader',
{
loader: 'image-webpack-loader',
options: {
bypassOnDebug: true, // webpack@1.x
disable: true, // webpack@2.x and newer
},
},
],
},
{
test: /\.(eot|woff|woff2|ttf)$/,
loader: 'url-loader?limit=30000&name=[name]-[hash].[ext]',
},
],
},
resolve: {
extensions: ['.js', '.jsx', '.json'],
alias: {
'~': path.resolve(__dirname, '../src/app'),
app: path.resolve(__dirname, '../src/app'),
},
},
externals: {
jsdom: 'window',
cheerio: 'window',
'react/lib/ExecutionEnvironment': true,
'react/lib/ReactContext': 'window',
'react/addons': true,
},
watchOptions: {
ignored: ['node_modules', 'dist'],
},
};
{
"processors": ["stylelint-processor-styled-components"],
"extends": [
"stylelint-config-recommended",
"stylelint-config-styled-components"
],
"rules": {
"no-descending-specificity": null,
"property-no-vendor-prefix": null,
"value-no-vendor-prefix": null
}
}
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
//
// TO USE VSCODE DEBUGGING, INSTALL "DEBUGGER FOR CHROME" EXTENSION IN VSCODE,
// ENSURE APPROPRIATE DEV/STORYBOOK TERMINAL IS RUNNING AND THEN HIT F5 TO
// RUN THE SELECTED LAUNCH CONFIG TO OPEN UP A SPECIAL DEBUGGING BROWSER.
// BREAKPOINTS AND WATCHES WILL WORK.
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Debug Storybook in Chrome against localhost",
"url": "http://localhost:6006",
"webRoot": "${workspaceFolder}"
},
{
"type": "chrome",
"request": "launch",
"name": "Debug App in Chrome against localhost",
"url": "http://localhost:3000",
"webRoot": "${workspaceFolder}",
"skipFiles": ["${workspaceFolder}/node_modules/**/*.js"]
},
{
"type": "node",
"request": "attach",
"name": "Attach to Remote",
"address": "127.0.0.1",
"port": 9229,
"localRoot": "${workspaceFolder}\\",
"remoteRoot": "${workspaceFolder}\\",
"smartStep": true,
// Note: These are the mappings that are included by default out of the box, with examples of how they could be resolved in different scenarios. These are not mappings that would make sense together in one project.
"sourceMapPathOverrides": {
"webpack:///./~/*": "${workspaceFolder}/node_modules/*", // Example: "webpack:///./~/querystring/index.js" -> "/Users/me/project/node_modules/querystring/index.js"
"webpack:///./*": "${workspaceFolder}/*", // Example: "webpack:///./src/app.js" -> "/Users/me/project/src/app.js",
"webpack:///*": "*", // Example: "webpack:///project/app.ts" -> "/project/app.ts"
"webpack:///src/*": "${workspaceFolder}/*", // Example: "webpack:///src/app.js" -> "/Users/me/project/app.js"
"meteor://💻app/*": "${workspaceFolder}/*" // Example: "meteor://💻app/main.ts" -> "/Users/me/project/main.ts"
}
},
{
"type": "node",
"request": "launch",
"name": "Run server - debug",
"program": "${workspaceFolder}/src/server/server.js",
"runtimeExecutable": "nodemon",
"runtimeArgs": [
"--exec",
"${workspaceRoot}/node_modules/.bin/babel-node"
],
"smartStep": true,
"internalConsoleOptions": "neverOpen",
"restart": true,
"cwd": "${workspaceRoot}",
"console": "internalConsole",
"outFiles": [],
"env": {
"NODE_ENV": "test"
},
"sourceMaps": true
}
]
}
{
// The number of spaces a tab is equal to. This setting is overridden based on the file contents when `editor.detectIndentation` is on.
"editor.tabSize": 2,
"editor.detectIndentation": false,
// Controls whether the editor should automatically format the line after typing.
"editor.formatOnType": true,
// Render the actual characters on a line as opposed to color blocks.
"editor.minimap.renderCharacters": false,
// Controls fading out of unused code.
"editor.showUnused": true,
// Remove trailing auto inserted whitespace.
"editor.trimAutoWhitespace": true,
// When enabled, insert a final new line at the end of the file when saving it.
"files.insertFinalNewline": true,
// When enabled, will trim all new lines after the final new line at the end of the file when saving it.
"files.trimFinalNewlines": true,
// When enabled, will trim trailing whitespace when saving a file.
"files.trimTrailingWhitespace": false,
// Enable/disable default HTML formatter.
"html.format.enable": true,
// End with a newline.
"html.format.endWithNewline": false,
// Turns auto fix on save on or off.
"eslint.autoFixOnSave": true,
// Always show the ESlint status bar item.
"eslint.alwaysShowStatus": false,
"prettier-eslint.eslintIntegration": true,
"files.exclude": {
// exclude .js and .js.map files, when in a TypeScript project
"**/*.js.map": true,
"**/*.js": {
"when": "$(basename).ts"
},
"**/*?.js": {
"when": "$(basename).tsx"
}
},
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"editor.cursorBlinking": "smooth",
"workbench.editor.highlightModifiedTabs": true,
"workbench.colorCustomizations": {
"tab.activeBorderTop": "#e9654c",
"activityBar.background": "#e9654c",
"activityBar.activeBorder": "#55ea6c",
"activityBar.foreground": "#15202b",
"activityBar.inactiveForeground": "#15202b99",
"activityBarBadge.background": "#55ea6c",
"activityBarBadge.foreground": "#15202b",
"titleBar.activeBackground": "#e33e1f",
"titleBar.inactiveBackground": "#e33e1f99",
"titleBar.activeForeground": "#e7e7e7",
"titleBar.inactiveForeground": "#e7e7e799",
"statusBar.background": "#e33e1f",
"statusBarItem.hoverBackground": "#e9654c",
"statusBar.foreground": "#e7e7e7"
},
"prettier.printWidth": 80,
"peacock.color": "#e33e1f",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment