diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml new file mode 100644 index 0000000..d66055f --- /dev/null +++ b/.github/workflows/ci-build.yml @@ -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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..f426186 --- /dev/null +++ b/.github/workflows/release.yml @@ -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 diff --git a/.gitignore b/.gitignore index 3c3629e..44d646d 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ node_modules +dist/ diff --git a/package.json b/package.json index 5412462..93742a1 100644 --- a/package.json +++ b/package.json @@ -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'" diff --git a/webpack.config.js b/webpack.config.js index e553776..64a294b 100755 --- a/webpack.config.js +++ b/webpack.config.js @@ -3,7 +3,7 @@ var path = require("path"); const UglifyJSPlugin = require("uglifyjs-webpack-plugin"); var webpackConfig = { - mode: 'production', + mode: "production", entry: { spider: "./src/spider.js", }, @@ -11,23 +11,23 @@ var webpackConfig = { 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;