Skip to content

Commit

Permalink
Run Webpack during CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Tpt committed Jul 8, 2022
1 parent 18d98ff commit 27ad12c
Show file tree
Hide file tree
Showing 4 changed files with 574 additions and 17 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,17 @@ jobs:
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true

webpack:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-webpack-modules-${{ hashFiles('**/yarn.lock') }}
- uses: actions/setup-node@v3
with:
node-version: 18.x
- run: yarn install
- run: npx webpack
10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,12 @@
"pre-commit": "^1.2.2",
"streamify-string": "^1.0.1",
"ts-jest": "^28.0.0",
"ts-loader": "^9.3.1",
"tslint": "^6.0.0",
"tslint-eslint-rules": "^5.3.1",
"typescript": "^4.3.5"
"typescript": "^4.3.5",
"webpack": "^5.73.0",
"webpack-cli": "^4.10.0"
},
"jest": {
"globals": {
Expand Down Expand Up @@ -79,10 +82,11 @@
},
"dependencies": {
"@rdfjs/types": "*",
"@types/node": "^18.0.0",
"@types/readable-stream": "^2.3.13",
"buffer": "^6.0.3",
"jsonparse": "^1.3.1",
"rdf-data-factory": "^1.1.0"
"rdf-data-factory": "^1.1.0",
"readable-stream": "^4.0.0"
},
"sideEffects": false
}
22 changes: 22 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
const path = require('path');

module.exports = {
entry: './lib/SparqlJsonParser.ts',
mode: 'development',
module: {
rules: [
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/,
},
],
},
resolve: {
extensions: ['.tsx', '.ts', '.js'],
},
output: {
filename: 'out.js',
path: path.resolve(__dirname, 'dist'),
},
};
Loading

0 comments on commit 27ad12c

Please sign in to comment.