@brickjs/devops
v1.1.0
Published
Collection of devops scripts.
Downloads
6
Readme
@brickjs/devops
A collection of opinionated common tools, scripts and configurations to build, test and deploy applications.
With @brickjs/devops
, each project does not need to install individual dependencies thus it greatly shortens the devDependencies
entries.
Quick Start
Installation
npm install @brickjs/devops --save-dev
Sample usage in an application scripts entry:
{
"scripts": {
"build": "brickjs-devops-scripts build",
"build:watch": "brickjs-devops-scripts tsc --watch",
"test": "brickjs-devops-scripts test"
}
}
Available Script
| Script | Description | |------|------------| | build | Run tsc | | test | Run jest | | tsc | Typescript | | jest | Jest | | webpack | Webpack | | webpack-dev-server | Webpack Dev Server |
Common Config
tsconfig.json
{
"extends": "@brickjs/devops/config/tsconfig.base.json",
"compilerOptions": {
"outDir": "./lib/",
"rootDir": "./src/"
},
"include": [
"./src/**/*"
]
}
jest.config.js
const baseConfig = require('@brickjs/devops/config/jest.config.base');
module.exports = {
...baseConfig,
};
webpack.config.js
const webpack = require('webpack');
const { createAppConfig } = require('@brickjs/devops/config/webpack.create.config');
const packageVersion = require('./package.json').version;
const HTMLWebpackPlugin = require('html-webpack-plugin');
module.exports = [
createAppConfig({
rootDir: __dirname,
packageVersion,
plugins: [
new HTMLWebpackPlugin({
template: 'template/template.html',
}),
],
entry: {
'app': ['./src/index.tsx'],
},
optimization: {
splitChunks: {
chunks: 'all',
},
},
}),
];