diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml new file mode 100644 index 0000000..ba7a8e7 --- /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 3ca3988..eb51c67 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ .DS_STORE .idea/ node_modules/ +dist/ + diff --git a/webpack.config.js b/webpack.config.js index 792d560..062fc08 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,4 +1,4 @@ -var path = require('path') +var path = require('path'); const UglifyJSPlugin = require('uglifyjs-webpack-plugin'); @@ -8,28 +8,26 @@ var webpackConfig = { sankey: './src/sankey.ts', }, output: { - filename: "[name].js", - path: path.join(__dirname), - library: "[name]", - libraryTarget: "umd" + filename: 'bundle.js', + path: path.join(path.resolve(__dirname), '/dist'), + library: '[name]', + libraryTarget: 'umd', }, resolve: { - extensions: [".ts", ".js"] + extensions: ['.ts', '.js'], }, - plugins: [ - new UglifyJSPlugin() - ], + plugins: [new UglifyJSPlugin()], module: { rules: [ - { test: /\.js$/, loader: "babel-loader" }, - { test: /\.ts$/, loader: "ts-loader" }, - ] + {test: /\.js$/, loader: 'babel-loader'}, + {test: /\.ts$/, loader: 'ts-loader'}, + ], }, performance: { hints: false, maxEntrypointSize: 512000, - maxAssetSize: 512000 - } -} + maxAssetSize: 512000, + }, +}; -module.exports = webpackConfig +module.exports = webpackConfig;