mirror of
https://github.com/danbulant/dribbblish-dynamic-theme
synced 2026-07-05 11:11:13 +00:00
add webpack action
This commit is contained in:
parent
a3c6376ba3
commit
458dd8da57
7 changed files with 2824 additions and 9552 deletions
37
.github/workflows/webpack.yaml
vendored
Normal file
37
.github/workflows/webpack.yaml
vendored
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
name: Webpack
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
webpack:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
# Make sure the actual branch is checked out when running on pull requests
|
||||||
|
ref: ${{ github.head_ref }}
|
||||||
|
# This is important to fetch the changes to the previous commit
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: '14'
|
||||||
|
- run: npm install
|
||||||
|
- run: npm run build
|
||||||
|
- run: |
|
||||||
|
echo "Amending the current commit..."
|
||||||
|
cd "$GITHUB_ACTION_PATH"
|
||||||
|
|
||||||
|
git config --global user.email "actions@github.com"
|
||||||
|
git config --global user.name "GitHub Action"
|
||||||
|
|
||||||
|
git pull
|
||||||
|
git add -f dist
|
||||||
|
git commit --amend --no-edit
|
||||||
|
git push origin -f
|
||||||
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -1 +1,2 @@
|
||||||
node_modules/
|
node_modules/
|
||||||
|
dist/
|
||||||
236
dist/dribbblish-dynamic.js
vendored
236
dist/dribbblish-dynamic.js
vendored
File diff suppressed because one or more lines are too long
2706
dist/user.css
vendored
2706
dist/user.css
vendored
File diff suppressed because it is too large
Load diff
7038
package-lock.json
generated
7038
package-lock.json
generated
File diff suppressed because it is too large
Load diff
2298
src/js/main.js
2298
src/js/main.js
File diff suppressed because it is too large
Load diff
|
|
@ -1,29 +1,29 @@
|
||||||
const path = require("path");
|
const path = require("path");
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
entry: [path.resolve(__dirname, "./src/js/main.js"), path.resolve(__dirname, "./src/styles/main.scss")],
|
entry: [path.resolve(__dirname, "./src/js/main.js"), path.resolve(__dirname, "./src/styles/main.scss")],
|
||||||
output: {
|
output: {
|
||||||
path: path.resolve(__dirname, "dist"),
|
path: path.resolve(__dirname, "dist"),
|
||||||
filename: "dribbblish-dynamic.js"
|
filename: "dribbblish-dynamic.js"
|
||||||
},
|
},
|
||||||
module: {
|
module: {
|
||||||
rules: [
|
rules: [
|
||||||
{
|
{
|
||||||
test: /\.js$/,
|
test: /\.js$/,
|
||||||
exclude: /node_modules/,
|
exclude: /node_modules/,
|
||||||
use: []
|
use: []
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
test: /\.scss$/,
|
test: /\.scss$/,
|
||||||
exclude: /node_modules/,
|
exclude: /node_modules/,
|
||||||
use: [
|
use: [
|
||||||
{
|
{
|
||||||
loader: "file-loader",
|
loader: "file-loader",
|
||||||
options: { name: "user.css" }
|
options: { name: "user.css" }
|
||||||
},
|
},
|
||||||
"sass-loader"
|
"sass-loader"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue