Skip to content

Commit

Permalink
Build: Semantic release (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
morriq authored Apr 28, 2019
1 parent e58f9a9 commit 73ce3c5
Show file tree
Hide file tree
Showing 16 changed files with 4,514 additions and 2,616 deletions.
43 changes: 43 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
version: 2
jobs:
test_node_10:
docker:
- image: circleci/node:10
steps:
- checkout
- run: npm ci
- run: npm t

test_node_8:
docker:
- image: circleci/node:8
steps:
- checkout
- run: npm ci
- run: npm t

release:
docker:
- image: circleci/node:10
steps:
- checkout
- run: npm ci
# Run optional required steps before releasing
# - run: npm run build-script
- run: npx semantic-release

workflows:
version: 2
test_and_release:
# Run the test jobs first, then the release only when all the test jobs are successful
jobs:
- test_node_10
- test_node_8
- release:
filters:
branches:
only:
- master
requires:
- test_node_10
- test_node_8
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*Dockerfile*
*docker-compose*
node_modules
examples
.git
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
/.idea/
node_modules
16 changes: 16 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"plugins": [
["@semantic-release/commit-analyzer", {
"preset": "eslint"
}],
["@semantic-release/release-notes-generator", {
"preset": "eslint"
}],
"@semantic-release/changelog",
"@semantic-release/npm",
["@semantic-release/git", {
"message": "Docs: Release ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}]
"@semantic-release/github"
]
}
1 change: 0 additions & 1 deletion .travis.yml

This file was deleted.

13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM mhart/alpine-node:12

RUN npm i npm@latest -g

WORKDIR /opt
COPY package*.json ./
RUN npm install --no-optional && npm cache clean --force
ENV PATH /opt/node_modules/.bin:$PATH

WORKDIR /opt/app
COPY . .

EXPOSE 80
8 changes: 8 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: '3.3'
services:
plugin:
build:
context: .
command: tail -F anything
volumes:
- ./:/opt/app:delegated
1 change: 0 additions & 1 deletion examples/umd/index.js

This file was deleted.

19 changes: 19 additions & 0 deletions examples/umd/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "examples-umd",
"version": "1.0.0",
"main": "src/index.js",
"scripts": {
"build": "webpack"
},
"keywords": [],
"author": "",
"license": "ISC",
"description": "",
"devDependencies": {
"webpack": "^4.30.0",
"webpack-cli": "^3.3.1"
},
"dependencies": {
"react": "^16.8.6"
}
}
1 change: 1 addition & 0 deletions examples/umd/src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
const react = require('react');
4 changes: 2 additions & 2 deletions examples/umd/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
const { resolve } = require('path');

const MicroservicesWebpackPlugin = require('../../index.js');
const MicroservicesWebpackPlugin = require('./../../lib/index.js');


module.exports = {
entry: resolve(__dirname, 'index.js'),
entry: resolve(__dirname, 'src', 'index.js'),
output: {
path: resolve(__dirname, 'dist'),
libraryTarget: 'amd'
Expand Down
File renamed without changes.
Loading

0 comments on commit 73ce3c5

Please sign in to comment.