Skip to content

Commit

Permalink
Merge pull request #41 from MaxxtonGroup/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
steven166 authored Feb 6, 2017
2 parents 258e33a + 24f24ae commit 5cf6da9
Show file tree
Hide file tree
Showing 6,773 changed files with 48,533 additions and 921,194 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
*
!microdocs-server/dist
!microdocs-server/package.json
!microdocs-server/config.yml
!microdocs-ui/dist
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,9 @@

/microdocs-server/data/reports
/microdocs-server/data/database
!/docs/**/dist
!/docs/**/dist
/docs/src/bower_components
/npm-cache/conf/storage
/npm-cache/local_storage
/npm-cache/storage
/microdocs-server/npm-debug.log
8 changes: 0 additions & 8 deletions .travis.yml

This file was deleted.

9 changes: 9 additions & 0 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM node:6
EXPOSE 3000
WORKDIR /microdocs/microdocs-server
RUN npm set registry http://192.168.252.165:4873/
RUN echo @maxxton:registry=https://npm.maxxton.com > .npmrc
ADD microdocs-server/config.yml .
ADD microdocs-server/package.json .
RUN npm install --prod && npm install nodemon
CMD ./node_modules/.bin/nodemon --watch dist dist/index.js
88 changes: 17 additions & 71 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,96 +1,42 @@
def tag = input message: 'Tag', parameters: [string(defaultValue: '', description: 'Tag', name: 'TAG')]
node {
stage('Checkout Git'){
git url: '[email protected]:MaxxtonGroup/microdocs.git', branch: 'development'
stash name: 'source'
}
stage('Build microdocs-core'){
unstash 'source'
dir ('microdocs-core-ts'){
sh 'echo "Installing npm dependencies"'
sh 'npm version $TAG'
sh 'npm install'
sh 'echo "Publishing to private NPM registry"'
sh 'npm run prepublish'
dir ('dist'){
stash name: 'microdocs-core-dist'
}
}
}
stage('Publish microdocs-core'){
unstash 'microdocs-core-dist'
dir ('microdocs-core-ts'){
try{
sh 'npm unpublish @maxxton/microdocs-core@$TAG'
}catch(Exception e){}
sh 'npm publish dist'
}
}
stage('Build microdocs-cli'){
unstash 'source'
dir ('microdocs-cli'){
sh 'echo "Installing npm dependencies"'
sh 'npm version $TAG'
sh 'npm install --save @maxxton/microdocs-core@$TAG'
sh 'npm install'
sh 'echo "Publishing to private NPM registry"'
sh 'npm run prepublish'
dir ('dist'){
stash name: 'microdocs-cli-dist'
}
}
}
stage('Publish microdocs-cli'){
unstash 'microdocs-cli-dist'
dir ('microdocs-cli') {
try{
sh 'npm unpublish @maxxton/microdocs-cli@$TAG'
}catch(Exception e){}
sh 'npm publish'
}
git url: '[email protected]:MaxxtonGroup/microdocs.git', branch: 'master'
}
stage('Build microdocs-server'){
unstash 'source'
dir ('microdocs-server'){
sh 'echo "Installing npm dependencies"'
sh 'npm version $TAG'
sh 'npm install --save @maxxton/microdocs-core@$TAG'
sh 'npm install'
sh 'echo "Publishing to private NPM registry"'
sh 'npm run package-distribution'
sh 'npm version ' + tag
sh 'npm run prepublish'
sh 'cp .npmrc dist/.npmrc'
dir ('dist'){
sh 'npm install --prod'
stash name: 'microdocs-server-dist'
}
}
}
stage('Build microdocs-ui'){
unstash 'source'
dir ('microdocs-ui'){
sh 'echo "Installing npm dependencies"'
sh 'npm version $TAG'
sh 'npm install --save @maxxton/microdocs-core@$TAG'
sh 'npm install @maxxton/[email protected] --save-dev'
sh 'npm install'
sh 'echo "Publishing to private NPM registry"'
sh 'npm run package-distribution'
dir ('dist'){
stash name: 'microdocs-ui-dist'
}
sh 'npm version ' + tag
sh './node_modules/.bin/ng build --prod'
}
}
stage('Build microdocs-ui'){
dir ('microdocs-ui'){
sh 'npm install'
sh 'npm version ' + tag
sh 'ng build --prod'
}
}
stage('Build docker image'){
unstash 'source'
unstash 'microdocs-server-dist'
unstash 'microdocs-ui-dist'
sh 'bash docker rmi maxxton/microdocs:$TAG || true'
sh 'bash docker rmi maxxton/microdocs:' + tag + ' || true'
sh 'bash docker rmi maxxton/microdocs:latest || true'
sh 'docker build --tag=maxxton/microdocs:$TAG --no-cache .'
sh 'docker build --tag=maxxton/microdocs:' + tag + ' --no-cache .'
}
stage('Public docker image'){
sh 'docker login --email $DOCKERHUB_EMAIL --username $DOCKERHUB_USERNAME --password $DOCKERHUB_PASSWORD'
sh 'docker push maxxton/microdocs:$TAG'
sh 'docker tag maxxton/microdocs:$TAG maxxton/microdocs:latest'
sh 'docker push maxxton/microdocs:' + tag;
sh 'docker tag maxxton/microdocs:' + tag + ' maxxton/microdocs:latest'
sh 'docker push maxxton/microdocs:latest'
}
}
17 changes: 17 additions & 0 deletions docker-compose-npm-cache.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: '2'
services:
npm-registry:
image: verdaccio/verdaccio
volumes:
- ./npm-cache/conf:/verdaccio/conf
- ./npm-cache/storage:/verdaccio/storage
- ./npm-cache/local_storage :/verdaccio/local_storage
ports:
- 4873:4873
networks:
- 'microdocs-server'

networks:
microdocs-server:
external:
name: 'microdocs-server'
22 changes: 22 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
version: '2'
services:
microdocs-server:
container_name: microdocs-dev
image: microdocs:dev
build:
dockerfile: Dockerfile.dev
context: .
ports:
- 3000:3000
volumes:
- ./microdocs-server/dist:/microdocs/microdocs-server/dist
- ./microdocs-server/data:/microdocs/microdocs-server/data
- ./microdocs-ui/dist:/microdocs/microdocs-ui/dist
- ../microdocs-core/dist:/microdocs/microdocs-server/dist/node_modules/@maxxton/microdocs-core
networks:
- 'microdocs-server'

networks:
microdocs-server:
external:
name: 'microdocs-server'
3 changes: 3 additions & 0 deletions docs/.bowerrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"directory": "src/bower_components"
}
17 changes: 14 additions & 3 deletions docs/assets/css/main.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* Header */
#head { background:#2196F3; background-size: cover; min-height:520px; text-align: center; padding-top:240px; color:white; font-family:"Open sans", Helvetica, Arial; font-weight:300; }
.navbar{box-shadow: rgba(0, 0, 0, 0.117647) 0px 1px 6px 0px, rgba(0, 0, 0, 0.117647) 0px 1px 6px 0px;}
#head { background:#2196F3; background-size: cover; min-height:420px; text-align: center; padding-top:140px; color:white; font-family:"Open sans", Helvetica, Arial; font-weight:300; }
#head.secondary { height:100px; min-height: 100px; padding-top:0px; }
#head .row { position: relative}
#head .row img{ position: absolute; opacity: 0.5; height: 350px;}
Expand Down Expand Up @@ -110,7 +111,7 @@ img.pull-left { margin-right: 10px; }

.preview code{
color: white;
background: #000;
background: #263238;
padding: 10PX 30px;
box-shadow: rgba(0, 0, 0, 0.227451) 0px 3px 10px 0px, rgba(0, 0, 0, 0.156863) 0px 3px 10px 0px;

Expand Down Expand Up @@ -163,4 +164,14 @@ img.pull-left { margin-right: 10px; }
display: inline-block;
overflow: auto;
}
}
}

my-app{
display: block;
}

@media (min-width: 1200px) {
.container {
width: 100%;
}
}
Binary file added docs/assets/images/microdocs-semi-white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions docs/bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "microdocs-website",
"homepage": "http://microdocs.io",
"authors": [
"Steven Hermans <[email protected]>"
],
"description": "",
"license": "MIT",
"private": true,
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"dependencies": {
"polymer": "^1.7.1",
"iron-elements": "^1.0.10",
"paper-elements": "^1.0.7",
"app-elements": "^0.10.1",
"neon-elements": "^1.0.0",
"marked-element": "^1.2.0"
}
}
22 changes: 22 additions & 0 deletions docs/bower_components/marked/Gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
var gulp = require('gulp');
var uglify = require('gulp-uglify');
var concat = require('gulp-concat');

var preserveFirstComment = function() {
var set = false;

return function() {
if (set) return false;
set = true;
return true;
};
};

gulp.task('uglify', function() {
gulp.src('lib/marked.js')
.pipe(uglify({preserveComments: preserveFirstComment()}))
.pipe(concat('marked.min.js'))
.pipe(gulp.dest('.'));
});

gulp.task('default', ['uglify']);
19 changes: 19 additions & 0 deletions docs/bower_components/marked/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) 2011-2014, Christopher Jeffrey (https://github.com/chjj/)

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.
12 changes: 12 additions & 0 deletions docs/bower_components/marked/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
all:
@cp lib/marked.js marked.js
@uglifyjs --comments '/\*[^\0]+?Copyright[^\0]+?\*/' -o marked.min.js lib/marked.js

clean:
@rm marked.js
@rm marked.min.js

bench:
@node test --bench

.PHONY: clean all
Loading

0 comments on commit 5cf6da9

Please sign in to comment.