Skip to content

Commit

Permalink
feat: Adds CI implementation (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
andres-rubio-go authored Mar 18, 2024
1 parent 54fa2a3 commit 41987fb
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 9 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: ci-workflow
on:
push:
branches:
- master
pull_request:
workflow_dispatch:

jobs:
ci-build-job:
uses: looker-open-source/reusable-actions/.github/workflows/marketplace-viz-ci-build.yml@main
21 changes: 21 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: ci-release-workflow

on:
push:
branches:
- master
workflow_dispatch:

# Cancels any release workflows in progress
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true

jobs:
ci-release-job:
permissions:
contents: write
pull-requests: write
uses: looker-open-source/reusable-actions/.github/workflows/marketplace-viz-release.yml@main
# Inherits the Looker Automation Bot token to create release PRs and releases
secrets: inherit
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
dist/
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"main": "",
"scripts": {
"build": "webpack --config webpack.config.js --mode=production",
"build:legacy": "env NODE_OPTIONS='--openssl-legacy-provider' webpack",
"start": "webpack-dev-server --open",
"watch": "webpack --config webpack.config.js --watch --progress",
"format": "prettier --ignore-path .gitignore --write '**/*.js'"
Expand Down
18 changes: 9 additions & 9 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,31 @@ var path = require("path");
const UglifyJSPlugin = require("uglifyjs-webpack-plugin");

var webpackConfig = {
mode: 'production',
mode: "production",
entry: {
spider: "./src/spider.js",
},
devServer: {
contentBase: __dirname,
},
output: {
filename: "[name].js",
path: __dirname,
filename: "bundle.js",
path: path.join(path.resolve(__dirname), "/dist"),
library: "[name]",
libraryTarget: "umd"
libraryTarget: "umd",
},
resolve: {
extensions: [".js"],
modules: [path.join(__dirname, "../src"), "node_modules"]
modules: [path.join(__dirname, "../src"), "node_modules"],
},
plugins: [new UglifyJSPlugin()],
module: {
rules: [
{ test: /\.(js|jsx)$/, use: "babel-loader"},
{ test: /\.css$/, loader: [ 'to-string-loader', 'css-loader' ] }
]
{ test: /\.(js|jsx)$/, use: "babel-loader" },
{ test: /\.css$/, loader: ["to-string-loader", "css-loader"] },
],
},
stats: {}
stats: {},
};

module.exports = webpackConfig;

0 comments on commit 41987fb

Please sign in to comment.